pub enum AggregationExpression {
Show 22 variants
Avg {
field: String,
},
Sum {
field: String,
},
Min {
field: String,
},
Max {
field: String,
},
ValueCount {
field: String,
},
Stats {
field: String,
},
ExtendedStats {
field: String,
},
Cardinality {
field: String,
precision_threshold: u32,
},
Percentiles {
field: String,
percents: Vec<f64>,
compression: f64,
},
GeoBounds {
field: String,
},
GeoCentroid {
field: String,
},
TopHits {
size: usize,
},
Terms {
field: String,
size: usize,
sub_aggs: Vec<(String, AggregationExpression)>,
},
Range {
field: String,
ranges: Vec<RangeDef>,
sub_aggs: Vec<(String, AggregationExpression)>,
},
Histogram {
field: String,
interval: f64,
sub_aggs: Vec<(String, AggregationExpression)>,
},
DateHistogram {
field: String,
interval: DateInterval,
sub_aggs: Vec<(String, AggregationExpression)>,
},
DateRange {
field: String,
ranges: Vec<RangeDef>,
sub_aggs: Vec<(String, AggregationExpression)>,
},
Filter {
query: ScoringExpression,
sub_aggs: Vec<(String, AggregationExpression)>,
},
Filters {
filters: Vec<(String, ScoringExpression)>,
sub_aggs: Vec<(String, AggregationExpression)>,
},
Nested {
path: String,
sub_aggs: Vec<(String, AggregationExpression)>,
},
ReverseNested {
sub_aggs: Vec<(String, AggregationExpression)>,
},
GeohashGrid {
field: String,
precision: usize,
size: usize,
sub_aggs: Vec<(String, AggregationExpression)>,
},
}Expand description
A composable aggregation expression. The engine’s native representation.
JSON is parsed into this at the edge. Analogous to ScoringExpression.
bind() produces an AggregatorFactory for execution, analogous to
ScoringExpression::bind() producing a BoundQuery.
See [[architecture-aggregation-expression]].
Variants§
Avg
Sum
Min
Max
ValueCount
Stats
ExtendedStats
Cardinality
Percentiles
GeoBounds
GeoCentroid
TopHits
Terms
Range
Histogram
DateHistogram
DateRange
Filter
Filters
Nested
ReverseNested
Fields
§
sub_aggs: Vec<(String, AggregationExpression)>GeohashGrid
Trait Implementations§
Source§impl Clone for AggregationExpression
impl Clone for AggregationExpression
Source§fn clone(&self) -> AggregationExpression
fn clone(&self) -> AggregationExpression
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for AggregationExpression
impl RefUnwindSafe for AggregationExpression
impl Send for AggregationExpression
impl Sync for AggregationExpression
impl Unpin for AggregationExpression
impl UnsafeUnpin for AggregationExpression
impl UnwindSafe for AggregationExpression
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more