lib/searchkick/index.rb in searchkick-0.7.8 vs lib/searchkick/index.rb in searchkick-0.7.9

- old
+ new

@@ -63,9 +63,13 @@ else klass.model_name.to_s.underscore end end + def tokens(text, options = {}) + client.indices.analyze({text: text, index: name}.merge(options))["tokens"].map{|t| t["token"] } + end + protected def client Searchkick.client end