You are here

protected function SearchApiSolrBackend::getIndexId in Search API Solr 8.2

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::getIndexId()
  2. 8 src/Plugin/search_api/backend/SearchApiSolrBackend.php \Drupal\search_api_solr\Plugin\search_api\backend\SearchApiSolrBackend::getIndexId()
  3. 4.x src/Plugin/search_api/backend/SearchApiSolrBackend.php \Drupal\search_api_solr\Plugin\search_api\backend\SearchApiSolrBackend::getIndexId()

Prefixes an index ID as configured.

The resulting ID will be a concatenation of the following strings:

  • If set, the server-specific index_prefix.
  • If set, the index-specific prefix.
  • The index's machine name.

Parameters

\Drupal\search_api\IndexInterface $index: The index.

Return value

string The prefixed machine name.

6 calls to SearchApiSolrBackend::getIndexId()
SearchApiSolrBackend::deleteAllIndexItems in src/Plugin/search_api/backend/SearchApiSolrBackend.php
Deletes all the items from the index.
SearchApiSolrBackend::deleteItems in src/Plugin/search_api/backend/SearchApiSolrBackend.php
Deletes the specified items from the index.
SearchApiSolrBackend::extractResults in src/Plugin/search_api/backend/SearchApiSolrBackend.php
Extract results from a Solr response.
SearchApiSolrBackend::getDocuments in src/Plugin/search_api/backend/SearchApiSolrBackend.php
Retrieves Solr documents from search api index items.
SearchApiSolrBackend::getIndexFilterQueryString in src/Plugin/search_api/backend/SearchApiSolrBackend.php
Returns a ready to use query string to filter results by index and site.

... See full list

File

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

Class

SearchApiSolrBackend
Apache Solr backend for search api.

Namespace

Drupal\search_api_solr\Plugin\search_api\backend

Code

protected function getIndexId(IndexInterface $index) {
  $settings = $index
    ->getThirdPartySettings('search_api_solr') + search_api_solr_default_index_third_party_settings();
  return $this->configuration['server_prefix'] . $settings['advanced']['index_prefix'] . $index
    ->id();
}