[jira] [Commented] (SOLR-10377) Improve readability of the explain output for JSON format

2019-07-19 Thread ASF subversion and git services (JIRA)


[ 
https://issues.apache.org/jira/browse/SOLR-10377?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16889376#comment-16889376
 ] 

ASF subversion and git services commented on SOLR-10377:


Commit 9d223b00b39f50f88411ea9857bca77e95ce0da9 in lucene-solr's branch 
refs/heads/branch_8x from Munendra S N
[ https://gitbox.apache.org/repos/asf?p=lucene-solr.git;h=9d223b0 ]

SOLR-10377: add debug.explain.structured to Admin UI

* This param would be displayed only if debugQuery is selected


> Improve readability of the explain output for JSON format
> -
>
> Key: SOLR-10377
> URL: https://issues.apache.org/jira/browse/SOLR-10377
> Project: Solr
>  Issue Type: Improvement
>Reporter: Varun Thacker
>Priority: Minor
> Attachments: SOLR-10377.patch, Screenshot 2019-07-17 at 6.09.17 
> PM.png, Screenshot 2019-07-17 at 6.09.27 PM.png
>
>
> Today when I ask solr for the debug query output In json with indent I get 
> this:
> {code}
> 1: " 3.545981 = sum of: 3.545981 = weight(name:dns in 0) [SchemaSimilarity], 
> result of: 3.545981 = score(doc=0,freq=1.0 = termFreq=1.0 ), product of: 
> 2.3025851 = idf, computed as log(1 + (docCount - docFreq + 0.5) / (docFreq + 
> 0.5)) from: 2.0 = docFreq 24.0 = docCount 1.54 = 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 7.0 = avgFieldLength 
> 1.0 = fieldLength ",
> 2: " 7.4202514 = sum of: 7.4202514 = sum of: 2.7921112 = weight(name:domain 
> in 1) [SchemaSimilarity], result of: 2.7921112 = score(doc=1,freq=1.0 = 
> termFreq=1.0 ), product of: 2.3025851 = idf, computed as log(1 + (docCount - 
> docFreq + 0.5) / (docFreq + 0.5)) from: 2.0 = docFreq 24.0 = docCount 
> 1.2125984 = 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 7.0 = avgFieldLength 4.0 = fieldLength 2.7921112 = 
> weight(name:name in 1) [SchemaSimilarity], result of: 2.7921112 = 
> score(doc=1,freq=1.0 = termFreq=1.0 ), product of: 2.3025851 = idf, computed 
> as log(1 + (docCount - docFreq + 0.5) / (docFreq + 0.5)) from: 2.0 = docFreq 
> 24.0 = docCount 1.2125984 = 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 7.0 = avgFieldLength 4.0 = fieldLength 
> 1.8360289 = weight(name:system in 1) [SchemaSimilarity], result of: 1.8360289 
> = score(doc=1,freq=1.0 = termFreq=1.0 ), product of: 1.5141277 = idf, 
> computed as log(1 + (docCount - docFreq + 0.5) / (docFreq + 0.5)) from: 5.0 = 
> docFreq 24.0 = docCount 1.2125984 = 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 7.0 = avgFieldLength 4.0 = 
> fieldLength "
> {code}
> When I run the same query with "wt=ruby" I get a much nicer output
> {code}
> '2'=>'
> 7.4202514 = sum of:
>   7.4202514 = sum of:
> 2.7921112 = weight(name:domain in 1) [SchemaSimilarity], result of:
>   2.7921112 = score(doc=1,freq=1.0 = termFreq=1.0
> ), product of:
> 2.3025851 = idf, computed as log(1 + (docCount - docFreq + 0.5) / 
> (docFreq + 0.5)) from:
>   2.0 = docFreq
>   24.0 = docCount
> 1.2125984 = 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
>   7.0 = avgFieldLength
>   4.0 = fieldLength
> 2.7921112 = weight(name:name in 1) [SchemaSimilarity], result of:
>   2.7921112 = score(doc=1,freq=1.0 = termFreq=1.0
> ), product of:
> 2.3025851 = idf, computed as log(1 + (docCount - docFreq + 0.5) / 
> (docFreq + 0.5)) from:
>   2.0 = docFreq
>   24.0 = docCount
> 1.2125984 = 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
>   7.0 = avgFieldLength
>   4.0 = fieldLength
> 1.8360289 = weight(name:system in 1) [SchemaSimilarity], result of:
>   1.8360289 = score(doc=1,freq=1.0 = termFreq=1.0
> ), product of:
> 1.5141277 = idf, computed as log(1 + (docCount - docFreq + 0.5) / 
> (docFreq + 0.5)) from:
>   5.0 = docFreq
>   24.0 = docCount
> 1.2125984 = 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
>   7.0 = 

[jira] [Commented] (SOLR-10377) Improve readability of the explain output for JSON format

2019-07-19 Thread ASF subversion and git services (JIRA)


[ 
https://issues.apache.org/jira/browse/SOLR-10377?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16889374#comment-16889374
 ] 

ASF subversion and git services commented on SOLR-10377:


