pub enum Aggregation {
Show 13 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),
}
Expand description

A container enum for supported Elasticsearch query types

Variants§

Implementations§

source§

impl Aggregation

source

pub fn date_histogram<T>(field: T) -> DateHistogramAggregation
where T: ToString,

Creates an instance of DateHistogramAggregation

  • field - field to group by
source§

impl Aggregation

source§

impl Aggregation

source

pub fn filter<Q>(query: Q) -> FilterAggregation
where Q: Into<Query>,

Creates an instance of FilterAggregation

  • query - query to filter by
source§

impl Aggregation

source

pub fn sampler() -> SamplerAggregation

Creates an instance of SamplerAggregation

source§

impl Aggregation

source

pub fn terms<T>(field: T) -> TermsAggregation
where T: ToString,

Creates an instance of TermsAggregation

  • field - field to group by
source§

impl Aggregation

source

pub fn avg<T>(field: T) -> AvgAggregation
where T: ToString,

Creates an instance of AvgAggregation

  • field - field to aggregate
source§

impl Aggregation

source

pub fn boxplot<T>(field: T) -> BoxplotAggregation
where T: ToString,

Creates an instance of BoxplotAggregation

  • field - field to aggregate
source§

impl Aggregation

source

pub fn cardinality<T>(field: T) -> CardinalityAggregation
where T: ToString,

Creates an instance of CardinalityAggregation

  • field - field to aggregate
source§

impl Aggregation

source

pub fn max<T>(field: T) -> MaxAggregation
where T: ToString,

Creates an instance of MaxAggregation

  • field - field to aggregate
source

pub fn max_script(script: Script) -> MaxAggregation

Creates an instance of MaxAggregation

  • script - script to aggregate
source§

impl Aggregation

source

pub fn min<T>(field: T) -> MinAggregation
where T: ToString,

Creates an instance of MinAggregation

  • field - field to aggregate
source

pub fn min_script(script: Script) -> MinAggregation

Creates an instance of MinAggregation

  • script - script to aggregate
source§

impl Aggregation

source

pub fn rate() -> RateAggregation

Creates an instance of RateAggregation

source§

impl Aggregation

source

pub fn sum<T>(field: T) -> SumAggregation
where T: ToString,

Creates an instance of SumAggregation

  • field - field to aggregate
source

pub fn sum_script(script: Script) -> SumAggregation

Creates an instance of SumAggregation

  • script - script to aggregate
source§

impl Aggregation

source

pub fn top_hits() -> TopHitsAggregation

Creates an instance of TopHitsAggregation

Trait Implementations§

source§

impl Clone for Aggregation

source§

fn clone(&self) -> Aggregation

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Aggregation

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl From<AvgAggregation> for Aggregation

source§

fn from(q: AvgAggregation) -> Self

Converts to this type from the input type.
source§

impl From<BoxplotAggregation> for Aggregation

source§

fn from(q: BoxplotAggregation) -> Self

Converts to this type from the input type.
source§

impl From<CardinalityAggregation> for Aggregation

source§

fn from(q: CardinalityAggregation) -> Self

Converts to this type from the input type.
source§

impl From<DateHistogramAggregation> for Aggregation

source§

fn from(q: DateHistogramAggregation) -> Self

Converts to this type from the input type.
source§

impl From<DiversifiedSamplerAggregation> for Aggregation

source§

fn from(q: DiversifiedSamplerAggregation) -> Self

Converts to this type from the input type.
source§

impl From<FilterAggregation> for Aggregation

source§

fn from(q: FilterAggregation) -> Self

Converts to this type from the input type.
source§

impl From<MaxAggregation> for Aggregation

source§

fn from(q: MaxAggregation) -> Self

Converts to this type from the input type.
source§

impl From<MinAggregation> for Aggregation

source§

fn from(q: MinAggregation) -> Self

Converts to this type from the input type.
source§

impl From<RateAggregation> for Aggregation

source§

fn from(q: RateAggregation) -> Self

Converts to this type from the input type.
source§

impl From<SamplerAggregation> for Aggregation

source§

fn from(q: SamplerAggregation) -> Self

Converts to this type from the input type.
source§

impl From<SumAggregation> for Aggregation

source§

fn from(q: SumAggregation) -> Self

Converts to this type from the input type.
source§

impl From<TermsAggregation> for Aggregation

source§

fn from(q: TermsAggregation) -> Self

Converts to this type from the input type.
source§

impl From<TopHitsAggregation> for Aggregation

source§

fn from(q: TopHitsAggregation) -> Self

Converts to this type from the input type.
source§

impl PartialEq for Aggregation

source§

fn eq(&self, other: &Aggregation) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Serialize for Aggregation

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl StructuralPartialEq for Aggregation

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.