Manage delta indexes via Delayed Job for Thinking Sphinx
MIT License
h1. Delayed Deltas for Thinking Sphinx
h2. Installation
This version works with Thinking Sphinx v1.5.0, v2.1.0 and v3.x.
In your @Gemfile@, it'll likely look something like this:
Or, if you're referring directly to the git repository:
And given this gem's built for Delayed Job, we're presuming you've got that set up (with the database table), and you know how to run it. This gem no longer provides a custom task for that purpose - there's no need.
h2. Usage
In your index definitions, make sure you set the @:delta@ setting to @ThinkingSphinx::Deltas::DelayedDelta@:
For those still on pre-v3 versions of Thinking Sphinx, the delta option goes within the define_index block:
If you've never used delta indices before, you'll want to add the boolean column named delta to each model that is using the approach. It probably doesn't hurt to add an index to that column as well.
And that's pretty much it. Make sure Delayed Job is running, and it'll take care of the jobs to keep your Sphinx indices up to date.
Please keep in mind that you need to run the Delayed Job workers on the same machine as Sphinx, as direct access to Sphinx files (and the Sphinx command-line tools) is essential.
h2. Contributing
Contributions are very much welcome - but keep in mind the following:
h2. Contributors
h2. Copyright
Copyright (c) 2009-2018, Thinking Sphinx Delayed Deltas (ts-delayed-delta) is developed and maintained by Pat Allan, and is released under the open MIT Licence. Many thanks to "all who have contributed patches":https://github.com/pat/ts-delayed-delta/contributors.