Class: Arelastic::Filters::GeoBoundingBox
- Inherits:
-
Filter
- Object
- Nodes::Node
- Queries::Query
- Filter
- Arelastic::Filters::GeoBoundingBox
- Defined in:
- lib/arelastic/filters/geo_bounding_box.rb
Instance Attribute Summary collapse
-
#bounds ⇒ Object
Returns the value of attribute bounds.
-
#field ⇒ Object
Returns the value of attribute field.
-
#options ⇒ Object
Returns the value of attribute options.
Instance Method Summary collapse
- #as_elastic ⇒ Object
-
#initialize(field, bounds, options = {}) ⇒ GeoBoundingBox
constructor
A new instance of GeoBoundingBox.
Methods inherited from Filter
Methods inherited from Queries::Query
Methods inherited from Nodes::Node
Methods included from Arities::Binary
Methods included from Arities::Polyadic
Methods included from Arities::Unary
Constructor Details
#initialize(field, bounds, options = {}) ⇒ GeoBoundingBox
Returns a new instance of GeoBoundingBox.
5 6 7 8 9 |
# File 'lib/arelastic/filters/geo_bounding_box.rb', line 5 def initialize(field, bounds, = {}) @field = field @bounds = bounds @options = end |
Instance Attribute Details
#bounds ⇒ Object
Returns the value of attribute bounds.
4 5 6 |
# File 'lib/arelastic/filters/geo_bounding_box.rb', line 4 def bounds @bounds end |
#field ⇒ Object
Returns the value of attribute field.
4 5 6 |
# File 'lib/arelastic/filters/geo_bounding_box.rb', line 4 def field @field end |
#options ⇒ Object
Returns the value of attribute options.
4 5 6 |
# File 'lib/arelastic/filters/geo_bounding_box.rb', line 4 def @options end |
Instance Method Details
#as_elastic ⇒ Object
11 12 13 14 15 |
# File 'lib/arelastic/filters/geo_bounding_box.rb', line 11 def as_elastic params = {field => bounds}.update() { "geo_bounding_box" => params } end |