[
https://issues.apache.org/jira/browse/SOLR-1915?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12873190#action_12873190
]
Yonik Seeley commented on SOLR-1915:
------------------------------------
On a quick try, I think I like the old behavior as a default.
http://localhost:8983/solr/select?fl=id,score&defType=edismax&qf=text&pf=text&q=solr%20server&debugQuery=on&debug.explain.stringFormat=true&indent=true
This is what you get when you cut-n-paste the explain from the XML, or press
CTRL-U to view the raw XML.
{code}
0.4444791 = (MATCH) sum of:
0.4444791 = (MATCH) sum of:
0.22223955 = (MATCH) weight(text:solr in 0), product of:
0.40824828 = queryWeight(text:solr), product of:
3.0794415 = idf(docFreq=2, maxDocs=24)
0.13257217 = queryNorm
0.5443735 = (MATCH) fieldWeight(text:solr in 0), product of:
1.4142135 = tf(termFreq(text:solr)=2)
3.0794415 = idf(docFreq=2, maxDocs=24)
0.125 = fieldNorm(field=text, doc=0)
0.22223955 = (MATCH) weight(text:server in 0), product of:
0.40824828 = queryWeight(text:server), product of:
3.0794415 = idf(docFreq=2, maxDocs=24)
0.13257217 = queryNorm
0.5443735 = (MATCH) fieldWeight(text:server in 0), product of:
1.4142135 = tf(termFreq(text:server)=2)
3.0794415 = idf(docFreq=2, maxDocs=24)
0.125 = fieldNorm(field=text, doc=0)
{code}
And now this is the parser friendly output:
http://localhost:8983/solr/select?fl=id,score&defType=edismax&qf=text&pf=text&q=solr%20server&debugQuery=on&debug.explain.stringFormat=false&indent=true
This is also after pressing CTRL-U, because you can't really cut-n-paste from
firefox from the XML view (it doesn't preserve any indenting).
{code}
<lst name="SOLR1000">
<bool name="match">true</bool>
<float name="value">0.4444791</float>
<str name="description">sum of:</str>
<arr name="details">
<lst>
<bool name="match">true</bool>
<float name="value">0.4444791</float>
<str name="description">sum of:</str>
<arr name="details">
<lst>
<bool name="match">true</bool>
<float name="value">0.22223955</float>
<str name="description">weight(text:solr in 0), product
of:</str>
<arr name="details">
<lst>
<bool name="match">true</bool>
<float name="value">0.40824828</float>
<str name="description">queryWeight(text:solr), product
of:</str>
<arr name="details">
<lst>
<bool name="match">true</bool>
<float name="value">3.0794415</float>
<str name="description">idf(docFreq=2, maxDocs=24)</str>
</lst>
<lst>
<bool name="match">true</bool>
<float name="value">0.13257217</float>
<str name="description">queryNorm</str>
</lst>
</arr>
</lst>
<lst>
<bool name="match">true</bool>
<float name="value">0.5443735</float>
<str name="description">fieldWeight(text:solr in 0), product
of:</str>
<arr name="details">
<lst>
<bool name="match">true</bool>
<float name="value">1.4142135</float>
<str name="description">tf(termFreq(text:solr)=2)</str>
</lst>
<lst>
<bool name="match">true</bool>
<float name="value">3.0794415</float>
<str name="description">idf(docFreq=2, maxDocs=24)</str>
</lst>
<lst>
<bool name="match">true</bool>
<float name="value">0.125</float>
<str name="description">fieldNorm(field=text, doc=0)</str>
</lst>
</arr>
</lst>
</arr>
</lst>
<lst>
<bool name="match">true</bool>
<float name="value">0.22223955</float>
<str name="description">weight(text:server in 0), product
of:</str>
<arr name="details">
<lst>
<bool name="match">true</bool>
<float name="value">0.40824828</float>
<str name="description">queryWeight(text:server), product
of:</str>
<arr name="details">
<lst>
<bool name="match">true</bool>
<float name="value">3.0794415</float>
<str name="description">idf(docFreq=2, maxDocs=24)</str>
</lst>
<lst>
<bool name="match">true</bool>
<float name="value">0.13257217</float>
<str name="description">queryNorm</str>
</lst>
</arr>
</lst>
<lst>
<bool name="match">true</bool>
<float name="value">0.5443735</float>
<str name="description">fieldWeight(text:server in 0), product
of:</str>
<arr name="details">
<lst>
<bool name="match">true</bool>
<float name="value">1.4142135</float>
<str name="description">tf(termFreq(text:server)=2)</str>
</lst>
<lst>
<bool name="match">true</bool>
<float name="value">3.0794415</float>
<str name="description">idf(docFreq=2, maxDocs=24)</str>
</lst>
<lst>
<bool name="match">true</bool>
<float name="value">0.125</float>
<str name="description">fieldNorm(field=text, doc=0)</str>
</lst>
</arr>
</lst>
</arr>
</lst>
</arr>
</lst>
</arr>
</lst>
</lst>
{code}
I don't think I'd ever try to make use of the latter format for debugging (and
I wouldn't want anyone sending that to the list), so it seems like the default
should be the old behavior?
Having firefox not show the linebreaks unless you press CTRL-U (or cut-n-paste
it) also has it's advantages... the large explains take up less vertical room
in the response in those cases where you're not looking at them.
> DebugComponent should use NamedList to output Explanations instead of
> Explanation.toString()
> --------------------------------------------------------------------------------------------
>
> Key: SOLR-1915
> URL: https://issues.apache.org/jira/browse/SOLR-1915
> Project: Solr
> Issue Type: Improvement
> Components: SearchComponents - other
> Reporter: Hoss Man
> Assignee: Hoss Man
> Priority: Minor
> Fix For: 4.0
>
> Attachments: SOLR-1915.patch
>
>
> DebugComponent currently uses Explanation.toString() to "format" score
> explanations for each document as plain text with whitespace indenting to
> denote the hierarchical relationship, and then adds those explanations to the
> SolrQueryResponse.
> Instead DebugComponent should transform the Explanation objects into
> NamedLists so that the full structure can be formatted in a logical way by
> the ResponseWriter
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]