1 | <?php |
||
10 | class Percentiles extends AbstractSimpleAggregation |
||
11 | { |
||
12 | use KeyedTrait; |
||
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 = null) |
||
26 | |||
27 | /** |
||
28 | * Set compression parameter. |
||
29 | * |
||
30 | * @return $this |
||
31 | */ |
||
32 | public function setCompression(float $value): self |
||
38 | |||
39 | /** |
||
40 | * Set hdr parameter. |
||
41 | * |
||
42 | * @return $this |
||
43 | */ |
||
44 | public function setHdr(string $key, float $value): self |
||
50 | |||
51 | /** |
||
52 | * Set which percents must be returned. |
||
53 | * |
||
54 | * @param float[] $percents |
||
55 | * |
||
56 | * @return $this |
||
57 | */ |
||
58 | public function setPercents(array $percents): self |
||
62 | |||
63 | /** |
||
64 | * Add yet another percent to result. |
||
65 | * |
||
66 | * @return $this |
||
67 | */ |
||
68 | public function addPercent(float $percent): self |
||
72 | |||
73 | /** |
||
74 | * Defines how documents that are missing a value should |
||
75 | * be treated. |
||
76 | * |
||
77 | * @return $this |
||
78 | */ |
||
79 | public function setMissing(float $missing): self |
||
83 | } |
||
84 |