diff --git a/Documentation/config-gerrit.txt b/Documentation/config-gerrit.txt index f0ab339351..8ca8a3724c 100644 --- a/Documentation/config-gerrit.txt +++ b/Documentation/config-gerrit.txt @@ -1901,6 +1901,12 @@ Gerrit server. Open and closed changes are indexed in separate indexes named 'changes_open' and 'changes_closed' respectively. +[[index.url]]index.url:: ++ +Only used when the type is `SOLR`. ++ +URL of the index server. + [[index.name.ramBufferSize]]index.name.ramBufferSize:: + Only used when the type is `LUCENE`. diff --git a/gerrit-solr/src/main/java/com/google/gerrit/solr/SolrChangeIndex.java b/gerrit-solr/src/main/java/com/google/gerrit/solr/SolrChangeIndex.java index cf9c73313b..4f452cc73c 100644 --- a/gerrit-solr/src/main/java/com/google/gerrit/solr/SolrChangeIndex.java +++ b/gerrit-solr/src/main/java/com/google/gerrit/solr/SolrChangeIndex.java @@ -100,9 +100,9 @@ class SolrChangeIndex implements ChangeIndex, LifecycleListener { this.indexes = indexes; this.schema = schema; - String url = cfg.getString("index", "solr", "url"); + String url = cfg.getString("index", null, "url"); if (Strings.isNullOrEmpty(url)) { - throw new IllegalStateException("index.solr.url must be supplied"); + throw new IllegalStateException("index.url must be supplied"); } // Version is only used to determine the list of stop words used by the