I am running a multimatch best_fields query and the fuzziness parameter is not operating as I expect. I am using a very small simple index to test. The index contains two documents.
{
"_index": "contacts_4",
"_type": "_doc",
"_id": "1",
"_score": 1.0,
"_source": {
"full_name": "Christopher Cleveland"
}
},
{
"_index": "contacts_4",
"_type": "_doc",
"_id": "2",
"_score": 1.0,
"_source": {
"full_name": "Chris Cleveland"
}
}
What I want to happen is for the search term "Chris" to bring back both "Chris Cleveland" and "Christopher Cleveland" in that order.
Here is the structure of my query...
{
"query": {
"multi_match": {
"query": "Chr",
"type": "best_fields",
"fields": [
"full_name"
],
"fuzziness": 6
}
}
}
If I search for "Chr", "Chris", "Christ", "Christo", then as expected, elastic returns the document with full_name = "Chris Cleveland". This is good. But When I search for "Christop", there are no results. Considering I set the fuzziness parameter to 6, shouldn't elastic match any documents with a full_name value that only requires 6 levenstein steps? and isn't adding or removing x characters considered 6 steps? For completeness, I should add that if I search for "Christoph", "Christophe" or "Christopher", elastic returns the document with full_name = "Christopher Cleveland".
What am I missing about how fuzziness or elastic works?
Cheers