From cc051e6ce2b5215ad319015e8492d50bc2088b20 Mon Sep 17 00:00:00 2001 From: Andrew Kane Date: Wed, 25 Jun 2014 22:58:18 -0700 Subject: [PATCH] Better example --- README.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 6c41c8c..7db3493 100644 --- a/README.md +++ b/README.md @@ -570,7 +570,14 @@ Dog.search "airbudd", suggest: true # suggestions for all animals To see how Elasticsearch tokenizes your queries, use: ```ruby -Product.searchkick_index.tokens("this is a test", analyzer: "default_index") +Product.searchkick_index.tokens("Dish Washer Soap", analyzer: "default_index") +# => ["dish", "dishwash", "washer", "washersoap", "soap"] + +Product.searchkick_index.tokens("dishwasher soap", analyzer: "searchkick_search") +# => ["dishwashersoap"] + +Product.searchkick_index.tokens("dishwasher soap", analyzer: "searchkick_search2") +# => ["dishwash", "soap"] ``` See the [complete list of analyzers](lib/searchkick/reindex.rb#L86). -- libgit2 0.21.0