Class: Enums::SortModes
- Inherits:
-
Object
- Object
- Enums::SortModes
- Defined in:
- lib/enums/sort_modes.rb
Overview
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.
Class Method Summary collapse
-
.avg ⇒ SortModes
SortModes object corresponding to elasticsearch option of ‘avg’.
-
.max ⇒ SortModes
SortModes object corresponding to elasticsearch option of ‘max’.
-
.median ⇒ SortModes
SortModes object corresponding to elasticsearch option of ‘median’.
-
.min ⇒ SortModes
SortModes object corresponding to elasticsearch option of ‘min’.
-
.sum ⇒ SortModes
SortModes object corresponding to elasticsearch option of ‘sum’.
Class Method Details
.avg ⇒ SortModes
Returns SortModes object corresponding to elasticsearch option of ‘avg’.
|
# File 'lib/enums/sort_modes.rb', line 44
|
.max ⇒ SortModes
Returns SortModes object corresponding to elasticsearch option of ‘max’.
|
# File 'lib/enums/sort_modes.rb', line 34
|
.median ⇒ SortModes
Returns SortModes object corresponding to elasticsearch option of ‘median’.
|
# File 'lib/enums/sort_modes.rb', line 49
|
.min ⇒ SortModes
Returns SortModes object corresponding to elasticsearch option of ‘min’.
|
# File 'lib/enums/sort_modes.rb', line 29
|
.sum ⇒ SortModes
Returns SortModes object corresponding to elasticsearch option of ‘sum’.
|
# File 'lib/enums/sort_modes.rb', line 39
|