Commit b5a190b57666c95e7e99e31925f1d220cfcfcf60 in lucene-solr's branch 
refs/heads/master from Munendra S N
[ https://gitbox.apache.org/repos/asf?p=lucene-solr.git;h=b5a190b ]

SOLR-10377: add debug.explain.structured to Admin UI

* This param would be displayed only if debugQuery is selected


> Improve readability of the explain output for JSON format
> -
>
> Key: SOLR-10377
> URL: https://issues.apache.org/jira/browse/SOLR-10377
> Project: Solr
>  Issue Type: Improvement
>Reporter: Varun Thacker
>Priority: Minor
> Attachments: SOLR-10377.patch, Screenshot 2019-07-17 at 6.09.17 
> PM.png, Screenshot 2019-07-17 at 6.09.27 PM.png
>
>
> Today when I ask solr for the debug query output In json with indent I get 
> this:
> {code}
> 1: " 3.545981 = sum of: 3.545981 = weight(name:dns in 0) [SchemaSimilarity], 
> result of: 3.545981 = score(doc=0,freq=1.0 = termFreq=1.0 ), product of: 
> 2.3025851 = idf, computed as log(1 + (docCount - docFreq + 0.5) / (docFreq + 
> 0.5)) from: 2.0 = docFreq 24.0 = docCount 1.54 = 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 7.0 = avgFieldLength 
> 1.0 = fieldLength ",
> 2: " 7.4202514 = sum of: 7.4202514 = sum of: 2.7921112 = weight(name:domain 
> in 1) [SchemaSimilarity], result of: 2.7921112 = score(doc=1,freq=1.0 = 
> termFreq=1.0 ), product of: 2.3025851 = idf, computed as log(1 + (docCount - 
> docFreq + 0.5) / (docFreq + 0.5)) from: 2.0 = docFreq 24.0 = docCount 
> 1.2125984 = 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 7.0 = avgFieldLength 4.0 = fieldLength 2.7921112 = 
> weight(name:name in 1) [SchemaSimilarity], result of: 2.7921112 = 
> score(doc=1,freq=1.0 = termFreq=1.0 ), product of: 2.3025851 = idf, computed 
> as log(1 + (docCount - docFreq + 0.5) / (docFreq + 0.5)) from: 2.0 = docFreq 
> 24.0 = docCount 1.2125984 = 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 7.0 = avgFieldLength 4.0 = fieldLength 
> 1.8360289 = weight(name:system in 1) [SchemaSimilarity], result of: 1.8360289 
> = score(doc=1,freq=1.0 = termFreq=1.0 ), product of: 1.5141277 = idf, 
> computed as log(1 + (docCount - docFreq + 0.5) / (docFreq + 0.5)) from: 5.0 = 
> docFreq 24.0 = docCount 1.2125984 = 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 7.0 = avgFieldLength 4.0 = 
> fieldLength "
> {code}
> When I run the same query with "wt=ruby" I get a much nicer output
> {code}
> '2'=>'
> 7.4202514 = sum of:
>   7.4202514 = sum of:
> 2.7921112 = weight(name:domain in 1) [SchemaSimilarity], result of:
>   2.7921112 = score(doc=1,freq=1.0 = termFreq=1.0
> ), product of:
> 2.3025851 = idf, computed as log(1 + (docCount - docFreq + 0.5) / 
> (docFreq + 0.5)) from:
>   2.0 = docFreq
>   24.0 = docCount
> 1.2125984 = 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
>   7.0 = avgFieldLength
>   4.0 = fieldLength
> 2.7921112 = weight(name:name in 1) [SchemaSimilarity], result of:
>   2.7921112 = score(doc=1,freq=1.0 = termFreq=1.0
> ), product of:
> 2.3025851 = idf, computed as log(1 + (docCount - docFreq + 0.5) / 
> (docFreq + 0.5)) from:
>   2.0 = docFreq
>   24.0 = docCount
> 1.2125984 = 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
>   7.0 = avgFieldLength
>   4.0 = fieldLength
> 1.8360289 = weight(name:system in 1) [SchemaSimilarity], result of:
>   1.8360289 = score(doc=1,freq=1.0 = termFreq=1.0
> ), product of:
> 1.5141277 = idf, computed as log(1 + (docCount - docFreq + 0.5) / 
> (docFreq + 0.5)) from:
>   5.0 = docFreq
>   24.0 = docCount
> 1.2125984 = 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
>   7.0 = 

[jira] [Commented] (SOLR-10377) Improve readability of the explain output for JSON format

2019-07-17 Thread Munendra S N (JIRA)


[ 
https://issues.apache.org/jira/browse/SOLR-10377?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16887184#comment-16887184
 ] 

Munendra S N commented on SOLR-10377:
-

 [^SOLR-10377.patch] 
This adds {{debug.explain.structured}} parameter in Admin UI.  !Screenshot 
2019-07-17 at 6.09.17 PM.png!  !Screenshot 2019-07-17 at 6.09.27 PM.png! 

