According to the Thinking Sphinx docs…
Turning on delta indexing does not
remove the need for regularly running
a full re-index …
So I set up this cron job…
50 10 * * * cd /var/www/my_app/current
&& /opt/ruby/bin/rake thinking_sphinx:index RAILS_ENV=production
>> /var/www/my_app/current/log/reindexing.log 2>&1
Is that a reasonable way to do it? Should I be doing something different?
That looks great. On the downside, it’s pretty expensive. In production, you can safely cut rails, rake, etc. out of the picture, and have sphinx do the work directly.
Consider doing this (correct the paths to match your environment) from cron:
Just make sure your deploy process builds production.sphinx.conf (I think you want rake ts:configure — check the docs though.)