Class: Arelastic::Builders::Aggregation

Inherits:
Struct
  • Object
show all
Defined in:
lib/arelastic/builders/aggregation.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#nameObject

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



3
4
5
# File 'lib/arelastic/builders/aggregation.rb', line 3

def name
  @name
end

Class Method Details

.[](name) ⇒ Object



5
6
7
# File 'lib/arelastic/builders/aggregation.rb', line 5

def [](name)
  new(name)
end

Instance Method Details

#histogram(options) ⇒ Object



14
15
16
# File 'lib/arelastic/builders/aggregation.rb', line 14

def histogram options
  Arelastic::Aggregations::Histogram.new name, options
end

#terms(options = {}) ⇒ Object



10
11
12
# File 'lib/arelastic/builders/aggregation.rb', line 10

def terms options = {}
  Arelastic::Aggregations::Terms.new name, options
end