Issue 2879: Gerrit query using secondary index is capped to 1000
Status:  Released
Owner: ----
Closed:  Sep 2014
Project Member Reported by bassem.rabil, Sep 2, 2014
************************************************************
***** NOTE: THIS BUG TRACKER IS FOR GERRIT CODE REVIEW *****
***** DO NOT SUBMIT BUGS FOR CHROME, ANDROID, INTERNAL *****
***** ISSUES WITH YOUR COMPANY'S GERRIT SETUP, ETC.    *****
***** THOSE ISSUE BELONG IN DIFFERENT ISSUE TRACKERS!  *****
************************************************************

Affected Version:
Gerrit 2.9

What steps will reproduce the problem?
1. Set Global capability for query limit to 5000.
2. ssh -p 29418 <Gerrit-URL> gerrit query --format JSON ' status:open branch:dev project:<project-name> '


What is the expected output? What do you see instead?
Expected to display over 2000 changes, it looks like there is a hard coded limit to 1000 changes in lucene search.

Please provide any additional information below.
I am quoting from the source code file at:

https://gerrit.googlesource.com/gerrit/+/45661d83d3f4c0aebc42accaa2f6f748ebbb2ae2/gerrit-lucene/src/main/java/com/google/gerrit/lucene/LuceneChangeIndex.java

"
private class QuerySource implements ChangeDataSource {
// TODO(dborowitz): Push limit down from predicate tree.
private static final int LIMIT = 1000;
"
Sep 2, 2014
Project Member #1 david.pu...@sonymobile.com
The hard coded limit in the REST API was removed in a later change [1] which was included from Gerrit 2.8

[1] https://gerrit-review.googlesource.com/#/c/48561/
Sep 2, 2014
Project Member #2 david.pu...@sonymobile.com
It's actually limited here:

https://gerrit.googlesource.com/gerrit/+/master/gerrit-server/src/main/java/com/google/gerrit/server/index/IndexRewriteImpl.java

Line 65: static final int MAX_LIMIT = 1000;

This seems to apply to all indexes; not only Lucene.

Summary: Gerrit query using secondary index is capped to 1000 (was: Gerrit query using lucene is capped to 1000)
Status: Accepted
Sep 2, 2014
Project Member #3 david.pu...@sonymobile.com
https://gerrit-review.googlesource.com/59717
Status: ChangeUnderReview
Sep 8, 2014
Project Member #4 david.pu...@sonymobile.com
(No comment was entered for this change.)
Status: Submitted
Labels: FixedIn-2.9.1
Sep 11, 2014
Project Member #5 david.pu...@sonymobile.com
(No comment was entered for this change.)
Status: Released