> Improve readability of the explain output for JSON format
> -
>
> Key: SOLR-10377
> URL: https://issues.apache.org/jira/browse/SOLR-10377
> Project: Solr
>  Issue Type: Improvement
>Reporter: Varun Thacker
>Priority: Minor
> Attachments: SOLR-10377.patch, Screenshot 2019-07-17 at 6.09.17 
> PM.png, Screenshot 2019-07-17 at 6.09.27 PM.png
>
>
> Today when I ask solr for the debug query output In json with indent I get 
> this:
> {code}
> 1: " 3.545981 = sum of: 3.545981 = weight(name:dns in 0) [SchemaSimilarity], 
> result of: 3.545981 = score(doc=0,freq=1.0 = termFreq=1.0 ), product of: 
> 2.3025851 = idf, computed as log(1 + (docCount - docFreq + 0.5) / (docFreq + 
> 0.5)) from: 2.0 = docFreq 24.0 = docCount 1.54 = 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 7.0 = avgFieldLength 
> 1.0 = fieldLength ",
> 2: " 7.4202514 = sum of: 7.4202514 = sum of: 2.7921112 = weight(name:domain 
> in 1) [SchemaSimilarity], result of: 2.7921112 = score(doc=1,freq=1.0 = 
> termFreq=1.0 ), product of: 2.3025851 = idf, computed as log(1 + (docCount - 
> docFreq + 0.5) / (docFreq + 0.5)) from: 2.0 = docFreq 24.0 = docCount 
> 1.2125984 = 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 7.0 = avgFieldLength 4.0 = fieldLength 2.7921112 = 
> weight(name:name in 1) [SchemaSimilarity], result of: 2.7921112 = 
> score(doc=1,freq=1.0 = termFreq=1.0 ), product of: 2.3025851 = idf, computed 
> as log(1 + (docCount - docFreq + 0.5) / (docFreq + 0.5)) from: 2.0 = docFreq 
> 24.0 = docCount 1.2125984 = 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 7.0 = avgFieldLength 4.0 = fieldLength 
> 1.8360289 = weight(name:system in 1) [SchemaSimilarity], result of: 1.8360289 
> = score(doc=1,freq=1.0 = termFreq=1.0 ), product of: 1.5141277 = idf, 
> computed as log(1 + (docCount - docFreq + 0.5) / (docFreq + 0.5)) from: 5.0 = 
> docFreq 24.0 = docCount 1.2125984 = 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 7.0 = avgFieldLength 4.0 = 
> fieldLength "
> {code}
> When I run the same query with "wt=ruby" I get a much nicer output
> {code}
> '2'=>'
> 7.4202514 = sum of:
>   7.4202514 = sum of:
> 2.7921112 = weight(name:domain in 1) [SchemaSimilarity], result of:
>   2.7921112 = score(doc=1,freq=1.0 = termFreq=1.0
> ), product of:
> 2.3025851 = idf, computed as log(1 + (docCount - docFreq + 0.5) / 
> (docFreq + 0.5)) from:
>   2.0 = docFreq
>   24.0 = docCount
> 1.2125984 = 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
>   7.0 = avgFieldLength
>   4.0 = fieldLength
> 2.7921112 = weight(name:name in 1) [SchemaSimilarity], result of:
>   2.7921112 = score(doc=1,freq=1.0 = termFreq=1.0
> ), product of:
> 2.3025851 = idf, computed as log(1 + (docCount - docFreq + 0.5) / 
> (docFreq + 0.5)) from:
>   2.0 = docFreq
>   24.0 = docCount
> 1.2125984 = 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
>   7.0 = avgFieldLength
>   4.0 = fieldLength
> 1.8360289 = weight(name:system in 1) [SchemaSimilarity], result of:
>   1.8360289 = score(doc=1,freq=1.0 = termFreq=1.0
> ), product of:
> 1.5141277 = idf, computed as log(1 + (docCount - docFreq + 0.5) / 
> (docFreq + 0.5)) from:
>   5.0 = docFreq
>   24.0 = docCount
> 1.2125984 = 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
>   7.0 = avgFieldLength
>   4.0 = fieldLength
> ',
>   '1'=>'
> 3.545981 = sum of:
>   3.545981 = weight(name:dns in 0) [SchemaSimilarity], result of:
> 

[jira] [Commented] (SOLR-10377) Improve readability of the explain output for JSON format

2019-07-10 Thread David Smiley (JIRA)


[ 
https://issues.apache.org/jira/browse/SOLR-10377?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16882580#comment-16882580
 ] 

David Smiley commented on SOLR-10377:
-

I really don't think everyone would like structured=true by default; I'm "meh" 
at best.  It's bulky.  I dunno if there's a good solution here.  I wonder if 
maybe when the admin UI renders the JSON, it might insert literal carriage 
returns after the occurrences of "\n" (actual backslash then 'n').  Or maybe 
somehow we could insert a pop-up with it rendered correctly.  Shrug... that's 
the best I can think up right now.  One way to ameliorate the situation is to 
add debug.explain.structured=true to the admin UI so you could click it easily 
and not have to know it exists.  Maybe that's the best we can do that also 
doesn't feel like a hack.

