Home > Mobile >  not working fuzzy logic when use the fuzzines.auto elasticsearch
not working fuzzy logic when use the fuzzines.auto elasticsearch

Time:07-19

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

enter image description here

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~"
    }
  }
}
  • Related