IndexConfig: Configure maxLimit from Config
An index implementation may not have an inherent upper bound to the limit, but administrators may nonetheless want to restrict the maximum query size at the server level for performance reasons. Change-Id: Ic1f506e9857413ec860fe97785bff9e76b817db0
This commit is contained in:
@@ -50,7 +50,6 @@ public class SolrIndexModule extends LifecycleModule {
|
||||
|
||||
@Override
|
||||
protected void configure() {
|
||||
bind(IndexConfig.class).toInstance(IndexConfig.createDefault());
|
||||
install(new IndexModule(threads));
|
||||
bind(ChangeIndex.class).to(SolrChangeIndex.class);
|
||||
listener().to(SolrChangeIndex.class);
|
||||
@@ -59,6 +58,12 @@ public class SolrIndexModule extends LifecycleModule {
|
||||
}
|
||||
}
|
||||
|
||||
@Provides
|
||||
@Singleton
|
||||
IndexConfig getIndexConfig(@GerritServerConfig Config cfg) {
|
||||
return IndexConfig.fromConfig(cfg);
|
||||
}
|
||||
|
||||
@Provides
|
||||
@Singleton
|
||||
public SolrChangeIndex getChangeIndex(@GerritServerConfig Config cfg,
|
||||
|
||||
Reference in New Issue
Block a user