Add secondary index implementation using SolrCloud
SolrCloud can be used instead of Lucene by adding "type = SOLR" under [index] and "url = <zookeeper-url>" under [index "solr"] in gerrit.config. Change-Id: I0ff8579c5e23c58b16f3605bc20eba4e80fb40fc
This commit is contained in:
committed by
Shawn Pearce
parent
9279b29da7
commit
404c8246bc
@@ -36,9 +36,15 @@ import org.eclipse.jgit.lib.Config;
|
||||
* implementations (e.g. Lucene).
|
||||
*/
|
||||
public class IndexModule extends AbstractModule {
|
||||
public static boolean isEnabled(Injector injector) {
|
||||
return injector.getInstance(Key.get(Config.class, GerritServerConfig.class))
|
||||
.getBoolean("index", null, "enabled", false);
|
||||
public enum IndexType {
|
||||
SQL, LUCENE, SOLR;
|
||||
}
|
||||
|
||||
/** Type of secondary index. */
|
||||
public static IndexType getIndexType(Injector injector) {
|
||||
Config cfg = injector.getInstance(
|
||||
Key.get(Config.class, GerritServerConfig.class));
|
||||
return cfg.getEnum("index", null, "type", IndexType.SQL);
|
||||
}
|
||||
|
||||
private final int threads;
|
||||
|
||||
Reference in New Issue
Block a user