Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-17442

Make solr url configurable in solr-web plugin

    Details

    • Branch Version/s:
      6.0.x

      Description

      Right now if you want to use a solr instance that is not running on localhost:8080/solr you need to break open the solr-web jar and change the hardcoded url in solr-spring.xml

      This is needlessly cumbersome you could easily make the url configurable by adding the following bean definition to solr-spring.xml

      <bean id="propertyPlaceholderConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
      <property name="properties">
      <props>
      <prop key="solr.url">http://localhost:8080/solr</prop>
      </props>
      </property>
      <property name="systemPropertiesMode" value="2" /> <!-- override -->
      </bean>

      Then reference the placeholder like this :

      <bean id="com.liferay.portal.search.solr.server.BasicAuthSolrServer" class="com.liferay.portal.search.solr.server.BasicAuthSolrServer">
      <constructor-arg type="java.lang.String" value="${solr.url}" />
      </bean>

      That way you could override the default by specifying a system property called solr.url on startup,

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              support-lep@liferay.com SE Support
              Reporter:
              jelmer Jelmer Kuperus (Inactive)
              Votes:
              9 Vote for this issue
              Watchers:
              6 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Packages

                  Version Package