What triggers search reindexing?

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

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.

Does one need to force a re-index (in the plug-in configuration) when changing the search fields being indexed? i.e. I’m adding three more Dublin Core fields to the SolrSearch. When I go to reindex the site from within the plug-in I’m getting that generic error: “The configured PHP path () is invalid.” But I also know that the index with update when/if someone adds a new item anyways.

Yes, a re-index is necessary if you want previously indexed items to be searchable by the new fields without having to update the items.

The error is likely because the background process that does the re-indexing cannot find the PHP executable path. You should try specifying the path to the PHP executable in the background.php.path variable in the application/config/config.ini file in your Omeka directory. If you do not know the path to your PHP executable, you can try running which php from the command line of your server.

1 Like

Thanks @kloor ! That worked for the PHP path and things have been successfully reindexed.