You are here

public function ContentHubSearch::executeSearchQuery in Acquia Content Hub 8

Executes an elasticsearch query.

Parameters

array $query: Search query.

Return value

mixed Returns elasticSearch query response hits.

4 calls to ContentHubSearch::executeSearchQuery()
ContentHubSearch::buildChronologicalQuery in src/ContentHubSearch.php
Builds elasticsearch query to retrieve data in reverse chronological order.
ContentHubSearch::getElasticSearchQueryResponse in src/ContentHubSearch.php
Builds Search query for given search terms..
ContentHubSearch::getFilters in src/ContentHubSearch.php
Helper function to build elasticsearch query for terms using AND operator.
ContentHubSearch::getReferenceFilters in src/ContentHubSearch.php
Builds elasticsearch query to get filters name for auto suggestions.

File

src/ContentHubSearch.php, line 73

Class

ContentHubSearch
Perform queries to the Content Hub "_search" endpoint [Elasticsearch].

Namespace

Drupal\acquia_contenthub

Code

public function executeSearchQuery(array $query) {
  if ($query_response = $this->clientManager
    ->createRequest('searchEntity', [
    $query,
  ])) {
    return $query_response['hits'];
  }
  return FALSE;
}