Hello.
I was using an elastic search (rspec, rails) test with 5 documents. Each one has same name field as name "funny". I then ran the following query:
GET /test_videos/_search
{
"explain": true,
"query": {
"bool": {
"must": {
"multi_match": {
"query": "funny",
"fields": ["name", "tags"]
}
}
}
}
}
which gave me 5 hits.
But I couldn't understand the order. Each documents are identical with respect to their name which is funny and all other fields. The only difference is the time of creation (which I am setting as 1 day, 1 month, 1 year, 2 year etc ).
But in the explain api elastic-search suggests that for first three hits, the score is "_score": 0.2876821 while for the last two the score is: "_score": 0.18232156.
Why would that happen if all documents are identical. How can I force elasticsearch to give the same score to exact documents?
Thanks.