Skip to content

Commit

Permalink
Add pagination
Browse files Browse the repository at this point in the history
  • Loading branch information
rjzondervan committed Aug 8, 2024
1 parent ec37e04 commit 0da6864
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/Service/ElasticSearchService.php
Original file line number Diff line number Diff line change
Expand Up @@ -125,10 +125,14 @@ public function parseFilters (array $filters): array
}

if(isset($filters['.limit']) === true) {
$body['size'] = $filters['.limit'];
unset($filters['.limit']);
}

if(isset($filters['.page']) === true) {
if(isset($body['size']) === true) {
$body['from'] = $body['size'] * ($filters['.page'] - 1);
}
unset($filters['.page']);
}

Expand Down

0 comments on commit 0da6864

Please sign in to comment.