Class: Elasticband::Query::ScoreFunction::ScriptScore
- Inherits:
-
Elasticband::Query::ScoreFunction
- Object
- Elasticband::Query::ScoreFunction
- Elasticband::Query::ScoreFunction::ScriptScore
- Defined in:
- lib/elasticband/query/score_function/script_score.rb
Instance Attribute Summary collapse
-
#options ⇒ Object
Returns the value of attribute options.
-
#script ⇒ Object
Returns the value of attribute script.
Instance Method Summary collapse
-
#initialize(script, options = {}) ⇒ ScriptScore
constructor
A new instance of ScriptScore.
- #to_h ⇒ Object
Constructor Details
#initialize(script, options = {}) ⇒ ScriptScore
Returns a new instance of ScriptScore.
7 8 9 10 |
# File 'lib/elasticband/query/score_function/script_score.rb', line 7 def initialize(script, = {}) self.script = script self. = end |
Instance Attribute Details
#options ⇒ Object
Returns the value of attribute options.
5 6 7 |
# File 'lib/elasticband/query/score_function/script_score.rb', line 5 def @options end |
#script ⇒ Object
Returns the value of attribute script.
5 6 7 |
# File 'lib/elasticband/query/score_function/script_score.rb', line 5 def script @script end |
Instance Method Details
#to_h ⇒ Object
12 13 14 |
# File 'lib/elasticband/query/score_function/script_score.rb', line 12 def to_h { script_score: script_score_hash } end |