I'd like to change the analyzer for an existing index in ElasticSearch, but I can't figure out the syntax (and I'm not grokking the error message).
GET /ccc_test/_mapping
{
"ccc_test": {
"mappings": {
"test_article": {
"properties": {
"id": {
"type": "text"
},
"language": {
"type": "text"
},
"text": {
"type": "text"
},
"title": {
"type": "text"
},
"url": {
"type": "keyword"
}
}
}
}
}
}
Then I close the index with:
POST /ccc_test/_close
And then I'm trying to update the analyzer for the "title" field to Portuguese:
PUT /ccc_test/_mapping/test_article
{
"properties" : {
"title" : {
"type" : "text",
"analyzer" : "portuguese"
}
}
}
But I get this error:
{
"error": {
"root_cause": [
{
"type": "remote_transport_exception",
"reason": "[instance-0000000004][172.17.0.8:19760][indices:admin/mapping/put]"
}
],
"type": "illegal_argument_exception",
"reason": "Mapper for [title] conflicts with existing mapping in other types:\n[mapper [title] has different [analyzer]]"
},
"status": 400
}
So I'm not clear what has a different analyzer. The ccc_test index only contains one type (test_article). I'm on ElasticSearch 5.6