Class: Sensei::TermsQuery

Inherits:
Query
  • Object
show all
Defined in:
lib/sensei/query.rb

Instance Attribute Summary

Attributes inherited from Query

#options

Instance Method Summary collapse

Methods inherited from Query

construct, #get_boost, #initialize, #not_query?, q, #run, #to_sensei

Methods included from Operators

#&, #*, #boost!, #must_not, #|, #~

Constructor Details

This class inherits a constructor from Sensei::Query

Instance Method Details

#to_hObject



135
136
137
# File 'lib/sensei/query.rb', line 135

def to_h
  {:terms => {options[:field] => {:values => options[:values].map(&:to_s)}.merge(get_boost)}}
end