blob: 69d1f4e2b4e2f18caf2fd38c002ade2b9a758bc3 [file] [log] [blame]
diff --git solr/config/solrconfig.properties solr/config/solrconfig.properties
index b87a305..b87142b 100644
--- solr/config/solrconfig.properties
+++ solr/config/solrconfig.properties
@@ -25,6 +25,10 @@ solr.webapp.domainName=localhost
solr.webapp.portOverride=
solr.webapp.path=/solr
+# complete url with protocol, domainName,port(if require), and webapp path
+# complete url will be given preference if set
+solr.complete.url=https://demo-old.ofbiz.apache.org/solr
+
# Global solr ECA service toggling
# Set to true to enable solr indexing using ECAs/SECAs.
# If set to false, solr services meant to be triggered by ECA/SECA will not execute and will "succeed" silently.
diff --git solr/src/main/java/org/apache/ofbiz/solr/SolrUtil.java solr/src/main/java/org/apache/ofbiz/solr/SolrUtil.java
index 3e05b70..50c8bad 100644
--- solr/src/main/java/org/apache/ofbiz/solr/SolrUtil.java
+++ solr/src/main/java/org/apache/ofbiz/solr/SolrUtil.java
@@ -76,6 +76,10 @@ public final class SolrUtil {
private static final boolean trustSelfSignedCert = getTrustSelfSignedCert();
public static String makeSolrWebappUrl() {
+ final String solrCompleteUrl = UtilProperties.getPropertyValue(solrConfigName, "solr.complete.url");
+ if (UtilValidate.isNotEmpty(solrCompleteUrl)) {
+ return solrCompleteUrl;
+ }
final String solrWebappProtocol = UtilProperties.getPropertyValue(solrConfigName, "solr.webapp.protocol");
final String solrWebappDomainName = UtilProperties.getPropertyValue(solrConfigName, "solr.webapp.domainName");
final String solrWebappPath = UtilProperties.getPropertyValue(solrConfigName, "solr.webapp.path");