Пример #1
0
 /**
  * Build the aggregation.
  *
  * @param BucketInterface $bucket Histogram bucket.
  *
  * @return array
  */
 public function buildBucket(BucketInterface $bucket)
 {
     $aggParams = ['field' => $bucket->getField(), 'interval' => $bucket->getInterval(), 'min_doc_count' => $bucket->getMinDocCount()];
     return ['histogram' => $aggParams];
 }