Skip to content

Commit

Permalink
Check for default total count return in meilisearch
Browse files Browse the repository at this point in the history
  • Loading branch information
Boorinio committed Jan 18, 2025
1 parent f32c618 commit 1bc0416
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Engines/MeilisearchEngine.php
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ public function lazyMap(Builder $builder, $results, $model)
*/
public function getTotalCount($results)
{
return $results['totalHits'];
return $results['totalHits'] ?? $results['estimatedTotalHits'];
}

/**
Expand Down

0 comments on commit 1bc0416

Please sign in to comment.