You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "David Smiley (JIRA)" <ji...@apache.org> on 2019/07/09 19:59:00 UTC
[jira] [Commented] (SOLR-10377) Improve readability of the explain
output for JSON format
[ https://issues.apache.org/jira/browse/SOLR-10377?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=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 + (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 + (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
> '}
> {code}
> Also the explain for the JSON output is not sorted by score
--
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