You are here

public static function Spellcheck::supportsSearch in Search API Solr 8.2

Same name and namespace in other branches
  1. 8.3 src/Plugin/search_api_autocomplete/suggester/Spellcheck.php \Drupal\search_api_solr\Plugin\search_api_autocomplete\suggester\Spellcheck::supportsSearch()
  2. 4.x src/Plugin/search_api_autocomplete/suggester/Spellcheck.php \Drupal\search_api_solr\Plugin\search_api_autocomplete\suggester\Spellcheck::supportsSearch()

Determines whether this plugin supports the given search.

Parameters

\Drupal\search_api_autocomplete\SearchInterface $search: The search in question.

Return value

bool TRUE if this plugin supports the given search, FALSE otherwise.

Overrides SuggesterPluginBase::supportsSearch

File

src/Plugin/search_api_autocomplete/suggester/Spellcheck.php, line 33

Class

Spellcheck
Provides a suggester plugin that retrieves suggestions from the server.

Namespace

Drupal\search_api_solr\Plugin\search_api_autocomplete\suggester

Code

public static function supportsSearch(SearchInterface $search) {
  return (bool) static::getBackend($search
    ->getIndex());
}