You are here

public function SearchApiSolrBackend::getSupportedFeatures in Search API Solr 4.x

Same name and namespace in other branches
  1. 8.3 src/Plugin/search_api/backend/SearchApiSolrBackend.php \Drupal\search_api_solr\Plugin\search_api\backend\SearchApiSolrBackend::getSupportedFeatures()
  2. 8 src/Plugin/search_api/backend/SearchApiSolrBackend.php \Drupal\search_api_solr\Plugin\search_api\backend\SearchApiSolrBackend::getSupportedFeatures()
  3. 8.2 src/Plugin/search_api/backend/SearchApiSolrBackend.php \Drupal\search_api_solr\Plugin\search_api\backend\SearchApiSolrBackend::getSupportedFeatures()

Throws

\Drupal\Component\Plugin\Exception\PluginException

\Drupal\search_api\SearchApiException

File

src/Plugin/search_api/backend/SearchApiSolrBackend.php, line 632

Class

SearchApiSolrBackend
Apache Solr backend for search api.

Namespace

Drupal\search_api_solr\Plugin\search_api\backend

Code

public function getSupportedFeatures() {
  $features = [
    // Features.
    'search_api_autocomplete',
    'search_api_facets',
    'search_api_facets_operator_or',
    'search_api_granular',
    'search_api_mlt',
    'search_api_random_sort',
    'search_api_spellcheck',
    // Datatypes.
    'search_api_data_type_location',
  ];

  // @see https://lucene.apache.org/solr/guide/7_6/result-grouping.html#distributed-result-grouping-caveats
  if (!$this
    ->getSolrConnector()
    ->isCloud()) {
    $features[] = 'search_api_grouping';
  }
  return $features;
}