Offline collections contain only documents that were published and are now set offline. Offline collections are needed to build appropriate redirects for users who try to access offline documents via the website. In such a case, the delivery can create a redirect to similar or related content based on the metadata of the offline document.
In Sophora versions prior to Sophora 5 the offline collections were part of each Sophora Server of a Sophora cluster. That means that the Sophora Primary Server, the Sophora Replica Servers and the Sophora Staging Servers had their own offline collection within their embedded Solr instance. Nevertheless, all offline collections were indexed by the Sophora Primary Server, which made the Sophora Primary Server a central bottleneck.
With the help of the central Sophora Indexing Service, offline collections are treated like any other collection. You can even have multiple offline collections for different use cases.
Configuration
It is sufficient to mark a collection as an offline collection in the corresponding index configuration document. The base mapping should be set to "Only Metadata", since typically only the metadata of documents in offline collections is needed.
Offline collections can be extended by index fields, like any other type of index.
Please refer to the documentation for Configuring Indexes for further information about index configuration documents.
Migration
When updating to Sophora 5, an index configuration document for an offline collection is created automatically. This comes with all the configurations to mimic the former offline core in its default configuration.
If you rely on this offline collection it is sufficient to publish this document and wait for the indexing of the collection to be completed.
If you restricted your offline core to specific node type (by setting the Sophora Servers property offlineDocumentIndexer.nodetypeNames
) or used additional properties (by setting offlineDocumentIndexer.propertyNames
) then you should replace these with groovy custom fields or additions to the offline index' configuration prior to publishing it.
Once indexing is complete, the new collection can be used. To do this, it should be sufficient to change the connection parameters of the web apps, so that the web apps connect to the new offline core in the SolrCloud.
The internal offline indexer can then be deactivated by adding the entry offlineDocumentIndexer.active = false
to the system configuration document.