Class: Sunspot::Query::Bbox
- Inherits:
-
Object
- Object
- Sunspot::Query::Bbox
- Defined in:
- lib/sunspot/query/bbox.rb
Instance Method Summary collapse
-
#initialize(field, first_corner, second_corner) ⇒ Bbox
constructor
A new instance of Bbox.
- #to_params ⇒ Object
Constructor Details
#initialize(field, first_corner, second_corner) ⇒ Bbox
Returns a new instance of Bbox.
4 5 6 |
# File 'lib/sunspot/query/bbox.rb', line 4 def initialize(field, first_corner, second_corner) @field, @first_corner, @second_corner = field, first_corner, second_corner end |
Instance Method Details
#to_params ⇒ Object
8 9 10 11 12 |
# File 'lib/sunspot/query/bbox.rb', line 8 def to_params filter = "#{@field.indexed_name}:[#{@first_corner.join(",")} TO #{@second_corner.join(",")}]" {:fq => filter} end |