I am using the _explain API to understand how 2 different documents ended up having different scores. I am surprised to see that for the same field and term, the idf for that term is different. The number of shards for this index is 1.
Here are the excerpts:
doc 1:
"value": 0.8311164,
"description": "weight(description:temperatur in 36) [PerFieldSimilarity], result of:",
"details": [
{
"value": 0.8311164,
"description": "score(doc=36,freq=1.0), product of:",
"details": [
{
"value": 0.3390907,
"description": "queryWeight, product of:",
"details": [
{
"value": 3.9216242,
"description": "idf(docFreq=6, maxDocs=130)",
"details": []
},
{
"value": 0.0864669,
"description": "queryNorm",
"details": []
}
]
},
..........................
doc2
"value": 0.6850641,
"description": "weight(description:temperatur in 57) [PerFieldSimilarity], result of:",
"details": [
{
"value": 0.6850641,
"description": "score(doc=57,freq=1.0), product of:",
"details": [
{
"value": 0.3556344,
"description": "queryWeight, product of:",
"details": [
{
"value": 3.8526313,
"description": "idf(docFreq=5, maxDocs=104)",
"details": []
},
{
"value": 0.09230948,
"description": "queryNorm",
"details": []
}
]
},
...................................
From "Relevance is broken", I understood that having multiple shards can cause this idf discrepancy. But, here I have only 1 shard.
As you can see from the excerpts, the maxDocs is different in both. How is it possible?