class Arelastic::Aggregations::Sampler

Attributes

shard_size[RW]

Public Class Methods

new(name, shard_size, aggs) click to toggle source
Calls superclass method Arelastic::Aggregations::Bucket::new
# File lib/arelastic/aggregations/sampler.rb, line 5
def initialize(name, shard_size, aggs)
  super(name, aggs: aggs)
  @shard_size = shard_size
end

Public Instance Methods

as_elastic_aggregation() click to toggle source
# File lib/arelastic/aggregations/sampler.rb, line 10
def as_elastic_aggregation
  {'sampler' => { 'shard_size' => shard_size}}.merge(super)
end