Class: Elasticsearch::DSL::Search::Filters::GeohashCell
- Inherits:
-
Object
- Object
- Elasticsearch::DSL::Search::Filters::GeohashCell
- Includes:
- BaseComponent
- Defined in:
- lib/elasticsearch/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.
55 56 57 58 |
# File 'lib/elasticsearch/dsl/search/filters/geohash_cell.rb', line 55 def initialize(*args, &block) super @hash[self.name.to_sym] = { @args => {} } unless @args.empty? end |