Commit ff2526ee6bbdfa36d2d3800330a8a12dfd85b50e
1 parent
e112b2a1
Exists in
master
and in
2 other branches
Added comments [skip ci]
Showing
1 changed file
with
6 additions
and
3 deletions
Show diff stats
lib/searchkick/index.rb
@@ -209,6 +209,8 @@ module Searchkick | @@ -209,6 +209,8 @@ module Searchkick | ||
209 | 209 | ||
210 | # reindex | 210 | # reindex |
211 | 211 | ||
212 | + # note: this is designed to be used internally | ||
213 | + # so it does not check object matches index class | ||
212 | def reindex(object, method_name: nil, full: false, **options) | 214 | def reindex(object, method_name: nil, full: false, **options) |
213 | if object.is_a?(Array) | 215 | if object.is_a?(Array) |
214 | # note: purposefully skip full | 216 | # note: purposefully skip full |
@@ -254,8 +256,7 @@ module Searchkick | @@ -254,8 +256,7 @@ module Searchkick | ||
254 | relation_indexer.batches_left | 256 | relation_indexer.batches_left |
255 | end | 257 | end |
256 | 258 | ||
257 | - # other | ||
258 | - | 259 | + # private |
259 | def klass_document_type(klass, ignore_type = false) | 260 | def klass_document_type(klass, ignore_type = false) |
260 | @klass_document_type[[klass, ignore_type]] ||= begin | 261 | @klass_document_type[[klass, ignore_type]] ||= begin |
261 | if !ignore_type && klass.searchkick_klass.searchkick_options[:_type] | 262 | if !ignore_type && klass.searchkick_klass.searchkick_options[:_type] |
@@ -268,7 +269,7 @@ module Searchkick | @@ -268,7 +269,7 @@ module Searchkick | ||
268 | end | 269 | end |
269 | end | 270 | end |
270 | 271 | ||
271 | - # should not be public | 272 | + # private |
272 | def conversions_fields | 273 | def conversions_fields |
273 | @conversions_fields ||= begin | 274 | @conversions_fields ||= begin |
274 | conversions = Array(options[:conversions]) | 275 | conversions = Array(options[:conversions]) |
@@ -276,10 +277,12 @@ module Searchkick | @@ -276,10 +277,12 @@ module Searchkick | ||
276 | end | 277 | end |
277 | end | 278 | end |
278 | 279 | ||
280 | + # private | ||
279 | def suggest_fields | 281 | def suggest_fields |
280 | @suggest_fields ||= Array(options[:suggest]).map(&:to_s) | 282 | @suggest_fields ||= Array(options[:suggest]).map(&:to_s) |
281 | end | 283 | end |
282 | 284 | ||
285 | + # private | ||
283 | def locations_fields | 286 | def locations_fields |
284 | @locations_fields ||= begin | 287 | @locations_fields ||= begin |
285 | locations = Array(options[:locations]) | 288 | locations = Array(options[:locations]) |