class Elasticband::Query::ScoreFunction::ScriptScore
Attributes
options[RW]
script[RW]
Public Class Methods
new(script, options = {})
click to toggle source
# File lib/elasticband/query/score_function/script_score.rb, line 7 def initialize(script, options = {}) self.script = script self.options = options end
Public Instance Methods
to_h()
click to toggle source
# File lib/elasticband/query/score_function/script_score.rb, line 12 def to_h { script_score: script_score_hash } end
Private Instance Methods
script_score_hash()
click to toggle source
# File lib/elasticband/query/score_function/script_score.rb, line 18 def script_score_hash { script: script }.merge!(options) end