class SearchApiElasticsearchSpellcheck in Search API Elasticsearch 7
@file Contains SearchApiElasticsearchSpellcheck
Hierarchy
- class \SearchApiSpellcheck implements SearchApiSpellcheckInterface
Expanded class hierarchy of SearchApiElasticsearchSpellcheck
File
- includes/
SearchApiElasticsearchSpellcheck.inc, line 8 - Contains SearchApiElasticsearchSpellcheck
View source
class SearchApiElasticsearchSpellcheck extends SearchApiSpellcheck {
/**
* __construct
*
* @param mixed $data
* @access public
* @return void
*/
public function __construct($data) {
foreach ($data['suggestions'] as $suggestion) {
$this
->addSuggestion(new SearchApiSpellcheckSuggestion($data['text'], $suggestion));
}
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
SearchApiElasticsearchSpellcheck:: |
public | function | __construct | |
SearchApiSpellcheck:: |
protected | property | ||
SearchApiSpellcheck:: |
protected | property | ||
SearchApiSpellcheck:: |
public | function | This call also maintains a list of sub interances using the same interface. These services are then also check when getSuggestion() is called. | |
SearchApiSpellcheck:: |
public | function | Add a suggestion object to the class which is stored and then checked when getSuggestion() is called. | |
SearchApiSpellcheck:: |
public | function | Pass a string and if it can be improved by any of the suggestions or sub-services added then return a suggesiton. If no change can be suggested return FALSE. | |
SearchApiSpellcheck:: |
public | function | Accepts a Drupal arg number which is used to get the value submitted and returns a link to the current page with whatever value is in the URL argument replaced with a suggestion. | |
SearchApiSpellcheck:: |
public | function | Accepts a a query string key which is used to get the value submitted and | |
SearchApiSpellcheck:: |
public | function |
Check if any of the added spellcheck suggestions match either all or part
of the string. Overrides SearchApiSpellcheckInterface:: |