Search Administration and Tuning

Search Administration

In Control Panel → Search there are three administrative UIs: Connections, Index Actions, and Field Mappings. Connections shows you the search engines your installation is connected to, Index Actions is an interface for reindexing, and Field Mappings display fields mapped from Liferay to your search index.

The Search Administration panel contains three management screens.

Connections

Information about the search engine connection(s) is displayed here. For example,

  • Search Engine Vendor: Elasticsearch
  • Client Version: 8.19.11
  • Active Connections: 1
  • Health: Green
  • Connection ID: _REMOTE_
  • Connection Type: Read/Write
  • Cluster Name: LiferayElasticsearchCluster
  • Nodes: 1
  • Node Name: lr-es
  • Node Version: 8.19.13

Index Actions

In Index Actions you can reindex Liferay’s data.

Reindex using the Index Actions user interface.

The Actions list is grouped:

  • Global holds All Search Indexes and All Spell Check Dictionaries.
  • Each application’s group, such as Account, holds one entry per indexable type.
  • The Search Tuning and Workflow groups at the end hold one entry per application index (Liferay DXP 2026.Q4+ for Workflow). See Reindexing Search Tuning and Workflow Indexes.
  1. Open Global Menu → Control Panel → Search and click the Index Actions tab.

  2. [Liferay DXP 2023.Q4+/Portal GA102+] Choose the Reindex Mode.

    Choose the reindexing mode.

    In Liferay DXP 2023.Q4/Portal GA102+ and later, you can configure the mode of the reindex to avoid search downtime. To learn about the introduced Concurrent and Sync modes, see Reindexing Modes.

  3. [Liferay 7.4+] Choose the Reindex Scope, selecting the instances to reindex.

    Select the instances to reindex.

    Beginning in Liferay 7.4, you can limit the scope of the reindex actions to specific Virtual Instances.

  4. Click Reindex for the entry you want to reindex.

  5. [Liferay DXP 2023.Q4+/Portal GA102+] Click Execute in the dialog to confirm the reindex.

    Confirm that you'd like to reindex.

Reindexing All Content

When you reindex all content, all search engine documents in the system and company indexes are dropped and recreated from the database. On Liferay 7.4 and later, the reindex also rebuilds the Search Tuning indexes (Result Rankings and Synonym Sets). On Liferay DXP 2026.Q4 and later, it also rebuilds the Workflow Metrics indexes and creates any that are missing.

Warning

No reindex mode rebuilds the Commerce machine learning (ML) indexes or the Analytics Cloud recommendation indexes. Their data exists only in the search engine, and they don’t appear in Index Actions. Back them up with snapshots so you can restore them. See Backing Up Indexes Before Upgrading.

When the search engine is Elasticsearch, its log prints update_mapping messages during the reindex:

