You are here

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

Applies custom modifications to indexed Solr documents.

This method allows subclasses to easily apply custom changes before the documents are sent to Solr. The method is empty by default.

Parameters

\Solarium\QueryType\Update\Query\Document[] $documents: An array of \Solarium\QueryType\Update\Query\Document objects ready to be indexed, generated from $items array.

\Drupal\search_api\IndexInterface $index: The search index for which items are being indexed.

array $items: An array of items being indexed.

See also

hook_search_api_solr_documents_alter()

1 call to SearchApiSolrBackend::alterSolrDocuments()
SearchApiSolrBackend::getDocuments in src/Plugin/search_api/backend/SearchApiSolrBackend.php
Retrieves Solr documents from search api index items.

File

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

Class

SearchApiSolrBackend
Apache Solr backend for search api.

Namespace

Drupal\search_api_solr\Plugin\search_api\backend

Code

protected function alterSolrDocuments(array &$documents, IndexInterface $index, array $items) {
}