Class: Elastic::Shims::Grouping

Inherits:
Base
  • Object
show all
Defined in:
lib/elastic/shims/grouping.rb

Instance Attribute Summary

Attributes inherited from Base

#child

Instance Method Summary collapse

Methods inherited from Base

#initialize, #render, #traverse

Methods included from Elastic::Support::Traversable

#pick_nodes, #traverse

Constructor Details

This class inherits a constructor from Elastic::Shims::Base

Instance Method Details

#handle_result(_raw, _formatter) ⇒ Object



3
4
5
6
7
# File 'lib/elastic/shims/grouping.rb', line 3

def handle_result(_raw, _formatter)
  chain = extract_aggregation_chain
  groups = group_recursive(super.aggregations, chain)
  Elastic::Results::GroupedResult.new chain, groups
end