public function SearchApiSolrBackend::getDocument in Search API Solr 8.3
Same name and namespace in other branches
- 8 src/Plugin/search_api/backend/SearchApiSolrBackend.php \Drupal\search_api_solr\Plugin\search_api\backend\SearchApiSolrBackend::getDocument()
- 8.2 src/Plugin/search_api/backend/SearchApiSolrBackend.php \Drupal\search_api_solr\Plugin\search_api\backend\SearchApiSolrBackend::getDocument()
- 4.x src/Plugin/search_api/backend/SearchApiSolrBackend.php \Drupal\search_api_solr\Plugin\search_api\backend\SearchApiSolrBackend::getDocument()
Throws
\Drupal\Component\Plugin\Exception\PluginException
Overrides SolrBackendInterface::getDocument
File
- src/
Plugin/ search_api/ backend/ SearchApiSolrBackend.php, line 1010
Class
- SearchApiSolrBackend
- Apache Solr backend for search api.
Namespace
Drupal\search_api_solr\Plugin\search_api\backendCode
public function getDocument(IndexInterface $index, ItemInterface $item) {
$documents = $this
->getDocuments($index, [
$item
->getId() => $item,
]);
return reset($documents);
}