What triggers search reindexing?


#1

We have v 2.6 running. We’re trying to figure out how we could schedule solr plugin search re-indexing on a schedule and were hoping to look at how the native search engine handles this for pointers. I can’t find any documentation on it other than manually pushing the re-index button in the admin gui.

Any ideas on how we might do this?

Thanks.

Bobb Menk


#2

The native Omeka search indexes only take advantage of functionality provided by MySQL, and the indexes that MySQL creates are generally maintained by the server itself.

For SolrSearch, since the index is maintained by a separate service, there must be a means to create the initial index. After the initial creation, the index should be updated by the process of adding new texts to it by the plugin. The re-index button is largely provided in the case that something either changes to the texts separate from Omeka, or something changes about the Solr index that it should be regenerated.

The re-index function from the original plugin also has the downside of clearing all records from the existing index, so the search will not show all results until the re-index is complete. There are forks such as biblbre’s and my own that make clearing the records optional as well as providing other bugfixes for the plugin.

If you need to routinely re-index your site, I think there may be an issue that should otherwise be addressed. Within the plugin, there is an Omeka_Job named SolrSearch_Job_Reindex that performs the reindexing in a separate process. I’m not sure how you would go about triggering that job, though.