1.17.9 Versioning of records
If several versions of certain record exist, you can display a version history for the user in the sidebar. To do this, the records must contain the identifier of the predecessor or successor version as a meta tree. These field names must be configured in the previousVersionIdentifierField or nextVersionIdentifierField fields. If the version is to have an explicit name, the field name must be defined in versionLabelField.
The version history is displayed in the sidebar
For example, if a record contains a predecessor identifier, a link is generated in the sidebar for that older version (and if that version contains a reference to a predecessor, a link is also generated for that predecessor, and so on). The staticQuerySuffix configuration element contains a Solr subquery that is always appended to all search queries and allows additional filtering. In the example below, all records that match the query BOOL_HIDE:true are filtered out. In this way, versions that are not to be found can be filtered out of search queries. For example, if only the current version is to be found via the search, the collection view, etc., all other versions can be assigned a certain metadata value that discriminates against the record as corresponding. This does not affect the version history in the sidebar.
config_viewer.xml
1
<search>
2
<staticQuerySuffix>AND –BOOL_HIDE:true</staticQuerySuffix>
3
<versioning>
4
<previousVersionIdentifierField>MD_PREVIOUS_VERSION</previousVersionIdentifierField>
5
<nextVersionIdentifierField>MD_NEXT_VERSION</nextVersionIdentifierField>
6
<versionLabelField>MD_VERSIONLABEL</versionLabelField>
7
</versioning>
8
</search>
Copied!
The staticQuerySuffix can also be used to use a Solr search index for multiple Goobi viewer instances but display only one subset at a time. The + stands for an "AND". The brackets summarize everything in it. If conditions are not explicitly linked in a query, this corresponds to an "OR". Here is an example:
config_viewer.xml
1
<search>
2
<staticQuerySuffix>+(MD2_VIEWERINSTANCE:viewer1 MD2_VIEWERINSTANCE:viewer1_and_viewer2 MD2_VIEWERINSTANCE:viewer1_and_viewer3 MD2_VIEWERINSTANCE:all)</staticQuerySuffix>
3
</search>
Copied!
Last modified 1yr ago
Copy link