Class: Arelastic::Filters::Missing
- Inherits:
-
Filter
- Object
- Nodes::Node
- Queries::Query
- Filter
- Arelastic::Filters::Missing
- Defined in:
- lib/arelastic/filters/missing.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 = {}) ⇒ Missing
constructor
Options: “existence” => true defaults to true “null_value” => true defaults to false.
Methods inherited from Filter
Methods inherited from Queries::Query
Methods inherited from Nodes::Node
Methods included from Arities::Binary
Methods included from Arities::Polyadic
Methods included from Arities::Unary
Constructor Details
#initialize(field, options = {}) ⇒ Missing
Options:
"existence" => true defaults to true
"null_value" => true defaults to false
9 10 11 12 |
# File 'lib/arelastic/filters/missing.rb', line 9 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/filters/missing.rb', line 4 def field @field end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
4 5 6 |
# File 'lib/arelastic/filters/missing.rb', line 4 def @options end |
Instance Method Details
#as_elastic ⇒ Object
14 15 16 17 |
# File 'lib/arelastic/filters/missing.rb', line 14 def as_elastic params = {"field" => field}.update() {"missing" => params} end |