Commit dabbbea78c861e056675999e4853d44a036169a6

Authored by Andrew Kane
1 parent 2b2682d3

Better conversions

Showing 1 changed file with 2 additions and 13 deletions   Show diff stats
README.md
... ... @@ -47,16 +47,7 @@ Add the conversions to the index.
47 47 class Book < ActiveRecord::Base
48 48 has_many :searches
49 49  
50   - tire do
51   - settings Searchkick.settings
52   - mapping do
53   - indexes :title, analyzer: "searchkick"
54   - indexes :conversions, type: "nested" do
55   - indexes :query, analyzer: "searchkick_keyword"
56   - indexes :count, type: "integer"
57   - end
58   - end
59   - end
  50 + searchkick :name, conversions: true
60 51  
61 52 def to_indexed_json
62 53 {
... ... @@ -71,9 +62,7 @@ end
71 62 After the reindex is complete (to prevent errors), tell the search query to use conversions.
72 63  
73 64 ```ruby
74   -Book.search do
75   - searchkick_query ["title"], "Nobody Listens to Andrew", true
76   -end
  65 +Book.search("Nobody Listens to Andrew", conversions: true)
77 66 ```
78 67  
79 68 ### Zero Downtime Changes
... ...