I have created an index template, where I am defining an "ignore_above" mapping parameter for a "keyword" field type.
Now I want to update the mappings and want to add a new parameter "eager_global_ordinals" for the same "keyword" field using the PUT mappings API,
I can see the API returning 200OK.
So to verify the mapping when I call GET index-name, I can see the new mappings "eager_global_ordinals", but not able to see "ignore_above"?
I checked, and found out that "ignore_above" property is getting overrided with default value?
Meaning PUT mappings API overriding the mappings parameter to default value, if i dont pass any.
is there any way to avoid this behavior?
Commands I have tried in sequence:
PUT /_index_template/example_template
{
"index_patterns": [
"example*"
],
"priority": 1,
"template": {
"aliases": {
"example":{}
},
"mappings": {
"_source":
{"enabled": false},
"properties": {
"SomeID":
{ "type": "keyword", "index" : true,"store":true,"ignore_above":5}
}
}
}
}
PUT example10022021
GET example10022021
In this GET API response you can see "ignore_above" parameter in mappings
PUT /example/_mappings
{
"properties": {
"SomeID": {
"type": "keyword",
"store":true,
"eager_global_ordinals":true
}
}
}
Now again
GET example10022021
Now you can see in the response that "ignore_above" parameter is NOT present