{"type": "server", "timestamp": "2023-01-10T14:33:04,513Z", "level": "INFO", "component": "o.e.c.m.MetadataMappingService", "cluster.name": "LiferayElasticsearchCluster", "node.name": "lr-es", "message": "[liferay-20097/mc59Scl8TJeuvcDR3y2W-g] update_mapping [LiferayDocumentType]", "cluster.uuid": "QnWxrpxaSUKF2upHDNWKkQ", "node.id": "thpwCzS_TvGgfVxQ-P_l9g"

In Liferay 7.4 U45+/GA45+ and Liferay DXP 7.3 U14+, Liferay’s log reports when the reindex starts and finishes for system and company indexes. For example,

2023-01-09 20:44:17.730 INFO  [liferay/background_task-2][ReindexPortalBackgroundTaskExecutor:57] Start reindexing company 0
2023-01-09 20:44:53.677 INFO  [liferay/background_task-2][ReindexPortalBackgroundTaskExecutor:76] Finished reindexing company 0
2023-01-09 20:44:53.677 INFO  [liferay/background_task-2][ReindexPortalBackgroundTaskExecutor:57] Start reindexing company 20097
2023-01-09 20:45:00.986 INFO  [liferay/background_task-2][ReindexPortalBackgroundTaskExecutor:76] Finished reindexing company 20097

For earlier updates and Liferay Portal 7.3, enable these logging configurations to see similar information:

Logger CategoryLevel
com.liferay.portal.search.internal.background.task.ReindexStatusMessageSenderImplDEBUG
com.liferay.portal.search.internal.SearchEngineInitializerINFO

Reindexing Individual Types

When you reindex an individual type (e.g., com.liferay.account.model.AccountEntry), the index documents representing the entities are dropped and recreated from the database. Elasticsearch’s log prints an update_mapping message:

{"type": "server", "timestamp": "2023-01-10T14:38:12,302Z", "level": "INFO", "component": "o.e.c.m.MetadataMappingService", "cluster.name": "LiferayElasticsearchCluster", "node.name": "lr-es", "message": "[liferay-20097/mc59Scl8TJeuvcDR3y2W-g] update_mapping [LiferayDocumentType]", "cluster.uuid": "QnWxrpxaSUKF2upHDNWKkQ", "node.id": "thpwCzS_TvGgfVxQ-P_l9g"

In Liferay 7.4 U45+/GA45+ and Liferay DXP 7.3 U14+, Liferay’s log reports when the reindex starts and finishes. For example,

2023-01-10 14:14:00.840 INFO  [liferay/background_task-2][ReindexSingleIndexerBackgroundTaskExecutor:122] Start reindexing company 20097 for class name com.liferay.account.model.AccountEntry
2023-01-10 14:14:00.907 INFO  [liferay/background_task-2][ReindexSingleIndexerBackgroundTaskExecutor:145] Finished reindexing company 20097 for class name com.liferay.account.model.AccountEntry

Reindexing Search Tuning and Workflow Indexes

The last two groups in the Actions list hold the entries for indexes that applications own. The Search Tuning group lists the Ranking and Synonym Set entries. They back Result Rankings and Synonym Sets. Liferay DXP 2026.Q4+ The Workflow group lists the Workflow Metrics Instance, Node, Process, SLA Instance Result, SLA Task Result, Task, and Transition entries. These indexes are related, so reindexing one entry can also reindex others.

Concurrent mode can’t reindex an individual entry, so select the Full or Sync reindex mode. Then click the entry’s Reindex button.

The Search Tuning and Workflow groups in Index Actions each list their application indexes with a Reindex button.

The Liferay DXP log reports Finished reindexing company [companyId] for class name [reindexer class] with execution mode [mode] when the reindex finishes.

Before Liferay DXP 2026.Q4, Index Actions doesn’t list the Workflow Metrics indexes. Reindex them from the Workflow Metrics application’s Settings page instead. See Reindexing Workflow Metrics.

Reindexing Spell Check Dictionaries

Reindex the spell check dictionaries every time you reindex all content. When you reindex the spell check dictionaries, the content of Liferay’s dictionary file for each language (e.g., com/liferay/portal/search/dependencies/spellchecker/en_US.txt) is reindexed for the system and company index. Elasticsearch’s log prints an update_mapping message:

{"type": "server", "timestamp": "2023-01-10T14:33:14,991Z", "level": "INFO", "component": "o.e.c.m.MetadataMappingService", "cluster.name": "LiferayElasticsearchCluster", "node.name": "lr-es", "message": "[liferay-0/9ZIx-bT6TyiekzarKELQkA] update_mapping [LiferayDocumentType]", "cluster.uuid": "QnWxrpxaSUKF2upHDNWKkQ", "node.id": "thpwCzS_TvGgfVxQ-P_l9g"  }

In Liferay 7.4 U45+/GA45+ and Liferay DXP 7.3 U14+, Liferay’s log reports when the reindex starts and finishes. For example,

2023-01-10 14:16:34.170 INFO  [http-nio-8080-exec-7][BaseSpellCheckIndexWriter:278] Start indexing dictionary com/liferay/portal/search/dependencies/spellchecker/en_US.txt for company 0
2023-01-10 14:16:41.592 INFO  [http-nio-8080-exec-7][BaseSpellCheckIndexWriter:301] Finished indexing dictionary com/liferay/portal/search/dependencies/spellchecker/en_US.txt for company 0
2023-01-10 14:16:41.593 INFO  [http-nio-8080-exec-7][BaseSpellCheckIndexWriter:278] Start indexing dictionary com/liferay/portal/search/dependencies/spellchecker/es_ES.txt for company 0
2023-01-10 14:16:44.570 INFO  [http-nio-8080-exec-7][BaseSpellCheckIndexWriter:301] Finished indexing dictionary com/liferay/portal/search/dependencies/spellchecker/es_ES.txt for company 0
2023-01-10 14:16:44.571 INFO  [http-nio-8080-exec-7][BaseSpellCheckIndexWriter:278] Start indexing dictionary com/liferay/portal/search/dependencies/spellchecker/en_US.txt for company 20097
2023-01-10 14:16:49.547 INFO  [http-nio-8080-exec-7][BaseSpellCheckIndexWriter:301] Finished indexing dictionary com/liferay/portal/search/dependencies/spellchecker/en_US.txt for company 20097
2023-01-10 14:16:49.548 INFO  [http-nio-8080-exec-7][BaseSpellCheckIndexWriter:278] Start indexing dictionary com/liferay/portal/search/dependencies/spellchecker/es_ES.txt for company 20097
2023-01-10 14:16:52.235 INFO  [http-nio-8080-exec-7][BaseSpellCheckIndexWriter:301] Finished indexing dictionary com/liferay/portal/search/dependencies/spellchecker/es_ES.txt for company 20097

Field Mappings

The Field Mappings tab shows you all field mappings that are effective in the system, by index. Currently, you can view the mappings, copy them, zoom in or out, and view them with a dark theme.

Inspect the field mappings for any index in the Elasticsearch cluster.