| 1 | <?php |
||
| 22 | * |
||
| 23 | * @link https://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations-bucket-global-aggregation.html |
||
| 24 | */ |
||
| 25 | class GlobalAggregation extends AbstractAggregation |
||
| 26 | { |
||
| 27 | use BucketingTrait; |
||
| 28 | |||
| 29 | public function setField(?string $field): static |
||
|
|
|||
| 30 | { |
||
| 31 | throw new \LogicException("Global aggregation, doesn't support `field` parameter"); |
||
| 32 | } |
||
| 33 | |||
| 34 | public function getType(): string |
||
| 35 | { |
||
| 36 | return 'global'; |
||
| 37 | } |
||
| 38 | |||
| 39 | public function getArray(): stdClass |
||
| 40 | { |
||
| 41 | return new stdClass(); |
||
| 42 | } |
||
| 43 | } |
||
| 44 |