Enum Aggregation

Source
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§

Implementations§

Source§

impl Aggregation

Source

pub fn bucket_selector<B, S>( buckets_path: B, script: S, ) -> BucketSelectorAggregation
where B: Into<BucketsPath>, S: Into<Script>,

Creates an instance of BucketSelectorAggregation

  • buckets_path - the path to the buckets to filter
  • script - the script to execute for filtering
Source§

impl Aggregation

Source

pub fn children<T>(type_: T) -> ChildrenAggregation
where T: ToString,

Creates an instance of ChildrenAggregation

  • type_ - type of the child documents
Source§

impl Aggregation

Source

pub fn composite(sources: Vec<CompositeSource>) -> CompositeAggregation

Creates an instance of CompositeAggregation

  • sources - A vector of CompositeSource which defines the sources for the composite aggregation.
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 geotile_grid<T>(field: T) -> GeotileGridAggregation
where T: ToString,

Creates an instance of GeotileGridAggregation

  • field - field to group by
Source§

impl Aggregation

Source

pub fn nested(path: &str) -> NestedAggregation

Creates an instance of NestedAggregation

  • path - The nested path to aggregate.
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

pub fn terms_with_script(script: Script) -> TermsAggregation

Creates an instance of TermsAggregation with a script

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<BucketSelectorAggregation> for Aggregation

Source§

fn from(q: BucketSelectorAggregation) -> 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<ChildrenAggregation> for Aggregation

Source§

fn from(q: ChildrenAggregation) -> Self

Converts to this type from the input type.
Source§

impl From<CompositeAggregation> for Aggregation

Source§

fn from(q: CompositeAggregation) -> 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<GeotileGridAggregation> for Aggregation

Source§

fn from(q: GeotileGridAggregation) -> 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<NestedAggregation> for Aggregation

Source§

fn from(q: NestedAggregation) -> 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

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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,

Source§

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>,

Source§

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>,

Source§

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.