diff options
author | Maxence Lange <maxence@artificial-owl.com> | 2018-01-04 15:53:48 +0300 |
---|---|---|
committer | Maxence Lange <maxence@artificial-owl.com> | 2018-01-04 15:53:48 +0300 |
commit | daf404f52d2a1790ee1ab443b89470892cae8212 (patch) | |
tree | b9e3648ac477e6ac6153df65ce24cf719dc9bb82 /lib/Model | |
parent | 1bbeaccd784a028e25fcca4dc230af66248c8e59 (diff) |
pagination
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
Diffstat (limited to 'lib/Model')
-rw-r--r-- | lib/Model/SearchResult.php | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/Model/SearchResult.php b/lib/Model/SearchResult.php index d6e32d0..12ad75e 100644 --- a/lib/Model/SearchResult.php +++ b/lib/Model/SearchResult.php @@ -92,7 +92,7 @@ class SearchResult implements \JsonSerializable { /** * @return int */ - public function getSize() { + public function getCount() { return count($this->documents); } @@ -219,8 +219,7 @@ class SearchResult implements \JsonSerializable { [ 'timedOut' => $this->isTimedOut(), 'time' => $this->getTime(), - 'maxPage' => ceil($this->getTotal() / $this->getSize()), - 'size' => $this->getSize(), + 'count' => $this->getCount(), 'total' => $this->getTotal(), 'maxScore' => $this->getMaxScore(), 'request' => $this->getRequest() |