pub struct GeotileGridAggregation { /* private fields */ }
Expand description
A multi-bucket aggregation that groups geo_point and geo_shape values into buckets that represent a grid. The resulting grid can be sparse and only contains cells that have matching data. Each cell corresponds to a map tile as used by many online map sites. Each cell is labeled using a “{zoom}/{x}/{y}” format, where zoom is equal to the user-specified precision.
Implementations§
Source§impl GeotileGridAggregation
impl GeotileGridAggregation
Sourcepub fn size(self, size: u64) -> Self
pub fn size(self, size: u64) -> Self
The size
parameter can be set to define the maximum number of buckets to return.Defaults to 10,000.
When results are trimmed, buckets are prioritized based on the volume of documents they contain.
Sourcepub fn shard_size(self, shard_size: u64) -> Self
pub fn shard_size(self, shard_size: u64) -> Self
The shard_size
parameter limits the number of buckets returned from each shard.
Defaults to max(10,(size x number-of-shards)) to allow for a more accurate count of
the top cells in the final result.Since each shard could have a different top result order,
using a larger number here reduces the risk of inaccurate counts, but incurs a performance cost.
Sourcepub fn precision(self, precision: u8) -> Self
pub fn precision(self, precision: u8) -> Self
the precision
parameter is used to define cells/buckets in the results. Defaults to 7.
Values outside of [0,29] will be rejected.
Sourcepub fn bounds<T>(self, bounds: T) -> Selfwhere
T: Into<GeoBoundingBox>,
pub fn bounds<T>(self, bounds: T) -> Selfwhere
T: Into<GeoBoundingBox>,
the bounds
parameter defines the bounding box used to filter the geo-points or geo-shapes in each bucket.
Accepts the same bounding box formats as the GeoBoundingBoxQuery
Trait Implementations§
Source§impl Clone for GeotileGridAggregation
impl Clone for GeotileGridAggregation
Source§fn clone(&self) -> GeotileGridAggregation
fn clone(&self) -> GeotileGridAggregation
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more