How to filter data despite the spelling mistake and according to the max gap between passed words

If I have these two strings:

  1. George Orwell is my favorite writer
  2. My favorite writers name is George, who was born in 1903 and whose last name is Orwell

Here's the criteria that i would like to apply to my search when searching for 2+ words:

  • search despite spelling mistake (whats does fuzziness)

  • filter result according distance between passed words (for example in first sentence distance between George and Orwell is 0, cause they are side by side, and in second one I have 10 other words between them). So I want to passed words be side by side in returned result. (what does max_gaps in intervals query)

So to tell directly I need to work together in intervals query "fuzziness" and "max_gaps"

Let's search by spelling mistake "George Orwel" - my query should return only first sentence, because it must recognize that George Orwel -> George Orwell and also distance between these two words is 0;

As I said for me It will be ideal if intervals query had the fuzziness :

POST /cases/_search
  "query": {
    "intervals" : {
      "firstName" : {
        "match" : {
          "query" : "George Orwl ",
          "max_gaps" : 0,
           **"fuzziness": 6**

but it doesn't have. So Have you any ideas how should solve such kind of problem

1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.