Skip to content

Commit

Permalink
Merge pull request #92 from designmynight/es-7
Browse files Browse the repository at this point in the history
fix: pagination count
  • Loading branch information
jmosul authored Sep 10, 2019
2 parents 81e748a + 1e619da commit 1d54e75
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/QueryBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -678,7 +678,9 @@ public function getCountForPagination($columns = ['*'])
$this->runPaginationCountQuery();
}

return $this->processor->getRawResponse()['hits']['total'];
$total = $this->processor->getRawResponse()['hits']['total'];

return is_array($total) ? $total['value'] : $total;
}

/**
Expand Down

0 comments on commit 1d54e75

Please sign in to comment.