I want to create an index with an ngram analyzer. This is what I do
PUT /my_index/
{
"settings": {
"analysis": {"filter": {
"trigrams_filter": {
"type": "ngram",
"min_gram": 3,
"max_gram": 3,
"token_chars": [
"letter",
"digit"
]
}
},
"analyzer": {
"trigrams": {
"type": "custom",
"tokenizer": "standard",
"filter": [
"lowercase",
"trigrams_filter"
]
}
}
}
}
}
Now I want to edit the mapping like this
PUT /my_index/_mapping/_all
{
"title": {
"properties": {
"title": {
"type": "text",
"fields": {
"general": {
"type": "text",
"analyzer": "trigrams"
}
}
}
}
}
}
what leads to this error message
{
"error": {
"root_cause": [
{
"type": "mapper_parsing_exception",
"reason": "Root mapping definition has unsupported parameters: [title : {properties={title={type=text, fields={general={type=text, analyzer=trigrams}}}}}]"
}
],
"type": "mapper_parsing_exception",
"reason": "Root mapping definition has unsupported parameters: [title : {properties={title={type=text, fields={general={type=text, analyzer=trigrams}}}}}]"
},
"status": 400
}
I have no idea what I am doing wrong please help me