| 1 | <?php |
||
| 10 | class GeotileGridAggregation extends AbstractAggregation |
||
| 11 | { |
||
| 12 | use Traits\ShardSizeTrait; |
||
| 13 | |||
| 14 | /** |
||
| 15 | * @param string $name the name of this aggregation |
||
| 16 | * @param string $field the field on which to perform this aggregation |
||
| 17 | */ |
||
| 18 | public function __construct(string $name, string $field) |
||
| 23 | |||
| 24 | /** |
||
| 25 | * Set the field for this aggregation. |
||
| 26 | * |
||
| 27 | * @param string $field the name of the document field on which to perform this aggregation |
||
| 28 | * |
||
| 29 | * @return $this |
||
| 30 | */ |
||
| 31 | public function setField(string $field): self |
||
| 35 | |||
| 36 | /** |
||
| 37 | * Set the precision for this aggregation. |
||
| 38 | * |
||
| 39 | * @param int $precision an integer between 1 and 12, inclusive. Defaults to 5. |
||
| 40 | * |
||
| 41 | * @return $this |
||
| 42 | */ |
||
| 43 | public function setPrecision(int $precision): self |
||
| 47 | |||
| 48 | /** |
||
| 49 | * Set the maximum number of buckets to return. |
||
| 50 | * |
||
| 51 | * @param int $size defaults to 10,000 |
||
| 52 | * |
||
| 53 | * @return $this |
||
| 54 | */ |
||
| 55 | public function setSize(int $size): self |
||
| 59 | } |
||
| 60 |