| 1 | <?php |
||
| 21 | class SamplerAggregation extends AbstractAggregation |
||
| 22 | { |
||
| 23 | use BucketingTrait; |
||
| 24 | |||
| 25 | /** |
||
| 26 | * Defines how many results will be received from each shard |
||
| 27 | * @param string $shardSize |
||
| 28 | */ |
||
| 29 | private $shardSize; |
||
| 30 | |||
| 31 | /** |
||
| 32 | * Inner aggregations container init. |
||
| 33 | * |
||
| 34 | * @param string $name |
||
| 35 | * @param string $field |
||
| 36 | * @param int $shardSize |
||
| 37 | */ |
||
| 38 | public function __construct( |
||
| 48 | |||
| 49 | /** |
||
| 50 | * @return mixed |
||
| 51 | */ |
||
| 52 | public function getShardSize() |
||
| 56 | |||
| 57 | /** |
||
| 58 | * @param mixed $shardSize |
||
| 59 | */ |
||
| 60 | public function setShardSize($shardSize) |
||
| 64 | |||
| 65 | /** |
||
| 66 | * {@inheritdoc} |
||
| 67 | */ |
||
| 68 | public function getType() |
||
| 72 | |||
| 73 | /** |
||
| 74 | * {@inheritdoc} |
||
| 75 | */ |
||
| 76 | public function getArray() |
||
| 86 | } |
||
| 87 |