Skip to content
ThinkingSphinx + Resque delta indexing.
Find file
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
config First attempt. Specs and Features are ripped/adapted from ts-delayed-…
gemfiles Updated Appraisal gemfiles.
lib Keeping things simple still - no rake tasks, no need for Railtie.
spec Longer sleeps for Travis happiness.
tasks Moving flag as deleted behavior to a redis set.
.gitignore Ignoring all bundler lockfiles.
.travis.yml Add redis to required services for Travis.
Appraisals Appraisals are now for v1/v2 (binary) and v3 (sphinxql).
Gemfile Use https in Gemfile.
LICENSE Stupid file mods on dropbox...
README.markdown Updating README in preparation for the v2 release.
cucumber.yml Moved test opts to Rakefile and cucumber.yml
ts-resque-delta.gemspec 2.0.0


Delayed Deltas for Thinking Sphinx (with Resque)

Build Status

This code is HEAVILY borrowed from ts-delayed-delta.


This gem depends on the following gems: thinking-sphinx and resque.

Currently, you'll need Thinking Sphinx v1.5.0 (for Rails 2), v2.1.0 (for Rails 3), or - ideally - v3.0.3 or newer (for Rails 3.1 onwards). If you're on a version of Thinking Sphinx that's too old, you better go upgrade - but otherwise, add ts-resque-delta to your Gemfile file with the rest of your gem dependencies:

gem 'ts-resque-delta', '~> 2.0.0'

Add the delta property to index definition. If you're using Thinking Sphinx v3, then it'll look something like this:

  :with  => :active_record,
  :delta => ThinkingSphinx::Deltas::ResqueDelta
) do
  # fields and attributes and so on...

But if you're still using v1.5 or v2.1, you'll want the following:

define_index do
  # fields and attributes and so on...

  set_property :delta => ThinkingSphinx::Deltas::ResqueDelta

If you've never used delta indexes before, you'll need to add the boolean column named :delta to each table for indexed models. A database index for that column is also recommended.

def change
  add_column :articles, :delta, :boolean, :default => true, :null => false
  add_index  :articles, :delta


Once you've got it all set up, all you need to do is make sure that the Resque worker is running. You can do this by specifying the ts_delta queue when running Resque:

QUEUE=ts_delta,other_queues rake resque:work

Contributors (for ts-resque-delta)

Original Contributors (for ts-delayed-delta)


Copyright (c) 2011-2014 Aaron Gibralter and Pat Allan, and released under an MIT Licence.

Something went wrong with that request. Please try again.