Proximity with Boolean operators?

I would like to run queries with the format:

  query = {
      "size": limit,
      "query": {
          "query_string": {"query": query,
                           "default_operator":"AND"}
      }
  }

Where my query is using both proximity search and boolean of "not":

query: "quick brown -fox"~5

So all results must contain "quick" , "brown" and not "fox" , and all rules should apply for the 5 edit distance words, such that fox can be in the text but it must be more than 5 words from any other keywords (brown and quick)

and idea how to do it?

1 Like

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