DEPLOYMENT_NOTES in ultrasphinx-1.9 vs DEPLOYMENT_NOTES in ultrasphinx-1.11
- old
+ new
@@ -15,15 +15,17 @@
It's easy to keep the search daemon and the indexer running in a production environment. Cronjobs are the best way:
*/6 * * * * bash -c 'cd /path/to/production/current/; RAILS_ENV=production \
rake ultrasphinx:index:delta >> /log/ultrasphinx-index.log 2>&1'
- 1 4 * * * * bash -c 'cd /path/to/production/current/; RAILS_ENV=production \
+ 1 4 * * * bash -c 'cd /path/to/production/current/; RAILS_ENV=production \
rake ultrasphinx:index:main >> /log/ultrasphinx-index.log 2>&1'
*/3 * * * * bash -c 'cd /path/to/production/current/; RAILS_ENV=production \
rake ultrasphinx:daemon:start >> /log/ultrasphinx-daemon.log 2>&1'
The first line reindexes the delta index every 10 minutes. The second line reindexes the main index once a day at 4am. The third line will try to restart the search daemon every three minutes. If it's already running, nothing happens.
+
+Note that you can use <tt>ultrasphinx:index:merge</tt> in place of <tt>ultrasphinx:index:main</tt>. It will be faster, but will not remove deleted records from the index.
Of course if you don't have any models with deltas, don't include the <tt>ultrasphinx:index:delta</tt> task.
If you are under severe memory limitations you might want to manage the daemon with Monit instead, so you can keep a closer eye on it. The search daemon is extremely reliable, so don't bother with fancy monitoring infrastructure unless you're sure you need it.