null reference
Project: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/commit/587e4393 Tree: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/tree/587e4393 Diff: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/diff/587e4393 Branch: refs/heads/two-dot-o-dev Commit: 587e4393b3d2268d9059877858ac8600bf74318b Parents: 02defc1 Author: Shawn Feldman <sfeld...@apache.org> Authored: Tue Apr 21 14:33:02 2015 -0600 Committer: Shawn Feldman <sfeld...@apache.org> Committed: Tue Apr 21 14:33:02 2015 -0600 ---------------------------------------------------------------------- .../corepersistence/results/ElasticSearchQueryExecutor.java | 4 ++-- .../src/main/java/org/apache/usergrid/persistence/Query.java | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/587e4393/stack/core/src/main/java/org/apache/usergrid/corepersistence/results/ElasticSearchQueryExecutor.java ---------------------------------------------------------------------- diff --git a/stack/core/src/main/java/org/apache/usergrid/corepersistence/results/ElasticSearchQueryExecutor.java b/stack/core/src/main/java/org/apache/usergrid/corepersistence/results/ElasticSearchQueryExecutor.java index 1a47717..ca16bc0 100644 --- a/stack/core/src/main/java/org/apache/usergrid/corepersistence/results/ElasticSearchQueryExecutor.java +++ b/stack/core/src/main/java/org/apache/usergrid/corepersistence/results/ElasticSearchQueryExecutor.java @@ -162,10 +162,10 @@ public class ElasticSearchQueryExecutor implements QueryExecutor { //from legacy code with no QL set. An empty query is functionally equivalent to select all with default //sort ordering - return entityIndex.search( indexScope, types, queryToExecute, query.getLimit() ); + return entityIndex.search( indexScope, types, queryToExecute, query.getLimit() , cursor.get()); } - return entityIndex.search( indexScope, types, queryToExecute, query.getLimit(),cursor.get() ); + return entityIndex.search( indexScope, types, queryToExecute, query.getLimit()); } http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/587e4393/stack/core/src/main/java/org/apache/usergrid/persistence/Query.java ---------------------------------------------------------------------- diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/Query.java b/stack/core/src/main/java/org/apache/usergrid/persistence/Query.java index 02a80af..9f0baf3 100644 --- a/stack/core/src/main/java/org/apache/usergrid/persistence/Query.java +++ b/stack/core/src/main/java/org/apache/usergrid/persistence/Query.java @@ -98,6 +98,7 @@ public class Query { List<Operand> filterClauses = new ArrayList<Operand>(); public Query() { + offset = Optional.absent(); } @@ -273,6 +274,8 @@ public class Query { if ( cursor != null) { q = newQueryIfNull( q ); q.setOffsetFromCursor(cursor); + }else{ + q.offset = Optional.absent(); } if ( limit != null ) {