Module: ElasticRecord::Index::Analyze

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#analysisObject

Returns the value of attribute analysis.



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

def analysis
  @analysis
end

Instance Method Details

#analyze(params) ⇒ Object



14
15
16
17
# File 'lib/elastic_record/index/analyze.rb', line 14

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