Add index configuration to specify maximum possible limit
Implementations may not support returning up to Integer.MAX_VALUE results, so allow this to be specified per implementation. This is distinct from the configured per-user limits, as it represents a fundamental limitation of the underlying index backend rather than an administrative decision. Encapsulate this in its own class that can be injected into QueryProcessor, and use this in the limit computation. Change-Id: I7d1093a2aa3800ff5437c6b1c78b12d73b17db05
This commit is contained in:
@@ -18,6 +18,7 @@ import com.google.gerrit.extensions.events.LifecycleListener;
|
||||
import com.google.gerrit.lifecycle.LifecycleModule;
|
||||
import com.google.gerrit.server.index.ChangeSchemas;
|
||||
import com.google.gerrit.server.index.IndexCollection;
|
||||
import com.google.gerrit.server.index.IndexConfig;
|
||||
import com.google.gerrit.server.index.IndexModule;
|
||||
import com.google.gerrit.server.index.Schema;
|
||||
import com.google.gerrit.server.query.change.ChangeData;
|
||||
@@ -43,6 +44,7 @@ public class LuceneIndexModule extends LifecycleModule {
|
||||
|
||||
@Override
|
||||
protected void configure() {
|
||||
bind(IndexConfig.class).toInstance(IndexConfig.createDefault());
|
||||
factory(LuceneChangeIndex.Factory.class);
|
||||
install(new IndexModule(threads));
|
||||
if (singleVersion == null && base == null) {
|
||||
|
Reference in New Issue
Block a user