Commit cc051e6ce2b5215ad319015e8492d50bc2088b20

Authored by Andrew Kane
1 parent db19160a

Better example

Showing 1 changed file with 8 additions and 1 deletions   Show diff stats
@@ -570,7 +570,14 @@ Dog.search "airbudd", suggest: true # suggestions for all animals @@ -570,7 +570,14 @@ Dog.search "airbudd", suggest: true # suggestions for all animals
570 To see how Elasticsearch tokenizes your queries, use: 570 To see how Elasticsearch tokenizes your queries, use:
571 571
572 ```ruby 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 See the [complete list of analyzers](lib/searchkick/reindex.rb#L86). 583 See the [complete list of analyzers](lib/searchkick/reindex.rb#L86).