Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Duplicate
-
7.3
-
None
-
None
-
None
Description
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:
title_txt,rating_i mytext,2
When I issue the following query to analyse the computation of the score
I receive the following response:
{ "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"}] }}
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:
{ "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"}] }}
When the boost parameter gets remove Solr 7.3 also show the calculation again:
{ "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"}] }}
Attachments
Issue Links
- duplicates
-
SOLR-12235 Incomplete debugQuery info when using edismax and boost param
- Closed