Search code examples
ruby-on-railsruby-on-rails-3sphinxthinking-sphinx

thinking sphinx automatic indexing


How can I do automatic indexing for thinking sphinx or it will keep on indexing new records (added/deleted) automatically. Or I have to run

  rake ts:index

as per my needs like after 2hours or after 1 day. If I have to run, whats the best way to do that?


Solution

  • To reindex periodically, use whenever:

    http://railscasts.com/episodes/164-cron-in-ruby