public static function Spellcheck::supportsSearch in Search API Solr 8.3
Same name and namespace in other branches
- 8.2 src/Plugin/search_api_autocomplete/suggester/Spellcheck.php \Drupal\search_api_solr\Plugin\search_api_autocomplete\suggester\Spellcheck::supportsSearch()
- 4.x src/Plugin/search_api_autocomplete/suggester/Spellcheck.php \Drupal\search_api_solr\Plugin\search_api_autocomplete\suggester\Spellcheck::supportsSearch()
Throws
\Drupal\search_api\SearchApiException
\Drupal\search_api_autocomplete\SearchApiAutocompleteException
Overrides SuggesterPluginBase::supportsSearch
File
- src/
Plugin/ search_api_autocomplete/ suggester/ Spellcheck.php, line 35
Class
- Spellcheck
- Provides a suggester plugin that retrieves suggestions from the server.
Namespace
Drupal\search_api_solr\Plugin\search_api_autocomplete\suggesterCode
public static function supportsSearch(SearchInterface $search) {
/** @var \Drupal\search_api_solr\SolrBackendInterface $backend */
$backend = static::getBackend($search
->getIndex());
return $backend && version_compare($backend
->getSolrConnector()
->getSolrMajorVersion(), '4', '>=');
}