Details
Description
If the Query object has the "key" argument set then paginateQuery is returns empty results. It is is because of the below bug in copy() method in the Query class
public Query copy() {
Query query = new Query();
........
if (args.containsKey(KEY)) {
query.setEndkeyDocID(((String)args.get(KEY)));
}
.......
}
If you look the above code it is setting setEndkeyDocID() instead of setKey(). Can this be fixed asap instead of we trying to override the functionality, please?
Remember that the view can have duplicates so it is still applicable to have filters when we use paginateQuery.
public Query copy() {
Query query = new Query();
........
if (args.containsKey(KEY)) {
query.setEndkeyDocID(((String)args.get(KEY)));
}
.......
}
If you look the above code it is setting setEndkeyDocID() instead of setKey(). Can this be fixed asap instead of we trying to override the functionality, please?
Remember that the view can have duplicates so it is still applicable to have filters when we use paginateQuery.
https://github.com/couchbase/couchbase-java-client/blob/master/src/main/java/com/couchbase/client/protocol/views/Query.java#L183
If you are still seeing this issue, please reopen the ticket and I'll look into it again!