How to change analyzer


(Eugene Prokopiev) #1

I tried to change analyzer for field in existing index:

PUT /system/events/_mapping
{
"properties": {
"message": {
"type": "string",
"analyzer": "simple"
}
}
}

The result is:

{
"error": {
"root_cause": [
{
"type": "illegal_argument_exception",
"reason": "Mapper for [message] conflicts with existing mapping in other types:\n[mapper [message] has different [analyzer]]"
}
],
"type": "illegal_argument_exception",
"reason": "Mapper for [message] conflicts with existing mapping in other types:\n[mapper [message] has different [analyzer]]"
},
"status": 400
}

What is wrong and how to change it?


(David Pilato) #2

You can't. You have to create a new mapping


(system) #3