Commit 42284a14bfab0e9007ee71004f16d13b979b5522
1 parent
59945414
Exists in
master
and in
7 other branches
Test tokens for stemming
Showing
1 changed file
with
5 additions
and
0 deletions
Show diff stats
test/match_test.rb
... | ... | @@ -66,6 +66,11 @@ class MatchTest < Minitest::Test |
66 | 66 | assert_search "milks", ["Milk", "Whole Milk", "Fat Free Milk"] |
67 | 67 | end |
68 | 68 | |
69 | + def test_stemming_tokens | |
70 | + assert_equal ["milk"], Product.search_index.tokens("milks", analyzer: "searchkick_search") | |
71 | + assert_equal ["milk"], Product.search_index.tokens("milks", analyzer: "searchkick_search2") | |
72 | + end | |
73 | + | |
69 | 74 | # fuzzy |
70 | 75 | |
71 | 76 | def test_misspelling_sriracha | ... | ... |