Skip to content

Commit e71ec4a

Browse files
committed
Count the number of results for the query directly
1 parent adf7fb2 commit e71ec4a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Paginator/RawPaginatorAdapter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ public function getResults($offset, $itemCountPerPage)
121121
public function getTotalHits($genuineTotal = false)
122122
{
123123
if (! isset($this->totalHits)) {
124-
$this->totalHits = $this->searchable->search($this->query)->getTotalHits();
124+
$this->totalHits = $this->searchable->count($this->query);
125125
}
126126

127127
return $this->query->hasParam('size') && !$genuineTotal

0 commit comments

Comments
 (0)