Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/fulltextsearch.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib/Model
diff options
context:
space:
mode:
authorMaxence Lange <maxence@artificial-owl.com>2018-01-04 15:53:48 +0300
committerMaxence Lange <maxence@artificial-owl.com>2018-01-04 15:53:48 +0300
commitdaf404f52d2a1790ee1ab443b89470892cae8212 (patch)
treeb9e3648ac477e6ac6153df65ce24cf719dc9bb82 /lib/Model
parent1bbeaccd784a028e25fcca4dc230af66248c8e59 (diff)
pagination
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
Diffstat (limited to 'lib/Model')
-rw-r--r--lib/Model/SearchResult.php5
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()