I will be uploading my website to a VPS soon. It is a classifieds website which uses Solr integrated with MySql.
Solr is updated whenever a new classified is put or deleted.
I need a way to make the commit() and optimize() be automated, for example once every 3 hours or so.
How can I do this? (Details Please)
When is it ideal to optimize?
Thanks
You could set up a cron task that periodically executes a remote call to the Solr REST interface, e.g:
Find further info on updating the Solr index here.
Quoting the Solr tutorial:
UPDATE:
Besides, the auto-commit feature can be enabled in solrconfig.xml (within the
UpdateHandlersection):