Upgrading to Elasticsearch 7

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:

  1. Install and configure Elasticsearch 7.

  2. Back up the application specific indexes for Workflow Metrics and Result Rankings.

  3. In Liferay DXP 7.2, security is now provided out of the box. If you’re using X-Pack security, enable it (it’s disabled by default):

    xpack.security.enabled: true
    
  4. Blacklist the bundled Liferay Connector to Elasticsearch 6.

  5. Install and configure the Liferay Connector to Elasticsearch 7.

  6. Re-index all search and spell check indexes.

Learn about configuring Elasticsearch here.

Backing up Application-Specific Indexes

To preserve data stored in application-specific indexes, use a rolling upgrade for each index you need to preserve across the upgrade.

Blacklisting Elasticsearch 6

To blacklist Elasticsearch 6,

  1. Create a configuration file named

    com.liferay.portal.bundle.blacklist.internal.BundleBlacklistConfiguration.config
    
  2. 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 Enterprise Search Security  - Impl" \
    ]
    

Re-index

Once the Elasticsearch adapter is installed and talking to the Elasticsearch cluster, navigate to Control PanelConfigurationSearch, and click Execute for the Reindex all search indexes entry.

You must also re-index the spell check indexes.

Reverting to Elasticsearch 6

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:

  1. Stop the Liferay Connector to Elasticsearch 6.

  2. Stop Elasticsearch 7 and make sure that the Elasticsearch 6 elasticsearch.yml and the connector app are configured to use the same port (9200 by default).

  3. Start the Elasticsearch server, and then restart the Liferay Connector to Elasticsearch 6.

« Upgrading to Elasticsearch 6.8Installing Liferay Enterprise Search »
Was this article helpful?
0 out of 0 found this helpful