Reindexing Modes

Liferay 2023.Q4+/GA102+

Reindexing is refreshing all or part of the search index that’s used for searching, and in some cases displaying, Liferay’s content. Execute a reindex from the search administration panel in Global Menu → Control Panel → Search → Index Actions. New reindexing modes are included in the 2023.Q4/GA102 release: Concurrent and Sync. These provide high availability reindexing, so that the reindex process can run while your users continue to search the site’s content, eliminating downtime. Choose from the 3 available reindexing modes:

Reindex ModeDescriptionHigh AvailabilitySupported Actions
Full FullDeletes the index first, then regenerates it.✔ Global: all indexes
✔ Global: spell check dictionaries
✔ Single model reindexing
Concurrent ConcurrentBeta
Creates a new index, leaving the old index in place (i.e., a blue/green reindex) until the new index is ready.
✔ Global: all indexes
✘ Global: spell check dictionaries
✘ Single model reindexing
Sync SyncBeta
Updates existing search index documents, and deletes stale documents when finished.
✔ Global: all indexes
✘ Global: spell check dictionaries
✔ Single model reindexing
note

Concurrent and Sync mode are only available with Elasticsearch.

Choosing the Reindex Mode

A full reindex works in any scenario, whether for all content and indexes or a single model. However, it’s not always the best choice. To avoid downtime due to a long running full reindex process, use concurrent or sync mode whenever possible.

Reindex when:FullConcurrent (Beta)Sync (Beta)
Installing a new Elasticsearch cluster--
Updating field mappings-
Updating index settings-
Upgrading Liferay
Upgrading Elasticsearch
Reindexing after a connection outage
Reindexing a single model1-

✔ The mode is recommended for the scenario

✓ The mode is available for the scenario

- The mode is not available for the scenario

In earlier Liferay versions, reindexing always uses full mode, deleting content from the live production index before regenerating it. This can result in significant search index downtime. With concurrent and sync reindex modes, reindexing is accomplished without deleting the index first. Sync mode updates the index in place, while concurrent mode builds a new index in the background, preserving the old one until it’s ready. High availability of the search index means minimal downtime, which means your site’s users can browse and search your site while you reindex the site’s content.

Choose from Full, Concurrent, or Sync reindex modes, depending on your needs.

Whenever possible, choose concurrent or sync mode to avoid downtime during a reindex. However, there are considerations to account for when deciding which mode is right in your situation.

Full Full Reindex Mode

You must use full mode to index all content when connecting to a new, empty Elasticsearch cluster. In this scenario, high availability is not a consideration. You can also use full mode for single model reindexing when sync mode will not suffice, but sync mode is recommended. For high availability reindexing of all indexes, use concurrent mode instead.

A full reindex proceeds this way:

  1. The original index is deleted.
  2. A new index is created with the latest index settings and field mappings.
  3. Documents are regenerated in the index.

Concurrent Concurrent Reindex Mode

Use concurrent mode for high availability reindexing of all content using a blue/green reindexing strategy. Concurrent mode cannot be used for single model reindexing: instead use sync mode. Concurrent mode serves as a replacement for full reindexing mode when reindexing all content.

A concurrent reindex proceeds this way:

  1. A new index is created with the latest index settings and field mappings.
  2. Documents are regenerated in the index.
  3. The original index is deleted.

Because concurrent reindexing creates a new index alongside the old one, it requires more disk space in the Elasticsearch system’s infrastructure than the other modes. To avoid errors due to insufficient disk space, Liferay estimates whether the available space is sufficient and warns you if it isn’t:

You're warned if Liferay estimates insufficient disk space for a concurrent reindex.

Sync Sync Reindex Mode

Use sync mode for high availability reindexing when primary disk space for Elasticsearch is a concern, or for all high availability single model reindexing needs. There are scenarios when sync mode can’t properly account for system changes, and one of the other modes must be used.

A sync reindex proceeds this way:

  1. Index documents are updated, but not deleted.
  2. Stale documents are deleted.

A sync reindex does not take into account updated index settings or mappings, and is therefore more limited than a concurrent reindex.

Setting the Default Reindexing Mode

Full reindex mode is the default. To change it,

  1. Go to Global MenuControl PanelSystem Settings.

  2. Open the Reindex entry under Platform → Search.

  3. Set the Default Reindex Execution Mode and click Update.

The default reindexing mode is configurable.


  1. Reindexing a single model is occasionally required, and sync mode is recommended in these cases. For example, using certain elements while creating a search blueprint and enabling semantic search require reindexing individual model types.

Capabilities

Product

Contact Us

Connect

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