You are here

public function SearchApiSolrBackend::getTermsSuggestions in Search API Solr 4.x

Same name and namespace in other branches
  1. 8.3 src/Plugin/search_api/backend/SearchApiSolrBackend.php \Drupal\search_api_solr\Plugin\search_api\backend\SearchApiSolrBackend::getTermsSuggestions()
  2. 8.2 src/Plugin/search_api/backend/SearchApiSolrBackend.php \Drupal\search_api_solr\Plugin\search_api\backend\SearchApiSolrBackend::getTermsSuggestions()

Throws

\Drupal\Component\Plugin\Exception\PluginException

Overrides SolrAutocompleteInterface::getTermsSuggestions

File

src/Plugin/search_api/backend/SearchApiSolrBackend.php, line 3609

Class

SearchApiSolrBackend
Apache Solr backend for search api.

Namespace

Drupal\search_api_solr\Plugin\search_api\backend

Code

public function getTermsSuggestions(QueryInterface $query, SearchInterface $search, $incomplete_key, $user_input) {

  // Allow modules to alter the solarium autocomplete query.
  $this->moduleHandler
    ->alter('search_api_solr_terms_autocomplete_query', $query);
  return $this
    ->getAutocompleteSuggestions($query, $search, $incomplete_key, $user_input);
}