Add support for secondary index with Elasticsearch
Add support for secondary index on Elasticsearch via the REST API using the Jest client [1]. Because Elasticsearch uses different version of Lucene we add another maven_jar's in gerrit-elasticsearch BUCK. Fortunately both versions have compatible API, this way we are able to compile and run Gerrit. All tests for changes index passes, but they need to use Lucene's based account index. [1] http://www.searchly.com/documentation/developer-api-guide/java-jest/ TODO: Add support for online reindex TODO: Add support for schema upgrades Also-By: Janice Agustin <janice.agustin@ericsson.com> Also-By: Olga Grinberg <olga.grinberg@ericsson.com> Also-By: Dariusz Luksza <dluksza@collab.net> Change-Id: I5e4fc08ce34d33c090c9e0bf320de1b17309f774
This commit is contained in:
committed by
David Pursehouse
parent
b4d30002d6
commit
8e72f5301b
@@ -20,6 +20,7 @@ import static com.google.inject.Stage.PRODUCTION;
|
||||
import com.google.common.base.Splitter;
|
||||
import com.google.gerrit.common.EventBroker;
|
||||
import com.google.gerrit.extensions.client.AuthType;
|
||||
import com.google.gerrit.elasticsearch.ElasticIndexModule;
|
||||
import com.google.gerrit.gpg.GpgModule;
|
||||
import com.google.gerrit.httpd.auth.oauth.OAuthModule;
|
||||
import com.google.gerrit.httpd.auth.openid.OpenIdModule;
|
||||
@@ -343,6 +344,8 @@ public class WebAppInitializer extends GuiceServletContextListener
|
||||
switch (indexType) {
|
||||
case LUCENE:
|
||||
return LuceneIndexModule.latestVersionWithOnlineUpgrade();
|
||||
case ELASTICSEARCH:
|
||||
return ElasticIndexModule.latestVersionWithOnlineUpgrade();
|
||||
default:
|
||||
throw new IllegalStateException("unsupported index.type = " + indexType);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user