Module: ElasticRecord::Index::Analyze

Included in:
ElasticRecord::Index
Defined in:
lib/elastic_record/index/analyze.rb

Instance Method Summary collapse

Instance Method Details

#analyze(params) ⇒ Object



4
5
6
7
# File 'lib/elastic_record/index/analyze.rb', line 4

def analyze(params)
  json = connection.json_get "/#{alias_name}/_analyze", params
  json['tokens'].map { |token_hash| token_hash['token'] }
end