Class: Enums::SortModes

Inherits:
Object
  • Object
show all
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

Class Method Details

.avgSortModes



# File 'lib/enums/sort_modes.rb', line 44


.maxSortModes



# File 'lib/enums/sort_modes.rb', line 34


.medianSortModes



# File 'lib/enums/sort_modes.rb', line 49


.minSortModes



# File 'lib/enums/sort_modes.rb', line 29


.sumSortModes



# File 'lib/enums/sort_modes.rb', line 39