You are here

protected function SearchApiSolrBackend::createId in Search API Solr 8

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

Creates an ID used as the unique identifier at the Solr server.

This has to consist of both index and item ID. Optionally, the site hash is also included.

See also

\Drupal\search_api_solr\Utility\Utility::getSiteHash()

4 calls to SearchApiSolrBackend::createId()
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::getMoreLikeThisQuery in src/Plugin/search_api/backend/SearchApiSolrBackend.php
Changes the query to a "More Like This" query.

File

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

Class

SearchApiSolrBackend
Apache Solr backend for search api.

Namespace

Drupal\search_api_solr\Plugin\search_api\backend

Code

protected function createId($index_id, $item_id) {
  return SearchApiSolrUtility::getSiteHash() . "-{$index_id}-{$item_id}";
}