0

I am working on elasticsearch and my query is

"query": {
    "match": {
      "NAME": {
        "query": "test query",
        "fuzziness": "AUTO"
      }
    }
  }

and I have tow string 1- "test query example elastic search" 2- "query example on elastic query and query"

the problem is when search for "test query" it returns the second string not the first one i guess because the elasticsearch gives the repeated words higher score so how to prevent it to give repeated words higher score and I want it a fuzzy search

  • You can use unique filter to remove duplicate tokens https://stackoverflow.com/questions/69158932/elasticsearch-match-query/69161581#69161581 – jaspreet chahal Sep 23 '21 at 13:09
  • Another option is try to disable term frequency (TF) stat https://stackoverflow.com/questions/32192860/elasticsearch-disable-term-frequency-scoring – FireAlkazar Sep 24 '21 at 19:51

0 Answers0