Skip to content

Commit

Permalink
Update TypesenseEngine.php
Browse files Browse the repository at this point in the history
  • Loading branch information
alecritson committed Oct 17, 2024
1 parent 56329b0 commit a761bf3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Engines/TypesenseEngine.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public function get(): SearchResults
$results = $paginator->items();

$documents = collect($results['hits'])->map(fn ($hit) => SearchHit::from([
'highlights' => collect($hit['highlights'])->map(
'highlights' => collect($hit['highlights'] ?? [])->map(
fn ($highlight) => SearchHit\Highlight::from([
'field' => $highlight['field'],
'matches' => $highlight['matched_tokens'],
Expand Down

0 comments on commit a761bf3

Please sign in to comment.