-
Type:
Bug
-
Status: Closed
-
Resolution: Fixed
-
Affects Version/s: 7.0.X
-
Fix Version/s: 7.0.0 DXP FP86, 7.0.10.12 DXP SP12, 7.0.X
-
Component/s: Core Infrastructure, Search Infrastructure
-
Branch Version/s:7.0.x
-
Backported to Branch:Committed
-
Fix Priority:3
-
Git Pull Request:
When you create a new virtual instance from a non master node of a cluster index mapping are created incorrectly.
The listener in charge of create the index only runs from master node.
Steps to reproduce:
Start a two node cluster of Liferay.
Node 1 (first to start will be the master node of the cluster)
Node 2
Connect to a remote Elasticsearch for having clustered indexes.
Create a new virtual instance in node 2 (slave node)
In ElasticSearch logs we will observe this trace:
[INFO ][o.e.c.m.MetaDataCreateIndexService] [VLKs2wN] [liferay-XXXX] creating index, cause [auto(bulk api)], templates [], shards [5]/[1], mappings []
This is due to ElasticSearch is auto creating index instead of waiting for liferay CreateIndexRequest.
If we take a look at liferay-XXXXX index mappings with the next call:
_http://elasticsearch-ip:9200/liferay-*/_mapping
Mapping for lastName
Expected result:
"lastName":
{"type":"text","store":true},"lastName_sortable":
{"type":"keyword","store":true} Current Result:
lastName":{"type":"text","fields":{"keyword":
{"type":"keyword","ignore_above":256}}},"lastName_sortable":{"type":"text","fields":{"keyword":
{"type":"keyword","ignore_above":256}}},
In 7.1 and above this issue doesn't occurs due to changes made by https://issues.liferay.com/browse/LPS-84409
- is related to
-
LPS-84409 Use SearchEngineHelperUtil directly to avoid additional lifecycle listeners
-
- Closed
-