Skip to content

Commit

Permalink
Add instructions for Rails 2 vs Rails 3
Browse files Browse the repository at this point in the history
  • Loading branch information
gabebw committed Dec 8, 2010
1 parent 43ff8d1 commit bdd843b
Showing 1 changed file with 19 additions and 9 deletions.
28 changes: 19 additions & 9 deletions README.rdoc
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
ThinkingTank
=============
= ThinkingTank

ActiveRecord extension that allows to define models that should be indexed
in an existing IndexTank index. It supports a very similar syntax to
Expand All @@ -21,18 +20,29 @@ 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 rake tasks to be available you need to add:

require 'thinkingtank/tasks'

to your Rakefile. You can use the following task to reindex your entire database:

rake indextank:reindex
to your Rakefile.

== Rails 3
Just add

gem 'thinkingtank', '>=0.0.5'

to your Gemfile, and you're done!


Example
=======
== Rails 2 and 3
For both versions of Rails, you can use the following task to reindex your
entire database:

rake indextank:reindex


== Example
Sample config/indextank.yml file:

development:
Expand Down Expand Up @@ -62,6 +72,6 @@ Sample query code:
Person.search("john OR stacey")
Person.search("stacey", :conditions => { :age => 25 } )
Person.search("james", :conditions => { :age => 25 , :gender => "female" } )


Copyright(c) 2010 Flaptor Inc.

Copyright (c) 2010 Flaptor Inc.

0 comments on commit bdd843b

Please sign in to comment.