Elasticsearch 7 is supported for Liferay DXP 7.2. If you’re upgrading Liferay DXP and still running Elasticsearch 6, consider upgrading your Elasticsearch servers too. If you’re setting up a new system and not already running a remote Elasticsearch 6 server, follow the installation guide to install Elasticsearch and the configuration guide to configure the Elasticsearch adapter.
Here, you’ll learn to upgrade an existing Elasticsearch 6 server (or cluster) to Elasticsearch 7:
Back up the application specific indexes for Workflow Metrics and Result Rankings.
In Liferay DXP 7.2, the X-Pack module is now provided out of the box. If you’re using X-Pack security, enable it (it’s disabled by default):
Blacklist the bundled Liferay Connector to Elasticsearch 6.
Install and configure the Liferay Connector to Elasticsearch 7.
Re-index all search and spell check indexes.
Learn about configuring Elasticsearch here.
To preserve data stored in application-specific indexes, use a rolling upgrade for each index you need to preserve across the upgrade.
To blacklist Elasticsearch 6,
Create a configuration file named
Give it these contents:
blacklistBundleSymbolicNames=[ \ "com.liferay.portal.search.elasticsearch6.api", \ "com.liferay.portal.search.elasticsearch6.impl", \ "com.liferay.portal.search.elasticsearch6.spi", \ "com.liferay.portal.search.elasticsearch6.xpack.security.impl", \ "Liferay Connector to X-Pack Security [Elastic Stack 6.x] - Impl" \ ]
Once the Elasticsearch adapter is installed and talking to the Elasticsearch cluster, navigate to Control Panel → Configuration → Search, and click Execute for the Reindex all search indexes entry.
You must also re-index the spell check indexes.
Stuff happens. If that stuff involves an unrecoverable failure during the upgrade to Elasticsearch 7, roll back to Elasticsearch 6 and regroup.
Since your Elasticsearch 6 and 7 are currently two separate installations, this procedure takes only a few steps:
Stop the Liferay Connector to Elasticsearch 6.
Stop Elasticsearch 7 and make sure that the Elasticsearch 6
elasticsearch.ymland the connector app are configured to use the same port (9200 by default).
Start the Elasticsearch server, and then restart the Liferay Connector to Elasticsearch 6.