Class: Elasticsearch::API::Response::ExplainNode
- Inherits:
-
Object
- Object
- Elasticsearch::API::Response::ExplainNode
- Defined in:
- lib/elasticsearch/api/response/explain_node.rb
Instance Attribute Summary collapse
-
#children ⇒ Object
Returns the value of attribute children.
-
#description ⇒ Object
readonly
Returns the value of attribute description.
-
#details ⇒ Object
readonly
Returns the value of attribute details.
-
#level ⇒ Object
readonly
Returns the value of attribute level.
-
#score ⇒ Object
readonly
Returns the value of attribute score.
Instance Method Summary collapse
- #boost? ⇒ Boolean
- #func? ⇒ Boolean
-
#initialize(score:, description:, details: [], level: 0) ⇒ ExplainNode
constructor
A new instance of ExplainNode.
- #match? ⇒ Boolean
- #match_all? ⇒ Boolean
- #max_boost? ⇒ Boolean
- #operator ⇒ Object
- #type ⇒ Object
Constructor Details
#initialize(score:, description:, details: [], level: 0) ⇒ ExplainNode
Returns a new instance of ExplainNode.
8 9 10 11 12 13 14 |
# File 'lib/elasticsearch/api/response/explain_node.rb', line 8 def initialize(score:, description:, details: [], level: 0) @score = score @description = description @details = details @level = level @children = [] end |
Instance Attribute Details
#children ⇒ Object
Returns the value of attribute children.
6 7 8 |
# File 'lib/elasticsearch/api/response/explain_node.rb', line 6 def children @children end |
#description ⇒ Object (readonly)
Returns the value of attribute description.
5 6 7 |
# File 'lib/elasticsearch/api/response/explain_node.rb', line 5 def description @description end |
#details ⇒ Object (readonly)
Returns the value of attribute details.
5 6 7 |
# File 'lib/elasticsearch/api/response/explain_node.rb', line 5 def details @details end |
#level ⇒ Object (readonly)
Returns the value of attribute level.
5 6 7 |
# File 'lib/elasticsearch/api/response/explain_node.rb', line 5 def level @level end |
#score ⇒ Object (readonly)
Returns the value of attribute score.
5 6 7 |
# File 'lib/elasticsearch/api/response/explain_node.rb', line 5 def score @score end |
Instance Method Details
#boost? ⇒ Boolean
36 37 38 |
# File 'lib/elasticsearch/api/response/explain_node.rb', line 36 def boost? type == "boost" end |
#func? ⇒ Boolean
24 25 26 |
# File 'lib/elasticsearch/api/response/explain_node.rb', line 24 def func? type == "func" end |
#match? ⇒ Boolean
28 29 30 |
# File 'lib/elasticsearch/api/response/explain_node.rb', line 28 def match? type == "match" end |
#match_all? ⇒ Boolean
32 33 34 |
# File 'lib/elasticsearch/api/response/explain_node.rb', line 32 def match_all? type == "match" && description.field == "*" && description.value == "*" end |
#max_boost? ⇒ Boolean
40 41 42 |
# File 'lib/elasticsearch/api/response/explain_node.rb', line 40 def max_boost? type == "maxBoost" end |
#operator ⇒ Object
16 17 18 |
# File 'lib/elasticsearch/api/response/explain_node.rb', line 16 def operator description.operator end |
#type ⇒ Object
20 21 22 |
# File 'lib/elasticsearch/api/response/explain_node.rb', line 20 def type description.type end |