Lines Matching refs:query
169 * @param AbstractQuery|AbstractSuggest|array|Collapse|Query|string|Suggest|null $query
170 * @phpstan-param TCreateQueryArgs $query
172 public function setQuery($query): self
174 $this->_query = Query::create($query);
325 * @param AbstractQuery|AbstractSuggest|array|Collapse|Query|string|Suggest|null $query
326 * @phpstan-param TCreateQueryArgs $query
335 public function search($query = '', $options = null, string $method = Request::POST): ResultSet
337 $this->setOptionsAndQuery($options, $query);
339 $query = $this->getQuery();
349 $data = $query->toArray();
354 return $this->builder->buildResultSet($response, $query);
358 * @param array|Query|Query\AbstractQuery|string $query
367 public function count($query = '', bool $fullResult = false, string $method = Request::POST)
369 $this->setOptionsAndQuery(null, $query);
371 // Clone the object as we do not want to modify the original query.
372 $query = clone $this->getQuery();
373 $query->setSize(0);
374 $query->setTrackTotalHits(true);
381 $query->toArray(),
384 $resultSet = $this->builder->buildResultSet($response, $query);
391 * @param AbstractQuery|AbstractSuggest|array|Collapse|Query|string|Suggest|null $query
392 * @phpstan-param TCreateQueryArgs $query
394 public function setOptionsAndQuery($options = null, $query = ''): self
396 if ('' !== $query) {
397 $this->setQuery($query);