You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Markus Jelsma (JIRA)" <ji...@apache.org> on 2018/05/29 09:17:00 UTC

[jira] [Created] (SOLR-12414) FunctionScoreQuery no longer displays debug output

Markus Jelsma created SOLR-12414:
------------------------------------

             Summary: FunctionScoreQuery no longer displays debug output
                 Key: SOLR-12414
                 URL: https://issues.apache.org/jira/browse/SOLR-12414
             Project: Solr
          Issue Type: Bug
      Security Level: Public (Default Security Level. Issues are Public)
    Affects Versions: 7.3.1, 7.3
            Reporter: Markus Jelsma
             Fix For: 7.4, master (8.0)


I have two documents:
{code}
{"text":"some text", "lang":"cn"}
{"text":"more text", "lang":"en"}
{code}

And the following query, a simple edismax with a boost on lang:en:
{code}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
{code}

The parsedQuery is now slightly different because of it being wrapped in a FunctionScoreQuery. The problem is the explain for the document, which is:

{code}
0.3971361 = product of:
  1.0 = boost
  0.3971361 = boost(if(exists(query(lang:en,def=0.0)),const(2),const(1)))
{code}

Which is now unreadable for complicated queries with many clauses. It should resemble the output of 7.2, which was:

{code}

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))
{code}

This bug was introduced in Solr/Lucene 7.3.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org