Class: Arelastic::Builders::Aggregation
- Inherits:
-
Struct
- Object
- Struct
- Arelastic::Builders::Aggregation
- Defined in:
- lib/arelastic/builders/aggregation.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
Returns the value of attribute name.
Class Method Summary collapse
Instance Method Summary collapse
- #date_histogram(options) ⇒ Object
- #filter(filter, options) ⇒ Object
- #histogram(options) ⇒ Object
- #sample(shard_size, aggs) ⇒ Object
- #terms(options = {}) ⇒ Object
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute 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
#date_histogram(options) ⇒ Object
10 11 12 |
# File 'lib/arelastic/builders/aggregation.rb', line 10 def date_histogram Arelastic::Aggregations::DateHistogram.new name, end |
#filter(filter, options) ⇒ Object
14 15 16 |
# File 'lib/arelastic/builders/aggregation.rb', line 14 def filter filter, Arelastic::Aggregations::Filter.new name, filter, end |
#histogram(options) ⇒ Object
18 19 20 |
# File 'lib/arelastic/builders/aggregation.rb', line 18 def histogram Arelastic::Aggregations::Histogram.new name, end |
#sample(shard_size, aggs) ⇒ Object
22 23 24 |
# File 'lib/arelastic/builders/aggregation.rb', line 22 def sample shard_size, aggs Arelastic::Aggregations::Sampler.new(name, sample_size, aggs) end |
#terms(options = {}) ⇒ Object
26 27 28 |
# File 'lib/arelastic/builders/aggregation.rb', line 26 def terms = {} Arelastic::Aggregations::Terms.new(name, ) end |