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 moresource§impl Debug for GeotileGridAggregation
impl Debug for GeotileGridAggregation
source§impl From<GeotileGridAggregation> for Aggregation
impl From<GeotileGridAggregation> for Aggregation
source§fn from(q: GeotileGridAggregation) -> Self
fn from(q: GeotileGridAggregation) -> Self
source§impl PartialEq for GeotileGridAggregation
impl PartialEq for GeotileGridAggregation
source§impl Serialize for GeotileGridAggregation
impl Serialize for GeotileGridAggregation
impl StructuralPartialEq for GeotileGridAggregation
Auto Trait Implementations§
impl Freeze for GeotileGridAggregation
impl RefUnwindSafe for GeotileGridAggregation
impl Send for GeotileGridAggregation
impl Sync for GeotileGridAggregation
impl Unpin for GeotileGridAggregation
impl UnwindSafe for GeotileGridAggregation
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit)