Manual Deltas for Thinking Sphinx
You’ll need Thinking Sphinx 1.3.0 or later.
gem install ts-manual-delta --source http://gemcutter.org
environment.rb file, with the rest of your gem dependencies:
config.gem 'ts-manual-delta', :lib => 'thinking_sphinx/deltas/manual_delta' :version => '>= 1.0.0', :source => 'http://gemcutter.org'
And add the following line to the bottom of your
For the indexes you want to use this delta approach, make sure you set that up in their
define_index do # ... set_property :delta => ThinkingSphinx::Deltas::Manual end
You’ll have full control over which data will be indexed in your delta by setting the delta-column to
true. For instance, only when a certain column changes in value.
Then, while your Rails application is running, you’ll need to run the delta indexing rake task regularly, allowing for some time for the indexing to actually happen.
To ensure this rake task is called regularly, it’s best to set it up as a recurring task via cron or similar tools.
The shorthand version is:
Copyright & Credits
Copied from ts-datetime-delta and Thinking Sphinx by Pat Allen. Adapted by Menno van der Sman.
Copyright © 2009 Menno van der Sman, and released under an MIT Licence.