Class: Elastic::Commands::BuildAggFromParams

Inherits:
Object
  • Object
show all
Defined in:
lib/elastic/commands/build_agg_from_params.rb

Instance Method Summary collapse

Instance Method Details

#performObject

Raises:

  • (ArgumentError)


3
4
5
6
7
8
9
10
11
12
# File 'lib/elastic/commands/build_agg_from_params.rb', line 3

def perform
  parse_params
  raise ArgumentError, "#{@field} not mapped" if field_definition.nil?
  raise ArgumentError, "cant aggregate on #{@field}" if field_definition.nested?

  path = parse_nesting_path
  raise NotImplementedError, "nested paths not yet supported in aggregations" if path

  build_node
end