You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@syncope.apache.org by il...@apache.org on 2019/03/04 10:55:31 UTC
[syncope] branch 2_0_X updated: [SYNCOPE-1440] Adjusting 'from'
param
This is an automated email from the ASF dual-hosted git repository.
ilgrosso pushed a commit to branch 2_0_X
in repository https://gitbox.apache.org/repos/asf/syncope.git
The following commit(s) were added to refs/heads/2_0_X by this push:
new 5bda027 [SYNCOPE-1440] Adjusting 'from' param
5bda027 is described below
commit 5bda0278699988b10d44bc3940a8a1803ab3f1f5
Author: Francesco Chicchiriccò <il...@apache.org>
AuthorDate: Mon Mar 4 11:54:49 2019 +0100
[SYNCOPE-1440] Adjusting 'from' param
---
.../syncope/core/persistence/jpa/dao/ElasticsearchAnySearchDAO.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ext/elasticsearch/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/dao/ElasticsearchAnySearchDAO.java b/ext/elasticsearch/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/dao/ElasticsearchAnySearchDAO.java
index db208a8..7835b30 100644
--- a/ext/elasticsearch/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/dao/ElasticsearchAnySearchDAO.java
+++ b/ext/elasticsearch/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/dao/ElasticsearchAnySearchDAO.java
@@ -181,7 +181,7 @@ public class ElasticsearchAnySearchDAO extends AbstractAnySearchDAO {
final AnyTypeKind kind) {
SearchRequestBuilder builder = searchRequestBuilder(adminRealms, cond, kind).
- setFrom(page <= 0 ? 0 : page - 1).
+ setFrom(itemsPerPage * (page <= 0 ? 0 : page - 1)).
setSize(itemsPerPage < 0 ? elasticsearchUtils.getIndexMaxResultWindow() : itemsPerPage);
addSort(builder, kind, orderBy);