I want it to return similar results when a word is typed in the search box, even if the word is wrong. For example, when I type "gpple" it should come up with "google". I use Fuzzines.Auto for this but it doesn't work. I am attaching the code I wrote, I would appreciate if you could help. thanks
CodePudding user response:
In the doc QueryString query you must use fuzzy like this (adding operator ~ in the end term:
{
"query": {
"query_string": {
"fields": ["fields_name"],
"query": "searchtext~"
}
}
}