Hi,
I need synonyms for searching my documents and mainly fellow some monuals published, eg.
POST /my_index/_close
PUT /my_index/_settings
{
"settings": {
"analysis": {
"filter": {
"my_synonym_filter": {
"type": "synonym",
"synonyms_path": "synonyms.txt",
"updateable": true
}
},
"analyzer": {
"my_synonym_analyzer": {
"tokenizer": "standard",
"filter": [
"lowercase",
"my_synonym_filter"
]
}
}
}
}
}
Now I like to assign my_synonym_analyzer to the field content using this request:
PUT /my_index/_mapping
{
"properties": {
"content": {
"type": "text",
"analyzer": "my_synonym_analyzer"
}
}
}
But the result reports an error:
{
"error": {
"root_cause": [
{
"type": "mapper_exception",
"reason": "analyzer [my_synonym_analyzer] contains filters [my_synonym_filter] that are not allowed to run in index time mode."
}
],
"type": "mapper_parsing_exception",
"reason": "Failed to parse mapping: analyzer [my_synonym_analyzer] contains filters [my_synonym_filter] that are not allowed to run in index time mode.",
"caused_by": {
"type": "mapper_exception",
"reason": "analyzer [my_synonym_analyzer] contains filters [my_synonym_filter] that are not allowed to run in index time mode."
}
},
"status": 400
}
I study a couple of tutorials but it seems that's a common way to assign the mapping.
Version is 8.15.1 and field type of content is text what I already checked.
Any idea what I'm doing wrong?
Thanks,
Andre