You are here

public function SolrAutocompleteInterface::getSuggesterSuggestions in Search API Solr 4.x

Same name and namespace in other branches
  1. 8.3 src/SolrAutocompleteInterface.php \Drupal\search_api_solr\SolrAutocompleteInterface::getSuggesterSuggestions()
  2. 8.2 src/SolrAutocompleteInterface.php \Drupal\search_api_solr\SolrAutocompleteInterface::getSuggesterSuggestions()

Autocompletion suggestions for some user input using Suggester component.

Parameters

\Drupal\search_api\Query\QueryInterface $query: A query representing the base search, with all completely entered words in the user input so far as the search keys.

\Drupal\search_api_autocomplete\SearchInterface $search: An object containing details about the search the user is on, and settings for the autocompletion. See the class documentation for details. Especially $search->getOptions() should be checked for settings, like whether to try and estimate result counts for returned suggestions.

string $incomplete_key: The start of another fulltext keyword for the search, which should be completed. Might be empty, in which case all user input up to now was considered completed. Then, additional keywords for the search could be suggested.

string $user_input: The complete user input for the fulltext search keywords so far.

array $options: (optional) An associative array of options with 'dictionary' as string, 'context_filter_tags' as array of strings.

Return value

\Drupal\search_api_autocomplete\Suggestion\SuggestionInterface[] An array of autocomplete suggestions.

Throws

\Drupal\search_api\SearchApiException

1 method overrides SolrAutocompleteInterface::getSuggesterSuggestions()
SearchApiSolrBackend::getSuggesterSuggestions in src/Plugin/search_api/backend/SearchApiSolrBackend.php

File

src/SolrAutocompleteInterface.php, line 92

Class

SolrAutocompleteInterface
Defines an autocomplete interface for Solr search backend plugins.

Namespace

Drupal\search_api_solr

Code

public function getSuggesterSuggestions(QueryInterface $query, SearchInterface $search, $incomplete_key, $user_input, array $options = []);