class Elasticband::Query::ScoreFunction::Filtered

Attributes

filter[RW]
options[RW]
score_function[RW]

Public Class Methods

new(filter, score_function, options = {}) click to toggle source
# File lib/elasticband/query/score_function/filtered.rb, line 7
def initialize(filter, score_function, options = {})
  self.filter = filter
  self.score_function = score_function
  self.options = options
end

Public Instance Methods

to_h() click to toggle source
# File lib/elasticband/query/score_function/filtered.rb, line 13
def to_h
  { filter: filter.to_h }.merge!(score_function.to_h).merge(options)
end