Class: Elasticated::MissingAggregation
- Inherits:
-
SingleValueAggregation
- Object
- Aggregation
- SingleValueAggregation
- Elasticated::MissingAggregation
- Includes:
- Subaggregated
- Defined in:
- lib/elasticated/aggregations/missing_aggregation.rb
Instance Attribute Summary collapse
-
#compact ⇒ Object
Returns the value of attribute compact.
Attributes included from Subaggregated
Attributes inherited from Aggregation
#alias_name, #extra_params, #field
Instance Method Summary collapse
-
#build ⇒ Object
TODO: this is exactly the same as in GroupAggregation.
-
#initialize(field, *args, &block) ⇒ MissingAggregation
constructor
A new instance of MissingAggregation.
-
#operation ⇒ Object
implementation.
- #parse(response) ⇒ Object
Methods included from Subaggregated
Methods inherited from SingleValueAggregation
Methods inherited from Aggregation
Methods included from Elasticated::Mixins::Inspectionable
Methods included from Elasticated::Mixins::BlockEvaluation
Methods included from Elasticated::Mixins::Clonable
Constructor Details
#initialize(field, *args, &block) ⇒ MissingAggregation
Returns a new instance of MissingAggregation.
7 8 9 10 11 |
# File 'lib/elasticated/aggregations/missing_aggregation.rb', line 7 def initialize(field, *args, &block) super self.compact = extra_params.delete(:compact) { false } initialize_subaggregations &block end |
Instance Attribute Details
#compact ⇒ Object
Returns the value of attribute compact.
5 6 7 |
# File 'lib/elasticated/aggregations/missing_aggregation.rb', line 5 def compact @compact end |
Instance Method Details
#build ⇒ Object
TODO: this is exactly the same as in GroupAggregation
19 20 21 |
# File 'lib/elasticated/aggregations/missing_aggregation.rb', line 19 def build super.merge build_subaggregations end |
#operation ⇒ Object
implementation
14 15 16 |
# File 'lib/elasticated/aggregations/missing_aggregation.rb', line 14 def operation :missing end |
#parse(response) ⇒ Object
23 24 25 |
# File 'lib/elasticated/aggregations/missing_aggregation.rb', line 23 def parse(response) _subaggregations.empty? ? super : parse_subaggregations(response) end |