From time to time it may be necessary to completely re-generate an index. Reasons for re-indexing include:
A Content Store upgrade. Some upgrades include modifications to the default
solrschema used by CUE.
Changes to one or more of your publications, or the addition of new search functionality require changes to your own custom
In theory, all you need to do to re-index your publications is click on
the Reindex... button on the
indexer web application's admin page. However, the
re-indexing process may take several hours on large sites, and while it
is in progress, search requests will return incomplete results. In many
production environments, reduced search functionality over several hours
is not acceptable. In such cases you can avoid the problem by generating
the new index using a separate, non-production Tomcat instance, and then
copying the new index to the production environment.
The exact procedure for doing this is installation-dependent, but involves the following general steps:
Install a new Solr instance somewhere in your network that you can use for generating the new index. See Install Solr for details.
context.xmlfrom one of your production Tomcat configurations to your indexing Tomcat instance. This ensures that your
indexerweb application will be correctly configured to communicate with the Content Store's indexer web service. By default,
context.xmlis located in
solrconfiguration files (usually located in
/etc/escenic/solr/solr-core) from your production
solrinstance to your indexing instance.
Modify the copied configuration as necessary for generating the new index. You might, for example, need to replace the schema file,
Start the new
$ /opt/solr/bin/solr start
Start a browser and display the new
indexerweb application's admin page (
Click on Reindex..., then click on your browser's Back button to redisplay the admin page.
Wait for the indexing job to complete. The Current state section of the admin page shows the progress of the indexing operation, but it is not refreshed automatically. Click on your browser's Refresh button from time to time and check the Number of documents read but not yet processed value. When this value reaches 0, indexing is complete.
Test the generated index. The easiest way to do this is to use Solr's administration interface. Open a web browser, go to
/solr/solr-coreand follow links to the correct administration page (exactly how you get there is installation-dependent). The administration page contains a search field that you can use to execute test searches, plus links to the Solr documentation.
If you are not satisfied with the results, make the required changes to your configuration files, and try again (from step 6). Otherwise, continue.
Stop the Tomcat instance in which your production
solrinstance is running.
Copy your modified
solrconfiguration files from your indexing instance to the production instance.
Copy the new index file (usually
/opt/escenic/indexer/head-tail.index) from your indexing instance to the production instance.
Restart your production Tomcat instance.