Sha256: 3ac3e912659201655675dbd4d8e0ad7e65076f31e4fa586f3e2c4a81049e1987

Contents?: true

Size: 419 Bytes

Versions: 19

Compression:

Stored size: 419 Bytes

Contents

module Elastic::Nodes::Concerns
  module Bucketed
    def handle_result(_raw, _formatter)
      buckets = _raw['buckets'].map do |raw_bucket|
        key = _formatter.format_field(field, raw_bucket['key'])
        aggs = load_aggs_results(raw_bucket, _formatter)

        Elastic::Results::Bucket.new(key, raw_bucket['doc_count'], aggs)
      end

      Elastic::Results::BucketCollection.new buckets
    end
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

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