Stefan Langenmaier created SOLR-12323:
-----------------------------------------
Summary: Missing explain information
Key: SOLR-12323
URL: https://issues.apache.org/jira/browse/SOLR-12323
Project: Solr
Issue Type: Bug
Security Level: Public (Default Security Level. Issues are Public)
Affects Versions: 7.3
Reporter: Stefan Langenmaier
We have a problem in Solr 7.3 with the explain field when the edismax query
parser is used with the boost parameter.
To reproduce the issue I created a collection "mycollection" with the default
configset and indexed the following csv data:
{code:java}
title_txt,rating_i
mytext,2
{code}
When I issue the following query to analyse the computation of the score
[http://localhost:8983/solr/mycollection/select?boost=rating_i&defType=edismax&fl=*,score,[explain]&q=title_txt:mytext]
I receive the following response:
{code:java}
{
"responseHeader":{
"status":0,
"QTime":3,
"params":{
"q":"title_txt:mytext",
"defType":"edismax",
"fl":"*,score,[explain]",
"boost":"rating_i"}},
"response":{"numFound":1,"start":0,"maxScore":0.5753642,"docs":[
{
"title_txt":["mytext"],
"rating_i":2,
"id":"3a7299dc-9628-403b-935b-0ddf17e74897",
"_version_":1599803310411350016,
"score":0.5753642,
"[explain]":"0.5753642 = product of:\n 1.0 = boost\n 0.5753642 =
boost(int(rating_i))\n"}]
}}
{code}
The explain no longer contains all the information of the score. For comparison
with Solr 7.2.1 but otherwise the same setup the output looks like this:
{code:java}
{
"responseHeader":{
"status":0,
"QTime":3,
"params":{
"q":"title_txt:mytext",
"defType":"edismax",
"fl":"*,score,[explain]",
"boost":"rating_i"}},
"response":{"numFound":1,"start":0,"maxScore":0.5753642,"docs":[
{
"title_txt":["mytext"],
"rating_i":2,
"id":"747b9102-0566-4786-a155-87fac10388cc",
"_version_":1599803926880714752,
"score":0.5753642,
"[explain]":"0.5753642 = boost(title_txt:mytext,int(rating_i)), product
of:\n 0.2876821 = weight(title_txt:mytext in 0) [SchemaSimilarity], result
of:\n 0.2876821 = score(doc=0,freq=1.0 = termFreq=1.0\n), product of:\n
0.2876821 = idf, computed as log(1 + (docCount - docFreq + 0.5) / (docFreq +
0.5)) from:\n 1.0 = docFreq\n 1.0 = docCount\n 1.0 = tfNorm,
computed as (freq * (k1 + 1)) / (freq + k1 * (1 - b + b * fieldLength /
avgFieldLength)) from:\n 1.0 = termFreq=1.0\n 1.2 = parameter
k1\n 0.75 = parameter b\n 1.0 = avgFieldLength\n 1.0 =
fieldLength\n 2.0 = int(rating_i)=2\n"}]
}}
{code}
When the boost parameter gets remove Solr 7.3 also show the calculation again:
{code:java}
{
"responseHeader":{
"status":0,
"QTime":1,
"params":{
"q":"title_txt:mytext",
"defType":"edismax",
"fl":"*,score,[explain]"}},
"response":{"numFound":1,"start":0,"maxScore":0.2876821,"docs":[
{
"title_txt":["mytext"],
"rating_i":2,
"id":"3a7299dc-9628-403b-935b-0ddf17e74897",
"_version_":1599803310411350016,
"score":0.2876821,
"[explain]":"0.2876821 = weight(title_txt:mytext in 0)
[SchemaSimilarity], result of:\n 0.2876821 = score(doc=0,freq=1.0 =
termFreq=1.0\n), product of:\n 0.2876821 = idf, computed as log(1 +
(docCount - docFreq + 0.5) / (docFreq + 0.5)) from:\n 1.0 = docFreq\n
1.0 = docCount\n 1.0 = tfNorm, computed as (freq * (k1 + 1)) / (freq + k1 *
(1 - b + b * fieldLength / avgFieldLength)) from:\n 1.0 = termFreq=1.0\n
1.2 = parameter k1\n 0.75 = parameter b\n 1.0 = avgFieldLength\n
1.0 = fieldLength\n"}]
}}
{code}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]