Class: Elasticsearch::Model::Response::Suggestions

Inherits:
HashWrapper
  • Object
show all
Defined in:
lib/elasticsearch/model/response/suggestions.rb

Instance Method Summary collapse

Instance Method Details

#termsObject



25
26
27
# File 'lib/elasticsearch/model/response/suggestions.rb', line 25

def terms
  self.to_a.map { |k,v| v.first['options'] }.flatten.map {|v| v['text']}.uniq
end