1 | <?php |
||
20 | class CardinalityAggregation extends AbstractAggregation |
||
21 | { |
||
22 | use MetricTrait; |
||
23 | use ScriptAwareTrait; |
||
24 | |||
25 | /** |
||
26 | * @param string $name |
||
27 | * @param string $field |
||
28 | * @param string $script |
||
29 | */ |
||
30 | public function __construct($name, $field = null, $script = null) |
||
37 | |||
38 | /** |
||
39 | * @var int |
||
40 | */ |
||
41 | private $precisionThreshold; |
||
42 | |||
43 | /** |
||
44 | * @var bool |
||
45 | */ |
||
46 | private $rehash; |
||
47 | |||
48 | /** |
||
49 | * {@inheritdoc} |
||
50 | */ |
||
51 | public function getArray() |
||
69 | |||
70 | /** |
||
71 | * Precision threshold. |
||
72 | * |
||
73 | * @param int $precision Precision Threshold. |
||
74 | */ |
||
75 | public function setPrecisionThreshold($precision) |
||
79 | |||
80 | /** |
||
81 | * @return int |
||
82 | */ |
||
83 | public function getPrecisionThreshold() |
||
87 | |||
88 | /** |
||
89 | * @return bool |
||
90 | */ |
||
91 | public function isRehash() |
||
95 | |||
96 | /** |
||
97 | * @param bool $rehash |
||
98 | */ |
||
99 | public function setRehash($rehash) |
||
103 | |||
104 | /** |
||
105 | * {@inheritdoc} |
||
106 | */ |
||
107 | public function getType() |
||
111 | |||
112 | /** |
||
113 | * Checks if required fields are set. |
||
114 | * |
||
115 | * @param array $fields |
||
116 | * |
||
117 | * @throws \LogicException |
||
118 | */ |
||
119 | private function checkRequiredFields($fields) |
||
125 | } |
||
126 |