I have an index with french words. I want to apply an analyser on index properties. Let's say I have a title property and I want to consider it as a "french property". I tried this (in kibana):
PUT thing/_mappings/thing
{
"properties": {
"title": {
"type": "text",
"analyzer": "french",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
}
}
}
But it results in:
{
"error": {
"root_cause": [
{
"type": "illegal_argument_exception",
"reason": "Mapper for [title] conflicts with existing mapping in other types:\n[mapper [title] has different [analyzer]]"
}
],
"type": "illegal_argument_exception",
"reason": "Mapper for [title] conflicts with existing mapping in other types:\n[mapper [title] has different [analyzer]]"
},
"status": 400
}
I don't understand why I have this error. If I display mapping (GET thing/_mappings), it contains no existing analyzer (unless I misunderstood something):
// ...
"title": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
}
}
How can I consider my title property as a french property? (source: https://www.elastic.co/guide/en/elasticsearch/reference/current/analysis-lang-analyzer.html)