views:

22

answers:

1

There has been a post about setting cron job to index: Use a Cron Job to Automate Sphinx Index Refresh from Rails Rake Task

The author shares the same technique to invoke the indexer through Thinking Sphinx. But in the comment, there is a second method shared, which claimed to be better in easing the server load by calling the indexer directly from Sphinx:

Call the sphinx indexer directly, also eases the load (you don’t need to fire up rails), eg:

/usr/local/bin/indexer –config /data/releases/site/current/config/production.sphinx.conf –all –rotate

Wondering if this is actuall a better option...

+1  A: 

I use the direct indexer method in my cron jobs and think it's a better technique.

There's no need to load the full rails stack just to shell out to another process.

James Healy