Class: Aggregations::Buckets::GeoGridAggregationBuilder
- Inherits:
-
Object
- Object
- Aggregations::Buckets::GeoGridAggregationBuilder
- Includes:
- Helpers::AbstractAggregationHelper, Helpers::AggregationQueryBuilderHelper, Helpers::ValuesSourceAggregationHelper, AttributesReader
- Defined in:
- lib/aggregations/buckets/geo_grid_aggregation_builder.rb
Overview
Elasticsearch GeoHash grid Aggregation
Constant Summary collapse
- ATTRIBUTES =
[:size, :precision]
Constants included from Helpers::AggregationQueryBuilderHelper
Helpers::AggregationQueryBuilderHelper::OBJECT_ARRAY_QUERY_FIELDS, Helpers::AggregationQueryBuilderHelper::OBJECT_ARRAY_SETTINGS_FIELDS
Instance Method Summary collapse
-
#initialize(name:) ⇒ GeoGridAggregationBuilder
constructor
A new instance of GeoGridAggregationBuilder.
- #precision(precision) ⇒ GeoGridAggregationBuilder
- #precision_expr ⇒ Integer
- #size(size) ⇒ GeoGridAggregationBuilder
- #size_expr ⇒ Integer
Methods included from AttributesReader
Methods included from Helpers::AggregationQueryBuilderHelper
#name_expr, #query, #type_expr
Methods included from Helpers::AbstractAggregationHelper
#abstract_agg_builder, #sub_aggregation, #sub_aggregation_expr
Methods included from Helpers::ValuesSourceAggregationHelper
#field, #field_expr, #missing, #missing_expr, #script, #script_expr, #value_source_agg_builder
Constructor Details
#initialize(name:) ⇒ GeoGridAggregationBuilder
Returns a new instance of GeoGridAggregationBuilder.
14 15 16 17 18 19 20 21 22 |
# File 'lib/aggregations/buckets/geo_grid_aggregation_builder.rb', line 14 def initialize name: @name = name.intern @type = :geohash_grid @query = { @name => { @type => {} } } end |
Instance Method Details
#precision(precision) ⇒ GeoGridAggregationBuilder
38 39 40 41 |
# File 'lib/aggregations/buckets/geo_grid_aggregation_builder.rb', line 38 def precision precision @precision = precision self end |
#precision_expr ⇒ Integer
44 45 46 |
# File 'lib/aggregations/buckets/geo_grid_aggregation_builder.rb', line 44 def precision_expr @precision end |
#size(size) ⇒ GeoGridAggregationBuilder
26 27 28 29 |
# File 'lib/aggregations/buckets/geo_grid_aggregation_builder.rb', line 26 def size size @size = size self end |
#size_expr ⇒ Integer
32 33 34 |
# File 'lib/aggregations/buckets/geo_grid_aggregation_builder.rb', line 32 def size_expr @size end |