Description
I have two documents:
{"text":"some text", "lang":"cn"} {"text":"more text", "lang":"en"}
And the following query, a simple edismax with a boost on lang:en:
http://localhost:8983/solr/test/select?wt=xml&q=text&defType=edismax&qf=text&debug=true&boost=if(exists(query($bqlang)),2,1)&bqlang=lang:en
The parsedQuery is now slightly different because of it being wrapped in a FunctionScoreQuery. The problem is the explain for the document, which is:
0.3971361 = product of: 1.0 = boost 0.3971361 = boost(if(exists(query(lang:en,def=0.0)),const(2),const(1)))
Which is now unreadable for complicated queries with many clauses. It should resemble the output of 7.2, which was:
0.36464313 = boost(text:text,if(exists(query(lang:en,def=0.0)),const(2),const(1))), product of: 0.18232156 = weight(text:text in 0) [SchemaSimilarity], result of: 0.18232156 = score(doc=0,freq=1.0 = termFreq=1.0 ), product of: 0.18232156 = idf, computed as log(1 + (docCount - docFreq + 0.5) / (docFreq + 0.5)) from: 2.0 = docFreq 2.0 = docCount 1.0 = tfNorm, computed as (freq * (k1 + 1)) / (freq + k1 * (1 - b + b * fieldLength / avgFieldLength)) from: 1.0 = termFreq=1.0 1.2 = parameter k1 0.75 = parameter b 2.0 = avgFieldLength 2.0 = fieldLength 2.0 = if(exists(query(lang:en,def=0.0)=0.6931472),const(2),const(1))
This bug was introduced in Solr/Lucene 7.3.
Mailing list reference: http://lucene.472066.n3.nabble.com/Solr-7-3-FunctionScoreQuery-no-longer-displays-debug-output-td4389093.html