Commit 31f7ba50244861081be77ec579667cf110931735

Authored by Andrew
1 parent 5e427ddd

Removed search_model method [skip ci]

Showing 1 changed file with 1 additions and 14 deletions   Show diff stats
lib/searchkick/index.rb
... ... @@ -154,7 +154,7 @@ module Searchkick
154 154 options[:similar] = true
155 155  
156 156 # TODO use index class instead of record class
157   - search_model(record.class, like_text, options)
  157 + Searchkick.search(like_text, model: record.class, **options)
158 158 end
159 159  
160 160 # queue
... ... @@ -163,19 +163,6 @@ module Searchkick
163 163 Searchkick::ReindexQueue.new(name)
164 164 end
165 165  
166   - # search
167   -
168   - # TODO remove in next major version
169   - def search_model(searchkick_klass, term = "*", **options, &block)
170   - query = Searchkick::Query.new(searchkick_klass, term, options)
171   - yield(query.body) if block
172   - if options[:execute] == false
173   - query
174   - else
175   - query.execute
176   - end
177   - end
178   -
179 166 # reindex
180 167  
181 168 def create_index(index_options: nil)
... ...