Skip to content
Snippets Groups Projects
Commit f5bbd02f authored by Mantas Marcinkevičius's avatar Mantas Marcinkevičius
Browse files

added percentiles aggregation

parent 9be02f7b
No related branches found
No related tags found
No related merge requests found
<?php
/*
* This file is part of the ONGR package.
*
* (c) NFQ Technologies UAB <info@nfq.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace ONGR\ElasticsearchDSL\Aggregation\Pipeline;
/**
* Class representing Percentiles Bucket Pipeline Aggregation.
*
* @link https://goo.gl/bqi7m5
*/
class PercentilesBucketAggregation extends AbstractPipelineAggregation
{
/**
* @var array
*/
private $percents;
/**
* {@inheritdoc}
*/
public function getType()
{
return 'percentiles_bucket';
}
/**
* @return array
*/
public function getPercents()
{
return $this->percents;
}
/**
* @param array $percents
*/
public function setPercents(array $percents)
{
$this->percents = $percents;
}
/**
* {@inheritdoc}
*/
public function getArray()
{
$data = ['buckets_path' => $this->getBucketsPath()];
if ($this->getPercents()) {
$data['percents'] = $this->getPercents();
}
return $data;
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment