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