> Improve readability of the explain output for JSON format
> -
>
> Key: SOLR-10377
> URL: https://issues.apache.org/jira/browse/SOLR-10377
> Project: Solr
>  Issue Type: Improvement
>Reporter: Varun Thacker
>Priority: Minor
>
> Today when I ask solr for the debug query output In json with indent I get 
> this:
> {code}
> 1: " 3.545981 = sum of: 3.545981 = weight(name:dns in 0) [SchemaSimilarity], 
> result of: 3.545981 = score(doc=0,freq=1.0 = termFreq=1.0 ), product of: 
> 2.3025851 = idf, computed as log(1 + (docCount - docFreq + 0.5) / (docFreq + 
> 0.5)) from: 2.0 = docFreq 24.0 = docCount 1.54 = 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 7.0 = avgFieldLength 
> 1.0 = fieldLength ",
> 2: " 7.4202514 = sum of: 7.4202514 = sum of: 2.7921112 = weight(name:domain 
> in 1) [SchemaSimilarity], result of: 2.7921112 = score(doc=1,freq=1.0 = 
> termFreq=1.0 ), product of: 2.3025851 = idf, computed as log(1 + (docCount - 
> docFreq + 0.5) / (docFreq + 0.5)) from: 2.0 = docFreq 24.0 = docCount 
> 1.2125984 = 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 7.0 = avgFieldLength 4.0 = fieldLength 2.7921112 = 
> weight(name:name in 1) [SchemaSimilarity], result of: 2.7921112 = 
> score(doc=1,freq=1.0 = termFreq=1.0 ), product of: 2.3025851 = idf, computed 
> as log(1 + (docCount - docFreq + 0.5) / (docFreq + 0.5)) from: 2.0 = docFreq 
> 24.0 = docCount 1.2125984 = 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 7.0 = avgFieldLength 4.0 = fieldLength 
> 1.8360289 = weight(name:system in 1) [SchemaSimilarity], result of: 1.8360289 
> = score(doc=1,freq=1.0 = termFreq=1.0 ), product of: 1.5141277 = idf, 
> computed as log(1 + (docCount - docFreq + 0.5) / (docFreq + 0.5)) from: 5.0 = 
> docFreq 24.0 = docCount 1.2125984 = 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 7.0 = avgFieldLength 4.0 = 
> fieldLength "
> {code}
> When I run the same query with "wt=ruby" I get a much nicer output
> {code}
> '2'=>'
> 7.4202514 = sum of:
>   7.4202514 = sum of:
> 2.7921112 = weight(name:domain in 1) [SchemaSimilarity], result of:
>   2.7921112 = score(doc=1,freq=1.0 = termFreq=1.0
> ), product of:
> 2.3025851 = idf, computed as log(1 + (docCount - docFreq + 0.5) / 
> (docFreq + 0.5)) from:
>   2.0 = docFreq
>   24.0 = docCount
> 1.2125984 = 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
>   7.0 = avgFieldLength
>   4.0 = fieldLength
> 2.7921112 = weight(name:name in 1) [SchemaSimilarity], result of:
>   2.7921112 = score(doc=1,freq=1.0 = termFreq=1.0
> ), product of:
> 2.3025851 = idf, computed as log(1 + (docCount - docFreq + 0.5) / 
> (docFreq + 0.5)) from:
>   2.0 = docFreq
>   24.0 = docCount
> 1.2125984 = 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
>   7.0 = avgFieldLength
>   4.0 = fieldLength
> 1.8360289 = weight(name:system in 1) [SchemaSimilarity], result of:
>   1.8360289 = score(doc=1,freq=1.0 = termFreq=1.0
> ), product of:
> 1.5141277 = idf, computed as log(1 + (docCount - docFreq + 0.5) / 
> (docFreq + 0.5)) from:
>   5.0 = docFreq
>   24.0 = docCount
> 1.2125984 = tfNorm, computed as (freq * (k1 

[jira] [Commented] (SOLR-10377) Improve readability of the explain output for JSON format

2019-07-10 Thread Munendra S N (JIRA)


[ 
https://issues.apache.org/jira/browse/SOLR-10377?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16882221#comment-16882221
 ] 

Munendra S N commented on SOLR-10377:
-

Should the behavior be changed to return structured response
debug.explain.structured=true was introduced in SOLR-1915. From then to now, 
default format is changed to JSON and indent is set to on.


> Improve readability of the explain output for JSON format
> -
>
> Key: SOLR-10377
> URL: https://issues.apache.org/jira/browse/SOLR-10377
> Project: Solr
>  Issue Type: Improvement
>Reporter: Varun Thacker
>Priority: Minor
>
> Today when I ask solr for the debug query output In json with indent I get 
> this:
> {code}
> 1: " 3.545981 = sum of: 3.545981 = weight(name:dns in 0) [SchemaSimilarity], 
> result of: 3.545981 = score(doc=0,freq=1.0 = termFreq=1.0 ), product of: 
> 2.3025851 = idf, computed as log(1 + (docCount - docFreq + 0.5) / (docFreq + 
> 0.5)) from: 2.0 = docFreq 24.0 = docCount 1.54 = 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 7.0 = avgFieldLength 
> 1.0 = fieldLength ",
> 2: " 7.4202514 = sum of: 7.4202514 = sum of: 2.7921112 = weight(name:domain 
> in 1) [SchemaSimilarity], result of: 2.7921112 = score(doc=1,freq=1.0 = 
> termFreq=1.0 ), product of: 2.3025851 = idf, computed as log(1 + (docCount - 
> docFreq + 0.5) / (docFreq + 0.5)) from: 2.0 = docFreq 24.0 = docCount 
> 1.2125984 = 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 7.0 = avgFieldLength 4.0 = fieldLength 2.7921112 = 
> weight(name:name in 1) [SchemaSimilarity], result of: 2.7921112 = 
> score(doc=1,freq=1.0 = termFreq=1.0 ), product of: 2.3025851 = idf, computed 
> as log(1 + (docCount - docFreq + 0.5) / (docFreq + 0.5)) from: 2.0 = docFreq 
> 24.0 = docCount 1.2125984 = 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 7.0 = avgFieldLength 4.0 = fieldLength 
> 1.8360289 = weight(name:system in 1) [SchemaSimilarity], result of: 1.8360289 
> = score(doc=1,freq=1.0 = termFreq=1.0 ), product of: 1.5141277 = idf, 
> computed as log(1 + (docCount - docFreq + 0.5) / (docFreq + 0.5)) from: 5.0 = 
> docFreq 24.0 = docCount 1.2125984 = 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 7.0 = avgFieldLength 4.0 = 
> fieldLength "
> {code}
> When I run the same query with "wt=ruby" I get a much nicer output
> {code}
> '2'=>'
> 7.4202514 = sum of:
>   7.4202514 = sum of:
> 2.7921112 = weight(name:domain in 1) [SchemaSimilarity], result of:
>   2.7921112 = score(doc=1,freq=1.0 = termFreq=1.0
> ), product of:
> 2.3025851 = idf, computed as log(1 + (docCount - docFreq + 0.5) / 
> (docFreq + 0.5)) from:
>   2.0 = docFreq
>   24.0 = docCount
> 1.2125984 = 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
>   7.0 = avgFieldLength
>   4.0 = fieldLength
> 2.7921112 = weight(name:name in 1) [SchemaSimilarity], result of:
>   2.7921112 = score(doc=1,freq=1.0 = termFreq=1.0
> ), product of:
> 2.3025851 = idf, computed as log(1 + (docCount - docFreq + 0.5) / 
> (docFreq + 0.5)) from:
>   2.0 = docFreq
>   24.0 = docCount
> 1.2125984 = 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
>   7.0 = avgFieldLength
>   4.0 = fieldLength
> 1.8360289 = weight(name:system in 1) [SchemaSimilarity], result of:
>   1.8360289 = score(doc=1,freq=1.0 = termFreq=1.0
> ), product of:
> 1.5141277 = idf, computed as log(1 + (docCount - docFreq + 0.5) / 
> (docFreq + 0.5)) from:
>   5.0 = docFreq
>   24.0 = docCount
> 1.2125984 = 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
>   7.0 = avgFieldLength
>   4.0 = fieldLength
> ',
>   '1'=>'
> 3.545981 = sum of:
>   3.545981 = weight(name:dns in 0) [SchemaSimilarity], result of:
> 3.545981 = score(doc=0,freq=1.0 = termFreq=1.0
> ), product of:
>   2.3025851 = idf, computed as log(1 

[jira] [Commented] (SOLR-10377) Improve readability of the explain output for JSON format

2019-07-10 Thread David Smiley (JIRA)


[ 
https://issues.apache.org/jira/browse/SOLR-10377?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16882004#comment-16882004
 ] 

David Smiley commented on SOLR-10377:
-

Thanks for the reminder of that obscure parameter.  I think the main use-case 
is the user using Solr's admin screen, defaulting to json, and choosing the 
debugQuery checkbox to determine what happened with the score.  When the 
default wt (writer type / response format) was XML, the output was 
understandable.  With JSON it is not.

> Improve readability of the explain output for JSON format
> -
>
> Key: SOLR-10377
> URL: https://issues.apache.org/jira/browse/SOLR-10377
> Project: Solr
>  Issue Type: Improvement
>Reporter: Varun Thacker
>Priority: Minor
>
> Today when I ask solr for the debug query output In json with indent I get 
> this:
> {code}
> 1: " 3.545981 = sum of: 3.545981 = weight(name:dns in 0) [SchemaSimilarity], 
> result of: 3.545981 = score(doc=0,freq=1.0 = termFreq=1.0 ), product of: 
> 2.3025851 = idf, computed as log(1 + (docCount - docFreq + 0.5) / (docFreq + 
> 0.5)) from: 2.0 = docFreq 24.0 = docCount 1.54 = 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 7.0 = avgFieldLength 
> 1.0 = fieldLength ",
> 2: " 7.4202514 = sum of: 7.4202514 = sum of: 2.7921112 = weight(name:domain 
> in 1) [SchemaSimilarity], result of: 2.7921112 = score(doc=1,freq=1.0 = 
> termFreq=1.0 ), product of: 2.3025851 = idf, computed as log(1 + (docCount - 
> docFreq + 0.5) / (docFreq + 0.5)) from: 2.0 = docFreq 24.0 = docCount 
> 1.2125984 = 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 7.0 = avgFieldLength 4.0 = fieldLength 2.7921112 = 
> weight(name:name in 1) [SchemaSimilarity], result of: 2.7921112 = 
> score(doc=1,freq=1.0 = termFreq=1.0 ), product of: 2.3025851 = idf, computed 
> as log(1 + (docCount - docFreq + 0.5) / (docFreq + 0.5)) from: 2.0 = docFreq 
> 24.0 = docCount 1.2125984 = 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 7.0 = avgFieldLength 4.0 = fieldLength 
> 1.8360289 = weight(name:system in 1) [SchemaSimilarity], result of: 1.8360289 
> = score(doc=1,freq=1.0 = termFreq=1.0 ), product of: 1.5141277 = idf, 
> computed as log(1 + (docCount - docFreq + 0.5) / (docFreq + 0.5)) from: 5.0 = 
> docFreq 24.0 = docCount 1.2125984 = 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 7.0 = avgFieldLength 4.0 = 
> fieldLength "
> {code}
> When I run the same query with "wt=ruby" I get a much nicer output
> {code}
> '2'=>'
> 7.4202514 = sum of:
>   7.4202514 = sum of:
> 2.7921112 = weight(name:domain in 1) [SchemaSimilarity], result of:
>   2.7921112 = score(doc=1,freq=1.0 = termFreq=1.0
> ), product of:
> 2.3025851 = idf, computed as log(1 + (docCount - docFreq + 0.5) / 
> (docFreq + 0.5)) from:
>   2.0 = docFreq
>   24.0 = docCount
> 1.2125984 = 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
>   7.0 = avgFieldLength
>   4.0 = fieldLength
> 2.7921112 = weight(name:name in 1) [SchemaSimilarity], result of:
>   2.7921112 = score(doc=1,freq=1.0 = termFreq=1.0
> ), product of:
> 2.3025851 = idf, computed as log(1 + (docCount - docFreq + 0.5) / 
> (docFreq + 0.5)) from:
>   2.0 = docFreq
>   24.0 = docCount
> 1.2125984 = 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
>   7.0 = avgFieldLength
>   4.0 = fieldLength
> 1.8360289 = weight(name:system in 1) [SchemaSimilarity], result of:
>   1.8360289 = score(doc=1,freq=1.0 = termFreq=1.0
> ), product of:
> 1.5141277 = idf, computed as log(1 + (docCount - docFreq + 0.5) / 
> (docFreq + 0.5)) from:
>   5.0 = docFreq
>   24.0 = docCount
> 1.2125984 = 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
>   7.0 = avgFieldLength
>   4.0 = fieldLength
> ',
>   '1'=>'
> 3.545981 = sum of:
>   3.545981 = weight(name:dns in 0) 

[jira] [Commented] (SOLR-10377) Improve readability of the explain output for JSON format

2019-07-09 Thread Munendra S N (JIRA)


[ 
https://issues.apache.org/jira/browse/SOLR-10377?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16881720#comment-16881720
 ] 

Munendra S N commented on SOLR-10377:
-

Passing *debug.explain.structured=true* with debug=true will return the 
response with structured/indented explain. Sample output for some uniqueId.

{code:java}
{
  "book1": {
"match": true,
"value": 1.1315503,
"description": "sum of:",
"details": [
  {
"match": true,
"value": 1,
"description": "parent_b:*"
  },
  {
"match": true,
"value": 0.13155031,
"description": "FunctionQuery(query(parent_b:F,def=0.0)), product of:",
"details": [
  {
"match": true,
"value": 0.13155031,
"description": "query(parent_b:F,def=0.0)=0.13155031"
  },
  {
"match": true,
"value": 1,
"description": "boost"
  }
]
  }
]
  }
}
{code}
Also, if the user is using explain doctransformer, then to get 
structured/indented response, style could be specified {{[explain style=nl]}}

> Improve readability of the explain output for JSON format
> -
>
> Key: SOLR-10377
> URL: https://issues.apache.org/jira/browse/SOLR-10377
> Project: Solr
>  Issue Type: Improvement
>Reporter: Varun Thacker
>Priority: Minor
>
> Today when I ask solr for the debug query output In json with indent I get 
> this:
> {code}
> 1: " 3.545981 = sum of: 3.545981 = weight(name:dns in 0) [SchemaSimilarity], 
> result of: 3.545981 = score(doc=0,freq=1.0 = termFreq=1.0 ), product of: 
> 2.3025851 = idf, computed as log(1 + (docCount - docFreq + 0.5) / (docFreq + 
> 0.5)) from: 2.0 = docFreq 24.0 = docCount 1.54 = 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 7.0 = avgFieldLength 
> 1.0 = fieldLength ",
> 2: " 7.4202514 = sum of: 7.4202514 = sum of: 2.7921112 = weight(name:domain 
> in 1) [SchemaSimilarity], result of: 2.7921112 = score(doc=1,freq=1.0 = 
> termFreq=1.0 ), product of: 2.3025851 = idf, computed as log(1 + (docCount - 
> docFreq + 0.5) / (docFreq + 0.5)) from: 2.0 = docFreq 24.0 = docCount 
> 1.2125984 = 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 7.0 = avgFieldLength 4.0 = fieldLength 2.7921112 = 
> weight(name:name in 1) [SchemaSimilarity], result of: 2.7921112 = 
> score(doc=1,freq=1.0 = termFreq=1.0 ), product of: 2.3025851 = idf, computed 
> as log(1 + (docCount - docFreq + 0.5) / (docFreq + 0.5)) from: 2.0 = docFreq 
> 24.0 = docCount 1.2125984 = 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 7.0 = avgFieldLength 4.0 = fieldLength 
> 1.8360289 = weight(name:system in 1) [SchemaSimilarity], result of: 1.8360289 
> = score(doc=1,freq=1.0 = termFreq=1.0 ), product of: 1.5141277 = idf, 
> computed as log(1 + (docCount - docFreq + 0.5) / (docFreq + 0.5)) from: 5.0 = 
> docFreq 24.0 = docCount 1.2125984 = 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 7.0 = avgFieldLength 4.0 = 
> fieldLength "
> {code}
> When I run the same query with "wt=ruby" I get a much nicer output
> {code}
> '2'=>'
> 7.4202514 = sum of:
>   7.4202514 = sum of:
> 2.7921112 = weight(name:domain in 1) [SchemaSimilarity], result of:
>   2.7921112 = score(doc=1,freq=1.0 = termFreq=1.0
> ), product of:
> 2.3025851 = idf, computed as log(1 + (docCount - docFreq + 0.5) / 
> (docFreq + 0.5)) from:
>   2.0 = docFreq
>   24.0 = docCount
> 1.2125984 = 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
>   7.0 = avgFieldLength
>   4.0 = fieldLength
> 2.7921112 = weight(name:name in 1) [SchemaSimilarity], result of:
>   2.7921112 = score(doc=1,freq=1.0 = termFreq=1.0
> ), product of:
> 2.3025851 = idf, computed as log(1 + (docCount - docFreq + 0.5) / 
> (docFreq + 0.5)) from:
>   2.0 = docFreq
>   24.0 = docCount
> 1.2125984 = 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
>   7.0 = avgFieldLength
>   4.0 = fieldLength
> 1.8360289 = weight(name:system in 1) 

