pub enum Aggregation {
Show 18 variants
Terms(TermsAggregation),
TopHits(TopHitsAggregation),
Cardinality(CardinalityAggregation),
Avg(AvgAggregation),
Max(MaxAggregation),
Min(MinAggregation),
Sum(SumAggregation),
Rate(RateAggregation),
Sampler(SamplerAggregation),
Filter(FilterAggregation),
DiversifiedSampler(DiversifiedSamplerAggregation),
Boxplot(BoxplotAggregation),
DateHistogram(DateHistogramAggregation),
GeotileGrid(GeotileGridAggregation),
BucketSelector(BucketSelectorAggregation),
Children(ChildrenAggregation),
Composite(CompositeAggregation),
Nested(NestedAggregation),
}
Expand description
A container enum for supported Elasticsearch query types
Variants§
Terms(TermsAggregation)
TopHits(TopHitsAggregation)
Cardinality(CardinalityAggregation)
Avg(AvgAggregation)
Max(MaxAggregation)
Min(MinAggregation)
Sum(SumAggregation)
Rate(RateAggregation)
Sampler(SamplerAggregation)
Filter(FilterAggregation)
DiversifiedSampler(DiversifiedSamplerAggregation)
Boxplot(BoxplotAggregation)
DateHistogram(DateHistogramAggregation)
GeotileGrid(GeotileGridAggregation)
BucketSelector(BucketSelectorAggregation)
Children(ChildrenAggregation)
Composite(CompositeAggregation)
Nested(NestedAggregation)
Implementations§
Source§impl Aggregation
impl Aggregation
Sourcepub fn bucket_selector<B, S>(
buckets_path: B,
script: S,
) -> BucketSelectorAggregation
pub fn bucket_selector<B, S>( buckets_path: B, script: S, ) -> BucketSelectorAggregation
Creates an instance of BucketSelectorAggregation
buckets_path
- the path to the buckets to filterscript
- the script to execute for filtering
Source§impl Aggregation
impl Aggregation
Sourcepub fn children<T>(type_: T) -> ChildrenAggregationwhere
T: ToString,
pub fn children<T>(type_: T) -> ChildrenAggregationwhere
T: ToString,
Creates an instance of ChildrenAggregation
type_
- type of the child documents
Source§impl Aggregation
impl Aggregation
Sourcepub fn composite(sources: Vec<CompositeSource>) -> CompositeAggregation
pub fn composite(sources: Vec<CompositeSource>) -> CompositeAggregation
Creates an instance of CompositeAggregation
sources
- A vector ofCompositeSource
which defines the sources for the composite aggregation.
Source§impl Aggregation
impl Aggregation
Sourcepub fn date_histogram<T>(field: T) -> DateHistogramAggregationwhere
T: ToString,
pub fn date_histogram<T>(field: T) -> DateHistogramAggregationwhere
T: ToString,
Creates an instance of DateHistogramAggregation
field
- field to group by
Source§impl Aggregation
impl Aggregation
Sourcepub fn diversified_sampler<T>(field: T) -> DiversifiedSamplerAggregationwhere
T: ToString,
pub fn diversified_sampler<T>(field: T) -> DiversifiedSamplerAggregationwhere
T: ToString,
Creates an instance of DiversifiedSamplerAggregation
Source§impl Aggregation
impl Aggregation
Sourcepub fn filter<Q>(query: Q) -> FilterAggregation
pub fn filter<Q>(query: Q) -> FilterAggregation
Creates an instance of FilterAggregation
query
- query to filter by
Source§impl Aggregation
impl Aggregation
Sourcepub fn geotile_grid<T>(field: T) -> GeotileGridAggregationwhere
T: ToString,
pub fn geotile_grid<T>(field: T) -> GeotileGridAggregationwhere
T: ToString,
Creates an instance of GeotileGridAggregation
field
- field to group by
Source§impl Aggregation
impl Aggregation
Sourcepub fn nested(path: &str) -> NestedAggregation
pub fn nested(path: &str) -> NestedAggregation
Creates an instance of NestedAggregation
path
- The nested path to aggregate.
Source§impl Aggregation
impl Aggregation
Sourcepub fn sampler() -> SamplerAggregation
pub fn sampler() -> SamplerAggregation
Creates an instance of SamplerAggregation
Source§impl Aggregation
impl Aggregation
Sourcepub fn terms<T>(field: T) -> TermsAggregationwhere
T: ToString,
pub fn terms<T>(field: T) -> TermsAggregationwhere
T: ToString,
Creates an instance of TermsAggregation
field
- field to group by
Sourcepub fn terms_with_script(script: Script) -> TermsAggregation
pub fn terms_with_script(script: Script) -> TermsAggregation
Creates an instance of TermsAggregation
with a script
Source§impl Aggregation
impl Aggregation
Sourcepub fn avg<T>(field: T) -> AvgAggregationwhere
T: ToString,
pub fn avg<T>(field: T) -> AvgAggregationwhere
T: ToString,
Creates an instance of AvgAggregation
field
- field to aggregate
Source§impl Aggregation
impl Aggregation
Sourcepub fn boxplot<T>(field: T) -> BoxplotAggregationwhere
T: ToString,
pub fn boxplot<T>(field: T) -> BoxplotAggregationwhere
T: ToString,
Creates an instance of BoxplotAggregation
field
- field to aggregate
Source§impl Aggregation
impl Aggregation
Sourcepub fn cardinality<T>(field: T) -> CardinalityAggregationwhere
T: ToString,
pub fn cardinality<T>(field: T) -> CardinalityAggregationwhere
T: ToString,
Creates an instance of CardinalityAggregation
field
- field to aggregate
Source§impl Aggregation
impl Aggregation
Sourcepub fn max<T>(field: T) -> MaxAggregationwhere
T: ToString,
pub fn max<T>(field: T) -> MaxAggregationwhere
T: ToString,
Creates an instance of MaxAggregation
field
- field to aggregate
Sourcepub fn max_script(script: Script) -> MaxAggregation
pub fn max_script(script: Script) -> MaxAggregation
Creates an instance of MaxAggregation
script
- script to aggregate
Source§impl Aggregation
impl Aggregation
Sourcepub fn min<T>(field: T) -> MinAggregationwhere
T: ToString,
pub fn min<T>(field: T) -> MinAggregationwhere
T: ToString,
Creates an instance of MinAggregation
field
- field to aggregate
Sourcepub fn min_script(script: Script) -> MinAggregation
pub fn min_script(script: Script) -> MinAggregation
Creates an instance of MinAggregation
script
- script to aggregate
Source§impl Aggregation
impl Aggregation
Sourcepub fn rate() -> RateAggregation
pub fn rate() -> RateAggregation
Creates an instance of RateAggregation
Source§impl Aggregation
impl Aggregation
Sourcepub fn sum<T>(field: T) -> SumAggregationwhere
T: ToString,
pub fn sum<T>(field: T) -> SumAggregationwhere
T: ToString,
Creates an instance of SumAggregation
field
- field to aggregate
Sourcepub fn sum_script(script: Script) -> SumAggregation
pub fn sum_script(script: Script) -> SumAggregation
Creates an instance of SumAggregation
script
- script to aggregate
Source§impl Aggregation
impl Aggregation
Sourcepub fn top_hits() -> TopHitsAggregation
pub fn top_hits() -> TopHitsAggregation
Creates an instance of TopHitsAggregation
Trait Implementations§
Source§impl Clone for Aggregation
impl Clone for Aggregation
Source§fn clone(&self) -> Aggregation
fn clone(&self) -> Aggregation
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more