[ 
https://issues.apache.org/jira/browse/SOLR-12414?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Markus Jelsma updated SOLR-12414:
---------------------------------
    Description: 
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.

Mailing list reference: 
http://lucene.472066.n3.nabble.com/Solr-7-3-FunctionScoreQuery-no-longer-displays-debug-output-td4389093.html

  was:
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.


> 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, 7.3.1
>            Reporter: Markus Jelsma
>            Priority: Major
>             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.
> Mailing list reference: 
> http://lucene.472066.n3.nabble.com/Solr-7-3-FunctionScoreQuery-no-longer-displays-debug-output-td4389093.html



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

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

Reply via email to