Struct rs_es::operations::search::aggregations::bucket::Order
[−]
[src]
pub struct Order<'a>(_, _);
Used to define the ordering of buckets in a some bucketted aggregations
Examples
use rs_es::operations::search::aggregations::bucket::{Order, OrderKey}; let order1 = Order::asc(OrderKey::Count); let order2 = Order::desc("field_name");
The first will produce a JSON fragment: {"_count": "asc"}
; the second will
produce a JSON fragment: {"field_name", "desc"}
Methods
impl<'a> Order<'a>
[src]
fn asc<O: Into<OrderKey<'a>>>(key: O) -> Order<'a>
Create an Order
ascending
fn desc<O: Into<OrderKey<'a>>>(key: O) -> Order<'a>
Create an Order
descending
Trait Implementations
impl<'a> Debug for Order<'a>
[src]
impl<'a> Serialize for Order<'a>
[src]
fn serialize<S>(&self, serializer: &mut S) -> Result<(), S::Error> where S: Serializer
Serializes this value into this serializer.