Class: Arelastic::Queries::Exists
- Inherits:
-
Query
- Object
- Nodes::Node
- Query
- Arelastic::Queries::Exists
- Defined in:
- lib/arelastic/queries/exists.rb
Instance Attribute Summary collapse
-
#field ⇒ Object
readonly
Returns the value of attribute field.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Instance Method Summary collapse
- #as_elastic ⇒ Object
-
#initialize(field, options = {}) ⇒ Exists
constructor
Options: “null_value” => “null”.
Methods inherited from Query
#has_child, #has_parent, #negate, #nested
Methods inherited from Nodes::Node
#==, #convert_to_elastic, #read_option!
Methods included from Arities::Binary
Methods included from Arities::Polyadic
Methods included from Arities::Unary
Constructor Details
#initialize(field, options = {}) ⇒ Exists
Options:
"null_value" => "_null_"
8 9 10 11 |
# File 'lib/arelastic/queries/exists.rb', line 8 def initialize field, = {} @field = field @options = end |
Instance Attribute Details
#field ⇒ Object (readonly)
Returns the value of attribute field.
4 5 6 |
# File 'lib/arelastic/queries/exists.rb', line 4 def field @field end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
4 5 6 |
# File 'lib/arelastic/queries/exists.rb', line 4 def @options end |
Instance Method Details
#as_elastic ⇒ Object
13 14 15 16 |
# File 'lib/arelastic/queries/exists.rb', line 13 def as_elastic params = {"field" => field}.update() {"exists" => params} end |