Commit cc051e6ce2b5215ad319015e8492d50bc2088b20
1 parent
db19160a
Exists in
master
and in
21 other branches
Better example
Showing
1 changed file
with
8 additions
and
1 deletions
Show diff stats
README.md
... | ... | @@ -570,7 +570,14 @@ Dog.search "airbudd", suggest: true # suggestions for all animals |
570 | 570 | To see how Elasticsearch tokenizes your queries, use: |
571 | 571 | |
572 | 572 | ```ruby |
573 | -Product.searchkick_index.tokens("this is a test", analyzer: "default_index") | |
573 | +Product.searchkick_index.tokens("Dish Washer Soap", analyzer: "default_index") | |
574 | +# => ["dish", "dishwash", "washer", "washersoap", "soap"] | |
575 | + | |
576 | +Product.searchkick_index.tokens("dishwasher soap", analyzer: "searchkick_search") | |
577 | +# => ["dishwashersoap"] | |
578 | + | |
579 | +Product.searchkick_index.tokens("dishwasher soap", analyzer: "searchkick_search2") | |
580 | +# => ["dishwash", "soap"] | |
574 | 581 | ``` |
575 | 582 | |
576 | 583 | See the [complete list of analyzers](lib/searchkick/reindex.rb#L86). | ... | ... |