interface AutocompleteBackendInterface in Search API Autocomplete 8
Describes the method a backend plugin has to add to support autocompletion.
In addition, the backend has to include "search_api_autocomplete" in the return value of its getSupportedFeatures() implementation.
Please note that this interface is purely documentational. You shouldn't, and can't, implement it explicitly (unless your module is depending on this one).
Hierarchy
- interface \Drupal\search_api\Plugin\ConfigurablePluginInterface; interface \Drupal\search_api\Backend\BackendSpecificInterface
- interface \Drupal\search_api\Backend\BackendInterface
- interface \Drupal\search_api_autocomplete\AutocompleteBackendInterface
- interface \Drupal\search_api\Backend\BackendInterface
Expanded class hierarchy of AutocompleteBackendInterface
All classes that implement AutocompleteBackendInterface
1 file declares its use of AutocompleteBackendInterface
- Server.php in src/
Plugin/ search_api_autocomplete/ suggester/ Server.php
File
- src/
AutocompleteBackendInterface.php, line 17
Namespace
Drupal\search_api_autocompleteView source
interface AutocompleteBackendInterface extends BackendInterface {
/**
* Retrieves autocompletion suggestions for some user input.
*
* @param \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.
* @param \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.
* @param 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.
* @param string $user_input
* The complete user input for the fulltext search keywords so far.
*
* @return \Drupal\search_api_autocomplete\Suggestion\SuggestionInterface[]
* An array of autocomplete suggestions.
*/
public function getAutocompleteSuggestions(QueryInterface $query, SearchInterface $search, $incomplete_key, $user_input);
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
AutocompleteBackendInterface:: |
public | function | Retrieves autocompletion suggestions for some user input. | |
BackendInterface:: |
public | function | Retrieves the server entity for this backend. | 1 |
BackendInterface:: |
public | function | Reacts to the server's creation. | 1 |
BackendInterface:: |
public | function | Notifies the backend that its configuration was updated. | 1 |
BackendInterface:: |
public | function | Notifies the backend that the server is about to be deleted. | 1 |
BackendInterface:: |
public | function | Notifies the backend that its configuration is about to be updated. | 1 |
BackendInterface:: |
public | function | Sets the server entity for this backend. | 1 |
BackendSpecificInterface:: |
public | function | Adds a new index to this server. | 2 |
BackendSpecificInterface:: |
public | function | Deletes all the items from the index. | 4 |
BackendSpecificInterface:: |
public | function | Deletes the specified items from the index. | 4 |
BackendSpecificInterface:: |
public | function | Provides information on additional fields made available by the backend. | 2 |
BackendSpecificInterface:: |
public | function | Limits the processors displayed in the UI for indexes on this server. | 2 |
BackendSpecificInterface:: |
public | function | Returns all features that this backend supports. | 2 |
BackendSpecificInterface:: |
public | function | Indexes the specified items. | 4 |
BackendSpecificInterface:: |
public | function | Returns a boolean with the availability of the backend. | 2 |
BackendSpecificInterface:: |
public | function | Removes an index from this server. | 2 |
BackendSpecificInterface:: |
public | function | Executes a search on this server. | 4 |
BackendSpecificInterface:: |
public | function | Determines whether the backend supports a given add-on data type. | 2 |
BackendSpecificInterface:: |
public | function | Notifies the server that an index attached to it has been changed. | 2 |
BackendSpecificInterface:: |
public | function | Returns additional, backend-specific information about this server. | 2 |
ConfigurableInterface:: |
public | function | Gets default configuration for this plugin. | 11 |
ConfigurableInterface:: |
public | function | Gets this plugin's configuration. | 12 |
ConfigurableInterface:: |
public | function | Sets the configuration for this plugin instance. | 12 |
ConfigurablePluginInterface:: |
public | function | Returns the plugin's description. | 1 |
ConfigurablePluginInterface:: |
public | function | Returns the label for use on the administration pages. | 1 |
ConfigurablePluginInterface:: |
public | function | Informs the plugin that some of its dependencies are being removed. | 1 |
ContainerFactoryPluginInterface:: |
public static | function | Creates an instance of the plugin. | 112 |
DependentPluginInterface:: |
public | function | Calculates dependencies for the configured plugin. | 19 |
DerivativeInspectionInterface:: |
public | function | Gets the base_plugin_id of the plugin instance. | 1 |
DerivativeInspectionInterface:: |
public | function | Gets the derivative_id of the plugin instance. | 1 |
HideablePluginInterface:: |
public | function | Determines whether this plugin should be hidden in the UI. | 1 |
PluginInspectionInterface:: |
public | function | Gets the definition of the plugin implementation. | 4 |
PluginInspectionInterface:: |
public | function | Gets the plugin_id of the plugin instance. | 2 |