Struct rs_es::operations::search::aggregations::Aggregations [] [src]

pub struct Aggregations<'a>(_);

The set of aggregations

There are many ways of creating aggregations, either standalone or via a conversion trait

Methods

impl<'a> Aggregations<'a>

fn new() -> Aggregations<'a>

Create an empty-set of aggregations, individual aggregations should be added via the add method

Examples

use rs_es::operations::search::aggregations::{Aggregations, Min};

let mut aggs = Aggregations::new();
aggs.add("agg_name", Min::new("field_name"));

fn add<A: Into<Aggregation<'a>>>(&mut self, key: &'a str, val: A)

Add an aggregation to the set of aggregations

Trait Implementations

impl<'b> From<Vec<(&'b str, Aggregation<'b>)>> for Aggregations<'b>

fn from(from: Vec<(&'b str, Aggregation<'b>)>) -> Aggregations<'b>

impl<'a, A: Into<Aggregation<'a>>> From<(&'a str, A)> for Aggregations<'a>

fn from(from: (&'a str, A)) -> Aggregations<'a>

impl<'a> ToJson for Aggregations<'a>

fn to_json(&self) -> Json

Derived Implementations

impl<'a> Debug for Aggregations<'a>

fn fmt(&self, __arg_0: &mut Formatter) -> Result