You are here

public static function QueryInterface::create in Search API 8

Instantiates a new instance of this query class.

Parameters

\Drupal\search_api\IndexInterface $index: The index for which the query should be created.

array $options: (optional) The options to set for the query.

Return value

static A query object to use.

Throws

\Drupal\search_api\SearchApiException Thrown if a search on that index (or with those options) won't be possible.

1 method overrides QueryInterface::create()
Query::create in src/Query/Query.php
Instantiates a new instance of this query class.

File

src/Query/QueryInterface.php, line 68

Class

QueryInterface
Represents a search query on a Search API index.

Namespace

Drupal\search_api\Query

Code

public static function create(IndexInterface $index, array $options = []);