module ElasticQueue::Sorts

Public Instance Methods

options_to_sorts(options) click to toggle source
# File lib/elastic_queue/sorts.rb, line 5
def options_to_sorts(options)
  options.map { |k, v| option_to_sort(k, v) }
end

Private Instance Methods

option_to_sort(key, value) click to toggle source
# File lib/elastic_queue/sorts.rb, line 11
def option_to_sort(key, value)
  single_sort(key, value)
end
single_sort(order_by, order) click to toggle source
# File lib/elastic_queue/sorts.rb, line 15
def single_sort(order_by, order)
  { order_by => { order: order, ignore_unmapped: true } }
end