Class: OpenSearch::DSL::Search::Filters::GeohashCell
- Inherits:
-
Object
- Object
- OpenSearch::DSL::Search::Filters::GeohashCell
- Includes:
- BaseComponent
- Defined in:
- lib/opensearch/dsl/search/filters/geohash_cell.rb
Overview
A filter which translates lat/lon values into a geohash with the specified precision and returns all documents which fall into it
See the integration test for a working example.
Instance Method Summary collapse
-
#initialize(*args, &block) ⇒ GeohashCell
constructor
A new instance of GeohashCell.
Methods included from BaseComponent
Constructor Details
#initialize(*args, &block) ⇒ GeohashCell
Returns a new instance of GeohashCell.
64 65 66 67 |
# 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 |