public static function Suggester::supportsSearch in Search API Solr 4.x
Same name and namespace in other branches
- 8.3 src/Plugin/search_api_autocomplete/suggester/Suggester.php \Drupal\search_api_solr\Plugin\search_api_autocomplete\suggester\Suggester::supportsSearch()
- 8.2 src/Plugin/search_api_autocomplete/suggester/Suggester.php \Drupal\search_api_solr\Plugin\search_api_autocomplete\suggester\Suggester::supportsSearch()
Throws
\Drupal\search_api\SearchApiException
\Drupal\search_api_autocomplete\SearchApiAutocompleteException
File
- src/
Plugin/ search_api_autocomplete/ suggester/ Suggester.php, line 37
Class
- Suggester
- 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(), '6', '>=');
}