The original template:
put _template/com.sap.c4c.abap.wf
{
"index_patterns": ["com.sap.c4c.abap.wf*"],
"settings": {
"number_of_shards": 1,
"number_of_replicas": 1,
"index.lifecycle.name": "com.sap.c4c.abap.wf",
"index.lifecycle.rollover_alias": "com.sap.c4c.abap.wf"
},
"mappings": {
"properties": {
"beforeimageindicator":{"type" : "keyword"},
"calculatedfieldindicator":{"type" : "keyword"},
"client":{"type" : "keyword"},
"customerid":{"type" : "keyword"},
"customername":{"type" : "keyword"},
"dc":{"type" : "keyword"},
"description":{"type" : "keyword"},
"fieldoractionname":{"type" : "keyword"},
"maxconditionsingroup":{"type" : "long"},
"moname":{"type" : "keyword"},
"numberofgroups":{"type" : "long"},
"system":{"type" : "keyword"},
"tenant":{"type" : "keyword"},
"tenantrole":{"type" : "keyword"},
"timestamp":{"type": "date"},
"timingtypecode":{"type" : "keyword"},
"totalnoofconditions":{"type" : "long"},
"typecode":{"type" : "keyword"}
}
},
"version": 1
}
The new template:
put _template/com.sap.c4c.abap.wf
{
"index_patterns": ["com.sap.c4c.abap.wf*"],
"settings": {
"number_of_shards": 1,
"number_of_replicas": 1,
"index.lifecycle.name": "com.sap.c4c.abap.wf",
"index.lifecycle.rollover_alias": "com.sap.c4c.abap.wf"
},
"mappings": {
"properties": {
"beforeimageindicator":{"type" : "keyword"},
"calculatedfieldindicator":{"type" : "keyword"},
"client":{"type" : "keyword"},
"customerid":{"type" : "keyword"},
"customername":{"type" : "keyword"},
"dc":{"type" : "keyword"},
"description":{"type" : "keyword"},
"fieldoractionname":{"type" : "keyword"},
"maxconditionsingroup":{"type" : "long"},
"moname":{"type" : "keyword"},
"numberofgroups":{"type" : "long"},
"system":{"type" : "keyword"},
"tenant":{"type" : "keyword"},
"tenantrole":{"type" : "keyword"},
"timestamp":{"type": "date_nanos"},
"timingtypecode":{"type" : "keyword"},
"totalnoofconditions":{"type" : "long"},
"typecode":{"type" : "keyword"}
}
},
"version": 2
}`
Changing the template worked in 1 elastic cluster, but now I am experiencing the same problem in 2 different elastic clusters.
Basically after updating the index template, I am running the rollover API to move to a new index and apply this settings:
POST /com.sap.c4c.abap.wf/_rollover
{
"conditions": {
"max_age": "1d",
"max_size": "1gb"
}
}
But like I said, when I look into the mapping of the new index on hot phase, the mapping is from the old index template, and this is the problem, but when I see the index template, it has the proper mapping.
Thanks,
Zareh