Class: Sunspot::Query::Restriction::InBoundingBox

Inherits:
Base
  • Object
show all
Defined in:
lib/sunspot/query/restriction.rb

Constant Summary

Constants inherited from Base

Base::RESERVED_WORDS

Instance Method Summary collapse

Methods inherited from Base

#negate, #negated?, #to_boolean_phrase, #to_negated_boolean_phrase, #to_params, #to_positive_boolean_phrase

Methods included from Filter

#tag, #to_filter_query

Constructor Details

#initialize(negated, field, first_corner, second_corner) ⇒ InBoundingBox

Returns a new instance of InBoundingBox.



177
178
179
180
# File 'lib/sunspot/query/restriction.rb', line 177

def initialize(negated, field, first_corner, second_corner)
  @bbox = Sunspot::Query::Bbox.new(field, first_corner, second_corner)
  super negated, field, [first_corner, second_corner]
end

Instance Method Details

#to_solr_conditionalObject



182
183
184
# File 'lib/sunspot/query/restriction.rb', line 182

def to_solr_conditional
  @bbox.to_solr_conditional
end