I've just started looking into ElasticSearch and had some questions on the fuzzy query. Let's say I had a document like this:
{ "name": "Frankie's Hot Dogs" }
Using the fuzzy query, if I searched using the following parameters, I'd receive no results:
"fuzzy": {
"name": {
"value": "FRANKIES",
"fuzziness": 2
}
}
Is this the expected behavior? I thought that since the field was defaulted to the Standard Analyzer that the name field would be tokenized and lowercased to something like:
["frankie's", "hot", "dogs"]
So wouldn't searching through a fuzzy query automatically lowercase your search terms? Or is this not the case?
Finally, does anyone have any suggestions on querying the data so that FRANKIES would actually return a hit?
Thanks in advance.
Use fuzzy_like_this query
"query": {
"fuzzy_like_this" : {
"fields" : ["name"],
"like_text" : "FRANKIES"
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With