Upgrading to Elasticsearch 8

7.4 U81+, 7.3 U31+

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

Important

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

  1. Back up all Liferay indexes. Depending on your system and your version, you may need to back up additional indexes. See Backing Up Elasticsearch.

  2. Prepare the new Elasticsearch installation.

  3. Upgrade Elasticsearch

  4. 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.

  5. 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.

  6. Restart Liferay; if necessary, reindex all search and spell check indexes.

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

  8. 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 use the snapshot and restore approach to backup your indexes, you can also avoid reindexing. However, whenever you upgrade Liferay alongside Elasticsearch, you must always reindex to account for mappings and settings changes.

If you’ve installed a new Elasticsearch server, you can restore most Liferay indexes by triggering a full or concurrent reindex from the UI, once the Liferay database is upgraded.

Note

On Liferay 7.2/7.3, the Search Tuning (Result Rankings and Synonyms) indexes and any custom indexes are not backed by database storage. These indexes must be restored from a snapshot of the pre-upgrade indexes if setting up a new Elasticsearch server for Liferay 7.2/7.3 or when upgrading from Liferay 7.2/7.3 and setting up a new Elasticsearch server.

Restart Liferay and Reindex

Once Liferay is connected with the Elasticsearch cluster, run a full or concurrent reindex to bring the Liferay data into the new Elasticsearch installation. In some cases a reindex may not be needed:

Upgrade ScenarioReindex Required
Liferay upgraded
Elasticsearch not upgraded
Liferay upgraded
Elasticsearch upgraded
Elasticsearch upgraded using a rolling restart
Liferay not upgraded
Elasticsearch upgraded using a full cluster restart
Liferay not upgraded
Elasticsearch installed from scratch; indexes were not restored
  1. 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.

  2. 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

Education

Contact Us

Connect

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