class OpenSearch::DSL::Search::Filters::GeohashCell

A filter which translates lat/lon values into a geohash with the specified precision and returns all documents which fall into it

@example

search do
  query do
    filtered do
      filter do
        geohash_cell :location do
          lat '50.090223'
          lon '14.399590'
          precision '5km'
          neighbors true
        end
      end
    end
  end
end

See the integration test for a working example.

@see opensearch.org/guide/en/opensearch/guide/current/geohash-cell-filter.html

Public Class Methods

new(*args, &block) click to toggle source
# File lib/opensearch/dsl/search/filters/geohash_cell.rb, line 64
def initialize(*args, &block)
  super
  @hash[self.name.to_sym] = { @args => {} } unless @args.empty?
end