You are here

public function SearchBuilder::__construct in Elasticsearch Connector 8.2

Same name and namespace in other branches
  1. 8.7 src/ElasticSearch/Parameters/Builder/SearchBuilder.php \Drupal\elasticsearch_connector\ElasticSearch\Parameters\Builder\SearchBuilder::__construct()
  2. 8.5 src/ElasticSearch/Parameters/Builder/SearchBuilder.php \Drupal\elasticsearch_connector\ElasticSearch\Parameters\Builder\SearchBuilder::__construct()
  3. 8.6 src/ElasticSearch/Parameters/Builder/SearchBuilder.php \Drupal\elasticsearch_connector\ElasticSearch\Parameters\Builder\SearchBuilder::__construct()

ParameterBuilder constructor.

Parameters

\Drupal\search_api\Query\QueryInterface $query:

File

src/ElasticSearch/Parameters/Builder/SearchBuilder.php, line 38

Class

SearchBuilder
Class SearchBuilder.

Namespace

Drupal\elasticsearch_connector\ElasticSearch\Parameters\Builder

Code

public function __construct(QueryInterface $query) {
  $this->query = $query;
  $this->index = $query
    ->getIndex();
}