2

I wrote the following query concerning a field that is tokenized by whitespace :

"match"  {
    "field" : {
        "query" : "bora"
    }
}

I have two documents that matches the query on my index, one with "bora" on that field, another with "bora bora".

My problem is that "bora bora" document ends up with a better score than the other and this is not the required behaviour.

Do you see a way to do the same query but prioritizing the records which are not a repetition of the searched word ?

I can't update the index / remove the tokenization.

eli0tt
  • 677
  • 1
  • 7
  • 19

0 Answers0