Skip to content
Manual Deltas for Thinking Sphinx
Ruby
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
features
lib/thinking_sphinx/deltas
spec
tasks
.gitignore
LICENSE
README.textile
Rakefile
VERSION
cucumber.yml
ts-manual-delta.gemspec

README.textile

Manual Deltas for Thinking Sphinx

Installation

You’ll need Thinking Sphinx 1.3.0 or later.

gem install ts-manual-delta --source http://gemcutter.org

In your 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 Rakefile:

require 'thinking_sphinx/deltas/manual_delta/tasks'

Usage

For the indexes you want to use this delta approach, make sure you set that up in their define_index blocks.

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.

rake thinking_sphinx:index:delta

The shorthand version is:

rake ts:in:delta

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.

Something went wrong with that request. Please try again.