@@ 178-184 (lines=7) @@ | ||
175 | * |
|
176 | * @return $this |
|
177 | */ |
|
178 | public function addQuery(BuilderInterface $query, $boolType = BoolQuery::MUST, $key = null) |
|
179 | { |
|
180 | $endpoint = $this->getEndpoint(QueryEndpoint::NAME); |
|
181 | $endpoint->addToBool($query, $boolType, $key); |
|
182 | ||
183 | return $this; |
|
184 | } |
|
185 | ||
186 | /** |
|
187 | * Returns queries inside BoolQuery instance. |
|
@@ 224-231 (lines=8) @@ | ||
221 | * |
|
222 | * @return $this |
|
223 | */ |
|
224 | public function addFilter(BuilderInterface $filter, $boolType = BoolQuery::MUST, $key = null) |
|
225 | { |
|
226 | // Trigger creation of QueryEndpoint as filters depends on it |
|
227 | $this->getEndpoint(QueryEndpoint::NAME); |
|
228 | ||
229 | $endpoint = $this->getEndpoint(FilterEndpoint::NAME); |
|
230 | $endpoint->addToBool($filter, $boolType, $key); |
|
231 | ||
232 | return $this; |
|
233 | } |
|
234 |