Class: Sensei::UIDQuery

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, #not_query?, q, #run, #to_sensei

Methods included from Operators

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

Constructor Details

#initialize(uids) ⇒ UIDQuery

Returns a new instance of UIDQuery.



191
192
193
194
# File 'lib/sensei/query.rb', line 191

def initialize(uids)
  uids = [uids] unless uids.is_a?(Array)
  @uids = uids
end

Instance Method Details

#to_hObject



195
196
197
# File 'lib/sensei/query.rb', line 195

def to_h
  {:ids => {:values => @uids}}
end