Affects Version/s: 7.0.X, 7.1.X, 7.2.X
Component/s: Search Infrastructure > Elasticsearch Connector
|DXP Version||Elasticsearch Connector||Affects Version/s||Fixed in|
|DXP 7.0||Liferay Connector to Elasticsearch 6 (Marketplace)||v1.3.0 and prior||Future release|
|DXP 7.1||Liferay Connector to Elasticsearch 6 (bundled)||< FP23||FP23+|
|DXP 7.1||Liferay Connector to Elasticsearch 7 (Marketplace)||v2.0.0||Future release|
|DXP 7.2||Liferay Connector to Elasticsearch 6 (bundled)||< FP11||FP11+|
|DXP 7.2||Liferay Connector to Elasticsearch 7 (Marketplace)||v3.2.1 and prior||Future release|
The fix changes the default index settings shipped with the connectors, thus it requires to perform a full reindex to take effect. Alternatively, the setting can be updated manually on the affected indexes through the REST API: example command:
For consistency, we should apply the same setting on the company indexes as well, in order to create replica shards in every index.
This lack of replicas has caused several issues in the Liferay DXP Cloud deploys, when they lost the content of some Elasticsearch nodes during an intervention.
Verification: follow the steps of
LPS-114158 and look for the index names like "liferay-0" and "liferay-<companyId>" in the response and check the number of replicas.
- Start up 3 Elasticsearch nodes (the test must be done with both 6.x and 7.x ElasticSearch versions)
- Start the same Elasticsearch from 3 terminals (./bin/elasticsearch): this will create a 3-node cluster using a single installation, suitable for testing
- Start up Liferay 7.1.x or 7.2.x
- Go to Control Panel -> Configuration -> System Settings -> Search -> Elasticsearch 6
- Specify all the 3 transport addresses: localhost:9300, localhost:9301, localhost:9302
- Configure it to be Remote
- Go to Control Panel -> Configuration -> Search and confirm it is not using Embedded nodes
- Reindex all Search Indexes
- Open a terminal and run
Expected Result: all the indexes have at least 1 replica
Actual Result: company indexes ("liferay-0" and "liferay-<companyId>") have no replicas.