Skip to content

Commit

Permalink
Update SolrDocument.php
Browse files Browse the repository at this point in the history
make some adjustments to properly get the original $id for the documents array
  • Loading branch information
jonathanchris authored Apr 9, 2024
1 parent fe4cefe commit 1141d5b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Plugin/search_api/datasource/SolrDocument.php
Original file line number Diff line number Diff line change
Expand Up @@ -192,8 +192,9 @@ public function loadMultiple(array $ids) {
->addCondition('search_api_id', $ids, 'IN')
->execute()
->getResultItems();
foreach ($results as $result) {
$documents[$id] = $this->getSolrDocumentFactory()->create($result);
foreach ($results as $id => $result) {
$original_id = str_replace('solr_document/', '', $id);
$documents[$original_id] = $this->getSolrDocumentFactory()->create($result);
}
}
catch (SearchApiException $e) {
Expand Down

0 comments on commit 1141d5b

Please sign in to comment.