Commit aa4ba9e7ec4630c371ebddaf5e5d92d41c832c04

Authored by Andrew Kane
1 parent c8a42d7e

Added reindex instance method

Showing 2 changed files with 5 additions and 1 deletions   Show diff stats
README.md
... ... @@ -188,7 +188,7 @@ Reindex one item
188 188  
189 189 ```ruby
190 190 product = Product.find(1)
191   -product.update_index
  191 +product.reindex
192 192 ```
193 193  
194 194 Partial matches (needs better name)
... ...
lib/searchkick/model.rb
... ... @@ -9,6 +9,10 @@ module Searchkick
9 9 include Tire::Model::Search
10 10 include Tire::Model::Callbacks
11 11  
  12 + def reindex
  13 + update_index
  14 + end
  15 +
12 16 def to_indexed_json
13 17 respond_to?(:search_data) ? search_data.to_json : super
14 18 end
... ...