You are here

public static function SearchFactory::search in Elasticsearch Connector 8.5

Same name and namespace in other branches
  1. 8.7 src/ElasticSearch/Parameters/Factory/SearchFactory.php \Drupal\elasticsearch_connector\ElasticSearch\Parameters\Factory\SearchFactory::search()
  2. 8.2 src/ElasticSearch/Parameters/Factory/SearchFactory.php \Drupal\elasticsearch_connector\ElasticSearch\Parameters\Factory\SearchFactory::search()
  3. 8.6 src/ElasticSearch/Parameters/Factory/SearchFactory.php \Drupal\elasticsearch_connector\ElasticSearch\Parameters\Factory\SearchFactory::search()

Build search parameters from a query interface.

Parameters

\Drupal\search_api\Query\QueryInterface $query: Search API query object.

Return value

array Array of parameters to send along to the Elasticsearch _search endpoint.

1 call to SearchFactory::search()
SearchApiElasticsearchBackend::search in src/Plugin/search_api/backend/SearchApiElasticsearchBackend.php
Executes a search on this server.

File

src/ElasticSearch/Parameters/Factory/SearchFactory.php, line 23

Class

SearchFactory
Class SearchFactory.

Namespace

Drupal\elasticsearch_connector\ElasticSearch\Parameters\Factory

Code

public static function search(QueryInterface $query) {
  $builder = new SearchBuilder($query);
  return $builder
    ->build();
}