Sha256: 7f1851ece2803418592d52acb28e08e597e6a6626ce8947fc2bfb26c1fe56c11

Contents?: true

Size: 307 Bytes

Versions: 19

Compression:

Stored size: 307 Bytes

Contents

module Elastic::Results
  class Bucket < Aggregations
    attr_reader :key, :total

    def initialize(_key, _total, _aggs)
      @key = _key
      @total = _total
      super _aggs
    end

    def as_value
      # TODO: return aggregation value if configured as single bucket
      self
    end
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
elastic-rails-1.0.4 lib/elastic/results/bucket.rb
elastic-rails-1.0.3 lib/elastic/results/bucket.rb
elastic-rails-1.0.2 lib/elastic/results/bucket.rb
elastic-rails-1.0.1 lib/elastic/results/bucket.rb
elastic-rails-1.0.0 lib/elastic/results/bucket.rb
elastic-rails-0.8.7 lib/elastic/results/bucket.rb
elastic-rails-0.8.6 lib/elastic/results/bucket.rb
elastic-rails-0.8.5 lib/elastic/results/bucket.rb
elastic-rails-0.8.4 lib/elastic/results/bucket.rb
elastic-rails-0.8.3 lib/elastic/results/bucket.rb
elastic-rails-0.8.2 lib/elastic/results/bucket.rb
elastic-rails-0.8.1 lib/elastic/results/bucket.rb
elastic-rails-0.8.0 lib/elastic/results/bucket.rb
elastic-rails-0.7.0 lib/elastic/results/bucket.rb
elastic-rails-0.6.4 lib/elastic/results/bucket.rb
elastic-rails-0.6.3 lib/elastic/results/bucket.rb
elastic-rails-0.6.2 lib/elastic/results/bucket.rb
elastic-rails-0.6.1 lib/elastic/results/bucket.rb
elastic-rails-0.6.0 lib/elastic/results/bucket.rb