Skip to content

Commit

Permalink
Fix web search highlighting broken by #3610. (#4092)
Browse files Browse the repository at this point in the history
  • Loading branch information
demiankatz authored Nov 20, 2024
1 parent e99d57c commit d66e4c0
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,14 @@ protected function getCreateRecordCallback(): ?callable
$manager = $this->serviceLocator
->get(\VuFind\RecordDriver\PluginManager::class);
return function ($data) use ($manager) {
// Extract highlighting details injected earlier by
// \VuFindSearch\Backend\Solr\Response\Json\RecordCollectionFactory
$hl = $data['__highlight_details'] ?? [];
unset($data['__highlight_details']);

$driver = $manager->get('SolrWeb');
$driver->setRawData($data);
$driver->setHighlightDetails($hl);
return $driver;
};
}
Expand Down

0 comments on commit d66e4c0

Please sign in to comment.