Enum elasticsearch_dsl::search::sort::SortMode [−][src]
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
Pick the lowest value.
Pick the highest value.
Use the sum of all values as sort value.
Only applicable for number based array fields.
Use the average of all values as sort value.
Only applicable for number based array fields.
Use the median of all values as sort value.
Only applicable for number based array fields.
Trait Implementations
This method returns an ordering between self and other values if one exists. Read more
This method tests less than (for self and other) and is used by the < operator. Read more
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read more
This method tests greater than (for self and other) and is used by the > operator. Read more
Auto Trait Implementations
impl RefUnwindSafe for SortMode
impl UnwindSafe for SortMode
Blanket Implementations
Mutably borrows from an owned value. Read more