Change the Relevance order

I understand how elasticsearch calculate the score.
The key factors are,

  1. TF
  2. IDF
  3. Field Lenth Norms

But here is my case,
If searching for a phrase, "Raj feels difficult",

If the document contains "Raj" more times than "Raj feels difficult", it is listed in the top.
I have tried by disabling, norms
"norms":
{
"enabled": "false"
}
and set "index_options": "docs",

But the result is same.
Can anyone help me on this?
Thanks in advance.

What type of query are you using?

I believe the match_phrase query might help you with your problem:

https://www.elastic.co/guide/en/elasticsearch/guide/current/phrase-matching.html

Did you check out explain to better understand how scoring works?

https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-explain.html

Hope this helps,
Isabel

1 Like