Skip to content
Snippets Groups Projects
Commit 18e55ac4 authored by Thomas Mortagne's avatar Thomas Mortagne
Browse files

XWIKI-17183: solr.remote.url property in xwiki.properties does not work anymore

parent b72eda25
No related branches found
No related tags found
No related merge requests found
......@@ -63,9 +63,15 @@ public class RemoteSolr extends AbstractSolr implements Initializable
@Override
public void initialize() throws InitializationException
{
String remoteURL = this.configuration.getInstanceConfiguration(TYPE, "baseURL", DEFAULT_REMOTE_URL);
String baseURL = this.configuration.getInstanceConfiguration(TYPE, "baseURL", DEFAULT_REMOTE_URL);
this.rootClient = new HttpSolrClient.Builder(remoteURL).build();
this.rootClient = new HttpSolrClient.Builder(baseURL).build();
// RETRO COMPATIBILITY: the seach core used to be configured using "solr.remote.url" property
String searchCoreURL = this.configuration.getInstanceConfiguration(TYPE, "url", null);
if (searchCoreURL != null) {
this.clients.put("search", new HttpSolrClient.Builder(searchCoreURL).build());
}
}
@Override
......
......@@ -583,10 +583,10 @@ extension.versioncheck.environment.enabled=$xwikiPropertiesEnvironmentVersionChe
#-# The default is the subfolder "store/solr" inside folder defined by the property "environment.permanentDirectory".
# solr.embedded.home=/var/local/xwiki/store/solr
#-# [Since 4.5M1]
#-# The URL to use to connect to the remote solr server.
#-# [Since 12.2]
#-# The URL of the Solr server (the root server and not the URL of a core).
#-# The default value assumes that the remote Solr server is started in a different process on the same machine, using the default port.
# solr.remote.url=http://localhost:8983/solr
# solr.remote.baseURL=http://localhost:8983/solr
#-# [Since 5.1M1]
#-# Elements to index are not sent to the Solr server one by one but in batch to improve performances.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment