class Enums::SortModes
Elasticsearch supports sorting by array or multi-valued fields. The SortMode option controls what array value is picked for sorting the document it belongs to. The mode option can have the following values:
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.
Constants
- SORT_MODES
@!visibility protected
Attributes
sort_mode[R]
@!visibility protected
Public Class Methods
new(sort_mode)
click to toggle source
@!visibility protected
# File lib/enums/sort_modes.rb, line 55 def initialize(sort_mode) @sort_mode = sort_mode end