You are here

private function SearchApiElasticsearchConnector::handlePrefixQueryFields in Elasticsearch Connector 7.5

Same name and namespace in other branches
  1. 7 modules/elasticsearch_connector_search_api/service.inc \SearchApiElasticsearchConnector::handlePrefixQueryFields()
  2. 7.2 modules/elasticsearch_connector_search_api/service.inc \SearchApiElasticsearchConnector::handlePrefixQueryFields()

Parameters

SearchApiQueryInterface $query:

Return value

array

1 call to SearchApiElasticsearchConnector::handlePrefixQueryFields()
SearchApiElasticsearchConnector::handlePrefixQuery in modules/elasticsearch_connector_search_api/service.inc

File

modules/elasticsearch_connector_search_api/service.inc, line 1442
Provides a Elasticsearch-based service class for the Search API using Elasticsearch Connector module.

Class

SearchApiElasticsearchConnector
Search service class.

Code

private function handlePrefixQueryFields(SearchApiQueryInterface $query) {
  $query_full_text_fields = $query
    ->getFields();
  $fields = $query
    ->getOption(self::PREFIX_SEARCH_FIELDS, array());
  if (empty($fields)) {
    $fields = $query_full_text_fields;
  }
  else {
    $fields = array_keys($fields);
  }
  return $fields;
}