Commit a01142fda5f311720094698466cf55be2904f548
1 parent
486dd0e1
Exists in
master
and in
17 other branches
Better notes [skip ci]
Showing
1 changed file
with
5 additions
and
2 deletions
Show diff stats
test/inheritance_test.rb
... | ... | @@ -88,10 +88,13 @@ class InheritanceTest < Minitest::Test |
88 | 88 | Animal.reindex |
89 | 89 | assert_equal 2, Searchkick.search("bear", models: [Cat, Product]).size |
90 | 90 | |
91 | - # pagination will be off with this approach | |
91 | + # hits and pagination will be off with this approach (for now) | |
92 | 92 | # ideal case is add where conditions (index a, type a OR index b) |
93 | - # however, we don't know the exact index name, and aliases don't work for filters | |
93 | + # however, we don't know the exact index name and aliases don't work for filters | |
94 | + # see https://github.com/elastic/elasticsearch/issues/23306 | |
94 | 95 | # show warning for now |
96 | + # alternative is disallow inherited models with models option | |
97 | + assert_equal 3, Searchkick.search("bear", models: [Cat, Product]).hits.size | |
95 | 98 | assert_equal 3, Searchkick.search("bear", models: [Cat, Product], per_page: 1).total_pages |
96 | 99 | end |
97 | 100 | ... | ... |