Commit 4a84645e7718da6ae083e66b405980bec8f6510e
1 parent
a01142fd
Exists in
master
and in
17 other branches
Added code to fix hits and pagination once aliases are supported with _index filtering [skip ci]
Showing
1 changed file
with
13 additions
and
0 deletions
Show diff stats
lib/searchkick/query.rb
... | ... | @@ -431,6 +431,19 @@ module Searchkick |
431 | 431 | where[:type] = [options[:type] || klass].flatten.map { |v| searchkick_index.klass_document_type(v, true) } |
432 | 432 | end |
433 | 433 | |
434 | + # uncommented once aliases are supported with _index | |
435 | + # models = Array(options[:models]) | |
436 | + # if models.any? { |m| m != m.searchkick_klass } | |
437 | + # index_type_or = | |
438 | + # models.map do |m| | |
439 | + # v = {_index: m.searchkick_index.name} | |
440 | + # v[:type] = m.searchkick_index.klass_document_type(m, true) if m != m.searchkick_klass | |
441 | + # v | |
442 | + # end | |
443 | + | |
444 | + # (where[:or] ||= []) << index_type_or | |
445 | + # end | |
446 | + | |
434 | 447 | # start everything as efficient filters |
435 | 448 | # move to post_filters as aggs demand |
436 | 449 | filters = where_filters(where) | ... | ... |