Upgrading to Elasticsearch 8

7.4 U81+, 7.3 U31+

Elasticsearch 8 is supported and recommended for the latest Liferay 7.4 Update and GA release out of the box. For specific version compatibility details, refer to the Search Engine Compatibility Matrix.

Important

Before upgrading Elasticsearch, back up your existing data. If something goes wrong during or after the upgrade, roll back to the previous version using the uncorrupted index snapshots. Follow the steps in Backing up Elasticsearch.

To upgrade an existing Elasticsearch 7 server (or cluster) to Elasticsearch 8,

  1. Back up the Liferay Company and System Indexes.

  2. Back up the application specific indexes for Search Tuning (Synonym Sets and Result Rankings).

  3. Prepare the new Elasticsearch installation.

  4. Upgrade Elasticsearch

  5. If you’re using X-Pack security, it’s enabled by default in Elasticsearch 8. To disable it, add this property:

    xpack.security.enabled: false
    

    See Securing Elasticsearch for detailed coverage of the security configuration.

  6. Configure the Elasticsearch connection.

    Note

    The bundled connector for Elasticsearch 7 is used to connect to Elasticsearch 8 through Elasticsearch’s REST API compatibility. See the connector reference guide for the applicable System Settings and configuration file names.

  7. Restart Liferay, then reindex all search and spell check indexes.

    Note

    If you performed a rolling upgrade, reindexing is not necessary.

  8. Restore Search Tuning indexes from the snapshot. If you were previously using these features, you may have data stored in these indexes.

  9. Verify that Search Tuning entries have been carried over.

Upgrading Elasticsearch

If you are using a rolling restart-eligible version, doing a rolling upgrade is the recommended way to upgrade your Elasticsearch cluster as it minimizes downtime and eliminates the need to reindex all your data. Otherwise, follow the full cluster restart upgrade guide.

If you’ve installed a new Elasticsearch server and want to index your pre-upgrade data, most Liferay indexes can be restored by triggering a reindex from the UI, once the Liferay database is upgraded. However, the Search Tuning (Result Rankings and Synonyms) indexes and any custom indexes not backed by database storage must be restored from a snapshot of the pre-upgrade indexes.

Restart Liferay and Reindex

Once Liferay is connected with the Elasticsearch cluster, restart Liferay and reindex the applicable indexes into the new Elasticsearch installation:

  1. Restart Liferay.

  2. If you’ve performed a full cluster restart upgrade, you must reindex the company, system, and spell check indexes. From the Global Menu (Global Menu), navigate to Control PanelConfigurationSearch. Click Execute for the Reindex All Search Indexes entry.

  3. If you’ve performed a full cluster restart upgrade, you must reindex the Workflow Metrics indexes: from the Global Menu (Global Menu), navigate to ApplicationsWorkflow—Metrics. Open the Settings menu (Options and Click Reindex All. Repeat the process for each Virtual Instance.

This restores the indexes built from data stored in the Liferay database. To restore indexes used as primary storage, see Backing Up Elasticsearch.

Capabilities

Product

Contact Us

Connect

Powered by Liferay
© 2024 Liferay Inc. All Rights Reserved • Privacy Policy