Hello!
Recently I started studying elasticsearch(8.6.1) and got a very incomprehensible behavior.
My index:
PUT items2/_settings
{
"settings": {
"analysis": {
"filter": {
"ru_stop": {
"type": "stop",
"stopwords": "_russian_"
},
"ru_stemmer": {
"type": "stemmer",
"language": "russian"
},
"first_synonyms": {
"type": "synonym",
"synonyms": ["яицо, яйцо", "курица, куриное"]
}
},
"analyzer": {
"default": {
"tokenizer": "standard",
"filter": [
"lowercase",
"ru_stop",
"ru_stemmer",
"first_synonyms"
],
"char_filter": ["html_strip"]
}
},
"mappings": {
"properties": {
"description": {
"type": "text",
"analyzer": "default"
}
}
}
}
}
}
I add some test doc:
PUT /items2/_doc/14
{
"description" : "Крылья"
}
This fuzzy query doesn't work:
GET /items2/_search
{
"query": {
"fuzzy": {
"description": {
"value": "Крылья",
"fuzziness": "2",
"max_expansions": 5,
"prefix_length": 0,
"transpositions": true
}
}
}
}
But this match query with fuzziness
is working:
GET /items2/_search
{
"query": {
"match": {
"description": {
"query": "Крылья",
"fuzziness": "2",
"max_expansions": 5,
"prefix_length": 0
}
}
}
}
What's wrong with my fuzzy query? Thank you.