You are here

public function SearchInterface::createQuery in Search API Autocomplete 8

Creates a query object for this search.

Parameters

string $keys: The fulltext search keywords to place on the query.

array $data: (optional) Additional data passed to the callback.

Return value

\Drupal\search_api\Query\QueryInterface The query that would normally be executed when $keys is entered as the keywords for this search. Callers should check whether keywords are actually set on the query.

Throws

\Drupal\search_api_autocomplete\SearchApiAutocompleteException Thrown if the query couldn't be created.

1 method overrides SearchInterface::createQuery()
Search::createQuery in src/Entity/Search.php
Creates a query object for this search.

File

src/SearchInterface.php, line 227

Class

SearchInterface
Describes the autocomplete settings for a certain search.

Namespace

Drupal\search_api_autocomplete

Code

public function createQuery($keys, array $data = []);