Re-indexing with Solr instance migration

In an ImageMaster upgrade scenario it can become necessary to do a complete re-indexing of the full-text data to move to a newer Solr version. The ImageMaster full-text search service supports a re-indexing feature, which is based on the migration from one Solr instance to a new one:

  • The existing index (old Solr version) needs to be recreated on the new Solr instance.

  • During the migration, all new documents need to be indexed in both the old and new Solr version.

The described procedure creates a new index and the search is only fully functional after the re-indexing has been completed.

A dedicated configuration property must be used to execute this re-indexing:

Setting this configuration property shows the following outcome:

  • Any create index job created in the AdminClient (Administration – System – Fulltext – Action) or via a web service (ImaFulltextService) will be running against the reindexUrl.

  • Any delete index job created in the AdminClient (Administration – System – Fulltext – Action) or via a web service (ImaFulltextService) will be running against both the reindexUrl and masterUrl.

  • All new documents will be indexed in both masterUrl and reindexUrl.

  • All deleted documents will be deleted in both masterUrl and reindexUrl.

Jobs for re-indexing can be created for dedicated document types. The complete re-indexing process can take a long time depending on the amount of documents that have to be processed. When all jobs for re-indexing have finished, the switch from the old Solr version to the new Solr version can be made and the configuration needs to be changed, which must be done in one step:

  • Remove the reindexUrl from the configuration.

  • Set the instance used for reindexUrl as masterUrl.

    If slaveUrl is the same instance as masterUrl:

  • Set the instance used for reindexUrl as slaveUrl.

After this change the old instance is not used anymore and the migration is complete.