[jira] [Commented] (SOLR-10377) Improve readability of the explain output for JSON format

2019-07-09 Thread David Smiley (JIRA)


[ 
https://issues.apache.org/jira/browse/SOLR-10377?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16881507#comment-16881507
 ] 

David Smiley commented on SOLR-10377:
-

The indentation problem has been a long-standing problem no matter what browser 
I use. "the ordering" is fine. Using the techproducts data set with query 
name:ddr I get this one-liner explanation for the first doc:

{{ "VS1GB400C3":"\n0.89796925 = weight(name:ddr in 1) [SchemaSimilarity], 
result of:\n 0.89796925 = score(freq=2.0), product of:\n 1.8382795 = idf, 
computed as log(1 + (N - n + 0.5) / (n + 0.5)) from:\n 3 = n, number of 
documents containing term\n 21 = N, total number of documents with field\n 
0.48848352 = tf, computed as freq / (freq + k1 * (1 - b + b * dl / avgdl)) 
from:\n 2.0 = freq, occurrences of term within document\n 1.2 = k1, term 
saturation parameter\n 0.75 = b, length normalization parameter\n 15.0 = dl, 
length of field\n 7.5238094 = avgdl, average length of field\n", }}

> Improve readability of the explain output for JSON format
> -
>
> Key: SOLR-10377
> URL: https://issues.apache.org/jira/browse/SOLR-10377
> Project: Solr
>  Issue Type: Improvement
>Reporter: Varun Thacker
>Priority: Minor
>
> Today when I ask solr for the debug query output In json with indent I get 
> this:
> {code}
> 1: " 3.545981 = sum of: 3.545981 = weight(name:dns in 0) [SchemaSimilarity], 
> result of: 3.545981 = score(doc=0,freq=1.0 = termFreq=1.0 ), product of: 
> 2.3025851 = idf, computed as log(1 + (docCount - docFreq + 0.5) / (docFreq + 
> 0.5)) from: 2.0 = docFreq 24.0 = docCount 1.54 = 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 7.0 = avgFieldLength 
> 1.0 = fieldLength ",
> 2: " 7.4202514 = sum of: 7.4202514 = sum of: 2.7921112 = weight(name:domain 
> in 1) [SchemaSimilarity], result of: 2.7921112 = score(doc=1,freq=1.0 = 
> termFreq=1.0 ), product of: 2.3025851 = idf, computed as log(1 + (docCount - 
> docFreq + 0.5) / (docFreq + 0.5)) from: 2.0 = docFreq 24.0 = docCount 
> 1.2125984 = 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 7.0 = avgFieldLength 4.0 = fieldLength 2.7921112 = 
> weight(name:name in 1) [SchemaSimilarity], result of: 2.7921112 = 
> score(doc=1,freq=1.0 = termFreq=1.0 ), product of: 2.3025851 = idf, computed 
> as log(1 + (docCount - docFreq + 0.5) / (docFreq + 0.5)) from: 2.0 = docFreq 
> 24.0 = docCount 1.2125984 = 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 7.0 = avgFieldLength 4.0 = fieldLength 
> 1.8360289 = weight(name:system in 1) [SchemaSimilarity], result of: 1.8360289 
> = score(doc=1,freq=1.0 = termFreq=1.0 ), product of: 1.5141277 = idf, 
> computed as log(1 + (docCount - docFreq + 0.5) / (docFreq + 0.5)) from: 5.0 = 
> docFreq 24.0 = docCount 1.2125984 = 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 7.0 = avgFieldLength 4.0 = 
> fieldLength "
> {code}
> When I run the same query with "wt=ruby" I get a much nicer output
> {code}
> '2'=>'
> 7.4202514 = sum of:
>   7.4202514 = sum of:
> 2.7921112 = weight(name:domain in 1) [SchemaSimilarity], result of:
>   2.7921112 = score(doc=1,freq=1.0 = termFreq=1.0
> ), product of:
> 2.3025851 = idf, computed as log(1 + (docCount - docFreq + 0.5) / 
> (docFreq + 0.5)) from:
>   2.0 = docFreq
>   24.0 = docCount
> 1.2125984 = 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
>   7.0 = avgFieldLength
>   4.0 = fieldLength
> 2.7921112 = weight(name:name in 1) [SchemaSimilarity], result of:
>   2.7921112 = score(doc=1,freq=1.0 = termFreq=1.0
> ), product of:
> 2.3025851 = idf, computed as log(1 + (docCount - docFreq + 0.5) / 
> (docFreq + 0.5)) from:
>   2.0 = docFreq
>   24.0 = docCount
> 1.2125984 = 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
>   7.0 = avgFieldLength
>   4.0 = fieldLength
> 1.8360289 = weight(name:system in 1) [SchemaSimilarity], result of:
>   1.8360289 = score(doc=1,freq=1.0 = termFreq=1.0
> ), product of:
> 1.5141277 = idf, computed as log(1 + 

[jira] [Commented] (SOLR-10377) Improve readability of the explain output for JSON format

2017-03-27 Thread Varun Thacker (JIRA)

[ 
https://issues.apache.org/jira/browse/SOLR-10377?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15944354#comment-15944354
 ] 

Varun Thacker commented on SOLR-10377:
--

Looks like the ordering was messed up because of the JSONView plugin that I 
had. Solr is returning the order correctly.

> Improve readability of the explain output for JSON format
> -
>
> Key: SOLR-10377
> URL: https://issues.apache.org/jira/browse/SOLR-10377
> Project: Solr
>  Issue Type: Improvement
>  Security Level: Public(Default Security Level. Issues are Public) 
>Reporter: Varun Thacker
>Priority: Minor
>
> Today when I ask solr for the debug query output In json with indent I get 
> this:
> {code}
> 1: " 3.545981 = sum of: 3.545981 = weight(name:dns in 0) [SchemaSimilarity], 
> result of: 3.545981 = score(doc=0,freq=1.0 = termFreq=1.0 ), product of: 
> 2.3025851 = idf, computed as log(1 + (docCount - docFreq + 0.5) / (docFreq + 
> 0.5)) from: 2.0 = docFreq 24.0 = docCount 1.54 = 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 7.0 = avgFieldLength 
> 1.0 = fieldLength ",
> 2: " 7.4202514 = sum of: 7.4202514 = sum of: 2.7921112 = weight(name:domain 
> in 1) [SchemaSimilarity], result of: 2.7921112 = score(doc=1,freq=1.0 = 
> termFreq=1.0 ), product of: 2.3025851 = idf, computed as log(1 + (docCount - 
> docFreq + 0.5) / (docFreq + 0.5)) from: 2.0 = docFreq 24.0 = docCount 
> 1.2125984 = 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 7.0 = avgFieldLength 4.0 = fieldLength 2.7921112 = 
> weight(name:name in 1) [SchemaSimilarity], result of: 2.7921112 = 
> score(doc=1,freq=1.0 = termFreq=1.0 ), product of: 2.3025851 = idf, computed 
> as log(1 + (docCount - docFreq + 0.5) / (docFreq + 0.5)) from: 2.0 = docFreq 
> 24.0 = docCount 1.2125984 = 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 7.0 = avgFieldLength 4.0 = fieldLength 
> 1.8360289 = weight(name:system in 1) [SchemaSimilarity], result of: 1.8360289 
> = score(doc=1,freq=1.0 = termFreq=1.0 ), product of: 1.5141277 = idf, 
> computed as log(1 + (docCount - docFreq + 0.5) / (docFreq + 0.5)) from: 5.0 = 
> docFreq 24.0 = docCount 1.2125984 = 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 7.0 = avgFieldLength 4.0 = 
> fieldLength "
> {code}
> When I run the same query with "wt=ruby" I get a much nicer output
> {code}
> '2'=>'
> 7.4202514 = sum of:
>   7.4202514 = sum of:
> 2.7921112 = weight(name:domain in 1) [SchemaSimilarity], result of:
>   2.7921112 = score(doc=1,freq=1.0 = termFreq=1.0
> ), product of:
> 2.3025851 = idf, computed as log(1 + (docCount - docFreq + 0.5) / 
> (docFreq + 0.5)) from:
>   2.0 = docFreq
>   24.0 = docCount
> 1.2125984 = 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
>   7.0 = avgFieldLength
>   4.0 = fieldLength
> 2.7921112 = weight(name:name in 1) [SchemaSimilarity], result of:
>   2.7921112 = score(doc=1,freq=1.0 = termFreq=1.0
> ), product of:
> 2.3025851 = idf, computed as log(1 + (docCount - docFreq + 0.5) / 
> (docFreq + 0.5)) from:
>   2.0 = docFreq
>   24.0 = docCount
> 1.2125984 = 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
>   7.0 = avgFieldLength
>   4.0 = fieldLength
> 1.8360289 = weight(name:system in 1) [SchemaSimilarity], result of:
>   1.8360289 = score(doc=1,freq=1.0 = termFreq=1.0
> ), product of:
> 1.5141277 = idf, computed as log(1 + (docCount - docFreq + 0.5) / 
> (docFreq + 0.5)) from:
>   5.0 = docFreq
>   24.0 = docCount
> 1.2125984 = 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
>   7.0 = avgFieldLength
>   4.0 = fieldLength
> ',
>   '1'=>'
> 3.545981 = sum of:
>   3.545981 = weight(name:dns in 0) [SchemaSimilarity], result of:
> 3.545981 = score(doc=0,freq=1.0 = termFreq=1.0
> ), product of:
>   2.3025851 = idf, computed as log(1 +