pub enum SortMode {
Min,
Max,
Sum,
Avg,
Median,
}Expand description
OpenSearch 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
Source§impl<'de> Deserialize<'de> for SortMode
impl<'de> Deserialize<'de> for SortMode
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
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 UnsafeUnpin 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