Relevance Score calculation

Hi,
Am new to elastic search and am trying to use EXPLAIN API in elastic search(6.2.4).But am unable to understand terminology used there in calculation TF IDF.

Can you please explain me terms doc_count and doc_freq.

Below is the result I got from EXPLAIN API.

{
"_index": "suggest",
"_type": "phrase_details",
"id": "Q9ZlXWQBv-nPAuW-OH5",
"matched": true,
"explanation": {
"value": 25.682423,
"description": "sum of",
"details": [
{
"value": 22.959066,
"description": "weight(Synonym(tags.start_word:cr tags.start_word:cre tags.start_word:cred tags.start_word:credi tags.start_word:credit tags.start_word:credit tags.start_word:credit c tags.start_word:credit ca) in 544) [PerFieldSimilarity], result of:",
"details": [
{
"value": 22.959066,
"description": "score(doc=544,freq=6.0 = termFreq=6.0\n), product of:",
"details": [
{
"value": 2,
"description": "boost",
"details": []
},
{
"value": 5.5329504,
"description": "idf, computed as log(1 + (docCount - docFreq + 0.5) / (docFreq + 0.5)) from:",
"details": [
{
"value": 4,
"description": "docFreq",
"details": []
},
{
"value": 1137,
"description": "docCount",
"details": []
}
]
},
{
"value": 2.074758,
"description": "tfNorm, computed as (freq * (k1 + 1)) / (freq + k1 * (1 - b + b * fieldLength / avgFieldLength)) from:",
"details": [
{
"value": 6,
"description": "termFreq=6.0",
"details": []
},
{
"value": 1.2,
"description": "parameter k1",
"details": []
},
{
"value": 0.75,
"description": "parameter b",
"details": []
},
{
"value": 14.472296,
"description": "avgFieldLength",
"details": []
},
{
"value": 1,
"description": "fieldLength",
"details": []
}
]
}
]
}
]
},
{
"value": 2.7233558,
"description": "min of:",
"details": [
{
"value": 2.7233558,
"description": "field value function: sqrt(doc['weight'].value * factor=1.0)",
"details": []
},
{
"value": 3.4028235e+38,
"description": "maxBoost",
"details": []
}
]
}
]
}
}

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.