Trying to extends a field mapper returns exception...
The field:
...
"detail.data.myfield": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
},
"wildcard_field": {
"type": "wildcard"
}
}
},
....
first try:
// the query with curl
curl -X PUT "http://127.0.0.1:9200/myindex/_mapping?pretty" -H 'Content-Type: application/json' -d'
{
"properties":{
"data.detail.myfield":{
"type":"text", "fields":{
"keyword":{
"type":"keyword", "normalizer":"strtolower"
}
}
}
}
}'
Exception:
Mapper for [data.detail.myfield.keyword] conflicts with existing mapper:\n\tCannot update parameter [normalizer] from [null] to [strtolower]
second try
curl -X PUT "http://127.0.0.1:9200/myindex/_mapping?pretty" -H 'Content-Type: application/json' -d'
{
"properties":{
"data.detail.myfield.keyword": {
"type":"keyword", "normalizer":"strtolower"
}
}
}'
Exception:
{
"error" : {
"root_cause" : [
{
"type" : "illegal_argument_exception",
"reason" : "can't merge a non object mapping [data.detail.myfield] with an object mapping"
}
],
"type" : "illegal_argument_exception",
"reason" : "can't merge a non object mapping [data.detail.myfield] with an object mapping"
},
"status" : 400
}
How to use the mapping api to add a custom normalizer to existing field?