Hi,
I have a question on how the scoring being computed on the following query
:
{
"from" : 0,
"size" : 60,
"explain" : true,
"track_scores" : true,
"query" : {
"bool" : {
"should" : [
{ "prefix": { "DISPLAY_NAME" : { "value" : "hap",
"rewrite" : "top_terms_10", "boost" : "3.0" }}},
{ "prefix": {"PERFORMER" :{ "value" : "hap" }}}
]
}
}
}
and it produces result :
"DISPLAY_NAME": "Happier?",
, "_explanation": {
"value": 2.7100196,
"description": "product of:",
"details": [
{
"value": 5.420039,
"description": "sum of:",
"details": [
{
"value": 5.420039,
"description": "sum of:",
"details": [
{
"value": 5.420039,
"description":
"weight(DISPLAY_NAME:happier^3.0 in 32661) [PerFieldSimilarity], result
of:",
"details": [
{
"value": 5.420039,
"description":
"score(doc=32661,freq=1.0 = termFreq=1.0\n), product of:",
"details": [
{
"value":
0.34746242,
"description":
"queryWeight, product of:",
"details": [
{
"value": 3,
"description": "boost"
},
{
*
"value": 15.598923,*
*
"description": "idf(docFreq=2, maxDocs=6566786)"*
},
{
*
"value": 0.0074249236,*
*
"description": "queryNorm"*
}
]
},
{
"value":
15.598923,
"description":
"fieldWeight in 32661, product of:",
"details": [
{
"value": 1,
"description": "tf(freq=1.0), with freq of:",
"details": [
{
"value": 1,
"description": "termFreq=1.0"
}
]
},
{
*
"value": 15.598923,*
*
"description": "idf(docFreq=2, maxDocs=6566786)"*
},
{
"value": 1,
"description": "fieldNorm(doc=32661)"
}
]
}
]
}
]
}
]
}
]
},
{
"value": 0.5,
"description": "coord(1/2)"
}
"DISPLAY_NAME": "Happenings",
,
"_explanation": {
"value": 2.5354335,
"description": "product of:",
"details": [
{
"value": 5.070867,
"description": "sum of:",
"details": [
{
"value": 5.070867,
"description": "sum of:",
"details": [
{
"value": 5.070867,
"description":
"weight(DISPLAY_NAME:happenings^3.0 in 23093) [PerFieldSimilarity], result
of:",
"details": [
{
"value": 5.070867,
"description":
"score(doc=23093,freq=1.0 = termFreq=1.0\n), product of:",
"details": [
{
"value":
0.33608392,
"description": "
queryWeight, product of:",
"details": [
{
"value": 3,
"description": "boost"
},
{
"value":
15.088098,
*
"description": "idf(docFreq=4, maxDocs=6566786)"*
},
{
*
"value": 0.0074249236,*
*
"description": "queryNorm"*
}
]
},
{
"value":
15.088098,
"description": "*fieldWeight
*in 23093, product of:",
"details": [
{
"value": 1,
"description": "tf(freq=1.0), with freq of:",
"details": [
{
"value": 1,
"description": "termFreq=1.0"
}
]
},
{
*
"value": 15.088098,*
*
"description": "idf(docFreq=4, maxDocs=6566786)"*
},
{
"value": 1,
"description": "fieldNorm(doc=23093)"
}
]
}
]
}
]
}
]
}
]
},
{
"value": 0.5,
"description": "coord(1/2)"
}
]
}
}
As both of the display name in the documents matched "Hap" it should have
same scoring however it yields different scoring as shown above. Further
inspection on the explaining i found
out that the different is in the queryWeight->idf and fieldWeight->idf
fields :
-
- "value": 15.598923,*
-
"description": "idf(docFreq=2, maxDocs=6566786)"*
2) "value": 15.088098,
-
"description": "idf(docFreq=4, maxDocs=6566786)"*
I would like to know why the value is different and how this is being
computed and what is docFreq ? Also i would like to know what is
queryWeight as when i use wildcard and prefix query it only will computed
the score with queryWeight otherwise only fieldWeight.
I am using &search_type=dfs_query_then_fetch&preference=_primary in the
query.
And here is the gist for full result :
Thanks.
--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/69cb2ec6-720a-42cf-9de4-36bd81d7ad69%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.