Installing Solr

Solr is a popular enterprise search platform built on Apache Lucene. It’s reliable, scalable, and fault tolerant. Read more about it here.

Elasticsearch is the default search engine that ships with Liferay DXP, and some Liferay Search features are only available on Elasticsearch. It’s valid, however, to use Solr instead. In particular, if you’ve already been using Solr with a previous version of Liferay DXP, or your platform (for example, your OS or JVM) isn’t supported by Elasticsearch, you might choose to use Solr to search and index your Liferay DXP data.

There are circumstances that force you to use Elasticsearch instead of Solr. Read here for more information.

Liferay DXP 7.2, Fix Pack 1, supports Solr 7.5.x through the Liferay Connector to Solr 7 application, version 2.0.0.

Liferay DXP 7.2, Service Pack 1/Fix Pack 2 and later, supports Solr 7.5.x through the Liferay Connector to Solr 7 application, version 2.0.1.

Liferay Portal CE 7.2, GA2 and later (not available at time of writing), support Solr 7.5.x through the Liferay CE Connector to Solr 7 application.

Blacklisting Elasticsearch-Only Features

Before installing Solr, you must blacklist certain DXP features that only work with Elasticsearch.

  1. Create a configuration file named

    com.liferay.portal.bundle.blacklist.internal.BundleBlacklistConfiguration.config
    
  2. Give it these contents:

    blacklistBundleSymbolicNames=["com.liferay.portal.search.tuning.web.api","com.liferay.portal.search.tuning.web","com.liferay.portal.search.tuning.synonyms.web","com.liferay.portal.search.tuning.rankings.web"]
    
  3. Place the file in Liferay Home/osgi/configs.

It is required during the Solr installation process to also stop the Elasticsearch Connectors that ship with Liferay DXP. If you’re ready to blacklist those bundles now, use these contents in the blacklist configuration file:

    blacklistBundleSymbolicNames=["com.liferay.portal.search.tuning.web.api","com.liferay.portal.search.tuning.web","com.liferay.portal.search.tuning.synonyms.web","com.liferay.portal.search.tuning.rankings.web","com.liferay.portal.search.elasticsearch6.spi","com.liferay.portal.search.elasticsearch6.api","com.liferay.portal.search.elasticsearch6.impl","Liferay Connector to X-Pack Monitoring [Elastic Stack 6.x]","Liferay Connector to X-Pack Security [Elastic Stack 6.x]"]

Community Edition users can exclude the X-Pack bundles, as they are DXP-only bundles.

« Configuring Learning to RankInstalling Solr: Basic Installation »
Was this article helpful?
0 out of 0 found this helpful