pub enum SortMode {
Min,
Max,
Sum,
Avg,
Median,
}
Expand description
Elasticsearch supports sorting by array or multi-valued fields. The mode
option controls what array value is picked for sorting the document it belongs to.
The default sort mode in the ascending sort order is min
— the lowest value is picked. The default sort mode in the descending order is max
— the highest value is picked.
Variants§
Min
Pick the lowest value.
Max
Pick the highest value.
Sum
Use the sum of all values as sort value.
Only applicable for number based array fields.
Avg
Use the average of all values as sort value.
Only applicable for number based array fields.
Median
Use the median of all values as sort value.
Only applicable for number based array fields.
Trait Implementations§
impl Copy for SortMode
impl Eq for SortMode
impl StructuralPartialEq for SortMode
Auto Trait Implementations§
impl Freeze for SortMode
impl RefUnwindSafe for SortMode
impl Send for SortMode
impl Sync for SortMode
impl Unpin for SortMode
impl UnwindSafe for SortMode
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