6.13.2 Goobi viewer: Evaluation of the instance

The ViewerInstance metadata is written to a separate field within the Solr Index. The following field definition must be added to the configuration file solr_indexerconfig.xml:

solr_indexerconfig.xml
<init>
<namespaces>
<list>
<intranda>https://intranda.com/MODS/</intranda>
</list>
</namespaces>
<init>
[...]
<fields>
<MD2_VIEWERINSTANCE>
<list>
<item>
<xpath>mets:xmlData/mods:mods/mods:extension/intranda:viewerinstance</xpath>
<addToDefault>false</addToDefault>
<addUntokenizedVersion>false</addUntokenizedVersion>
</item>
</list>
</MD2_VIEWERINSTANCE>
</fields>

A staticQuerySuffix must now be defined for each Goobi viewer instance, specifying which conditions must be met for works to be displayed:

config_viewer.xml
<search>
<staticQuerySuffix>+(MD2_VIEWERINSTANCE:viewer1 MD2_VIEWERINSTANCE:viewer1_and_viewer2 MD2_VIEWERINSTANCE:viewer1_and_viewer3 MD2_VIEWERINSTANCE:all)</staticQuerySuffix>
</search>

The + stands for an "AND". The brackets summarize everything in it. If conditions are not explicitly linked within a query, this automatically corresponds to an "OR".