Ejemplo n.º 1
0
 /**
  * Constructor.
  *
  * @param string         $name         Bucket name.
  * @param string         $field        Bucket field.
  * @param Metric[]       $metrics      Bucket metrics.
  * @param string         $nestedPath   Nested path for nested bucket.
  * @param QueryInterface $filter       Bucket filter.
  * @param QueryInterface $nestedFilter Nested filter for the bucket.
  * @param integer        $interval     Histogram interval.
  * @param integer        $minDocCount  Histogram min doc count.
  */
 public function __construct($name, $field, array $metrics, $nestedPath = null, QueryInterface $filter = null, QueryInterface $nestedFilter = null, $interval = 1, $minDocCount = 0)
 {
     parent::__construct($name, $field, $metrics, $nestedPath, $filter, $nestedFilter);
     $this->interval = $interval;
     $this->minDocCount = $minDocCount;
 }
Ejemplo n.º 2
0
 /**
  * Constructor.
  *
  * @param string           $name         Bucket name.
  * @param QueryInterface[] $queries      Query group children queries.
  * @param Metric[]         $metrics      Bucket metrics.
  * @param string           $nestedPath   Nested path for nested bucket.
  * @param QueryInterface   $filter       Bucket filter.
  * @param QueryInterface   $nestedFilter Nested filter for the bucket.
  */
 public function __construct($name, array $queries, array $metrics = [], $nestedPath = null, QueryInterface $filter = null, QueryInterface $nestedFilter = null)
 {
     parent::__construct($name, $name, $metrics, $nestedPath, $filter, $nestedFilter);
     $this->queries = $queries;
 }
Ejemplo n.º 3
0
 /**
  * Constructor.
  *
  * @param string         $name         Bucket name.
  * @param string         $field        Bucket field.
  * @param Metric[]       $metrics      Bucket metrics.
  * @param string         $nestedPath   Nested path for nested bucket.
  * @param QueryInterface $filter       Bucket filter.
  * @param QueryInterface $nestedFilter Nested filter for the bucket.
  * @param integer        $size         Bucket size.
  * @param string         $sortOrder    Bucket sort order.
  */
 public function __construct($name, $field, array $metrics, $nestedPath = null, QueryInterface $filter = null, QueryInterface $nestedFilter = null, $size = 0, $sortOrder = BucketInterface::SORT_ORDER_MANUAL)
 {
     parent::__construct($name, $field, $metrics, $nestedPath, $filter, $nestedFilter);
     $this->size = $size;
     $this->sortOrder = $sortOrder;
 }