class Arelastic::Queries::GeoBoundingBox

Attributes

bounds[RW]
field[RW]
options[RW]

Public Class Methods

new(field, bounds, options = {}) click to toggle source
# File lib/arelastic/queries/geo_bounding_box.rb, line 5
def initialize(field, bounds, options = {})
  @field    = field
  @bounds   = bounds
  @options  = options
end

Public Instance Methods

as_elastic() click to toggle source
# File lib/arelastic/queries/geo_bounding_box.rb, line 11
def as_elastic
  params = {field => bounds}.update(options)

  { "geo_bounding_box" => params }
end