ActiveRecord extension for IndexTank (similar syntax to ThinkingSphinx)
Latest commit 435b109 Mar 15, 2011 @loniszczuk loniszczuk finished insert batch
Failed to load latest commit information.
lib finished insert batch Mar 15, 2011
test Initial import Jun 25, 2010
.loadpath Initial import Jun 25, 2010
.project Initial import Jun 25, 2010
MIT-LICENSE Initial import Jun 25, 2010
README.rdoc Docs link quick fix Feb 12, 2011
Rakefile Initial import Jun 25, 2010
init.rb Add Rails 2 support back in Dec 8, 2010
thinkingtank-0.0.1.gem Initial import Jun 25, 2010
thinkingtank-0.0.2.gem Built new gem Jun 26, 2010
thinkingtank-0.0.4.gem Removed HEROKUTANK env var Dec 17, 2010
thinkingtank.gemspec finished insert batch Mar 15, 2011
uninstall.rb Initial import Jun 25, 2010



See documentation in:

ActiveRecord extension that allows to define models that should be indexed in an existing IndexTank index. It supports a very similar syntax to ThinkingSphinx allowing to easily port an existing project.

Every indexable model should include a define_index block in its class definition. This block supports the indexes :method and receives a field name.

Model classes now have a search method that receives one or more string arguments with query strings (according to the query specifications) and supports the :conditions argument as a hash from field name to query string.

In order for this extension to work you need to define a config/indextank.yml in your application with the api_key and index_name settings for each environment (similar to config/database.yml).

Indexed fields in ActiveRecord are prepended an underscore when sent to IndexTank so if you plan to write query strings that use your field names you will have to prepend the underscore to the field names.

Rails 2

In order for the ThinkingTank to be available you need to add:

require 'thinkingtank'
require 'thinkingtank/tasks'

to your Rakefile.

Rails 3

Just add

gem 'thinkingtank'

to your Gemfile.

Rails 2 and 3

For both versions of Rails, you can use the following task to reindex your entire database:

rake indextank:reindex

Copyright © 2011 Flaptor Inc.