[jira] [Commented] (LUCENE-6446) Simplify Explanation API
[ https://issues.apache.org/jira/browse/LUCENE-6446?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14507125#comment-14507125 ] ASF subversion and git services commented on LUCENE-6446: - Commit 1675365 from [~jpountz] in branch 'dev/trunk' [ https://svn.apache.org/r1675365 ] LUCENE-6446: Fix method visibility and trappy factory method. > Simplify Explanation API > > > Key: LUCENE-6446 > URL: https://issues.apache.org/jira/browse/LUCENE-6446 > Project: Lucene - Core > Issue Type: Bug >Reporter: Adrien Grand >Assignee: Adrien Grand >Priority: Minor > Fix For: Trunk, 5.2 > > Attachments: LUCENE-6446.patch > > > We should make this API easier to consume, for instance: > - enforce important components to be non-null (eg. description) > - decouple entirely the score computation from whether there is a match or > not (Explanation assumes there is a match if the score is > 0, you need to > use ComplexExplanation to override this behaviour) > - return an empty array instead of null when there are no "details" -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (LUCENE-6446) Simplify Explanation API
[ https://issues.apache.org/jira/browse/LUCENE-6446?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14507115#comment-14507115 ] ASF subversion and git services commented on LUCENE-6446: - Commit 1675363 from [~jpountz] in branch 'dev/branches/branch_5x' [ https://svn.apache.org/r1675363 ] LUCENE-6446: Fix method visibility and trappy factory method. > Simplify Explanation API > > > Key: LUCENE-6446 > URL: https://issues.apache.org/jira/browse/LUCENE-6446 > Project: Lucene - Core > Issue Type: Bug >Reporter: Adrien Grand >Assignee: Adrien Grand >Priority: Minor > Fix For: Trunk, 5.2 > > Attachments: LUCENE-6446.patch > > > We should make this API easier to consume, for instance: > - enforce important components to be non-null (eg. description) > - decouple entirely the score computation from whether there is a match or > not (Explanation assumes there is a match if the score is > 0, you need to > use ComplexExplanation to override this behaviour) > - return an empty array instead of null when there are no "details" -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (LUCENE-6446) Simplify Explanation API
[ https://issues.apache.org/jira/browse/LUCENE-6446?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14507114#comment-14507114 ] Adrien Grand commented on LUCENE-6446: -- Oh yes, that's a bad bug! Thanks for catching this! > Simplify Explanation API > > > Key: LUCENE-6446 > URL: https://issues.apache.org/jira/browse/LUCENE-6446 > Project: Lucene - Core > Issue Type: Bug >Reporter: Adrien Grand >Assignee: Adrien Grand >Priority: Minor > Fix For: Trunk, 5.2 > > Attachments: LUCENE-6446.patch > > > We should make this API easier to consume, for instance: > - enforce important components to be non-null (eg. description) > - decouple entirely the score computation from whether there is a match or > not (Explanation assumes there is a match if the score is > 0, you need to > use ComplexExplanation to override this behaviour) > - return an empty array instead of null when there are no "details" -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (LUCENE-6446) Simplify Explanation API
[ https://issues.apache.org/jira/browse/LUCENE-6446?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14507111#comment-14507111 ] Terry Smith commented on LUCENE-6446: - bq. I removed it because it was not always in the summary (only when using ComplexExplanation) as well as redundant with the description which is explicit when there is no match, for instance TermWeight's "no matching term" or BooleanWeight "no match on required clause"? That makes sense. Removing the redundant information is definitely the way to go. I also noticed that the new Explanation.noMatch() methods look a little trappy. They both take the child details and drop them on the floor. {code} public static Explanation noMatch(String description, Collection details) { return new Explanation(false, 0f, description, Collections.emptyList()); } {code} I think the noMatch() methods should either add the details to the created explanation or not accept them as parameters. Having a non-matching explanation contain child details can be really useful for complex queries. What do you think? > Simplify Explanation API > > > Key: LUCENE-6446 > URL: https://issues.apache.org/jira/browse/LUCENE-6446 > Project: Lucene - Core > Issue Type: Bug >Reporter: Adrien Grand >Assignee: Adrien Grand >Priority: Minor > Fix For: Trunk, 5.2 > > Attachments: LUCENE-6446.patch > > > We should make this API easier to consume, for instance: > - enforce important components to be non-null (eg. description) > - decouple entirely the score computation from whether there is a match or > not (Explanation assumes there is a match if the score is > 0, you need to > use ComplexExplanation to override this behaviour) > - return an empty array instead of null when there are no "details" -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (LUCENE-6446) Simplify Explanation API
[ https://issues.apache.org/jira/browse/LUCENE-6446?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14507098#comment-14507098 ] Adrien Grand commented on LUCENE-6446: -- bq. Should this method be private? Good point, I'll fix. bq. I find this extra context invaluable, especially with the decoupling of score and match, we can't assume that a score of 0 is a NON-MATCH yet the output no longer tells is if an explanation is a MATCH or not. I removed it because it was not always in the summary (only when using ComplexExplanation) as well as redundant with the description which is explicit when there is no match, for instance TermWeight's "no matching term" or BooleanWeight "no match on required clause"? > Simplify Explanation API > > > Key: LUCENE-6446 > URL: https://issues.apache.org/jira/browse/LUCENE-6446 > Project: Lucene - Core > Issue Type: Bug >Reporter: Adrien Grand >Assignee: Adrien Grand >Priority: Minor > Fix For: Trunk, 5.2 > > Attachments: LUCENE-6446.patch > > > We should make this API easier to consume, for instance: > - enforce important components to be non-null (eg. description) > - decouple entirely the score computation from whether there is a match or > not (Explanation assumes there is a match if the score is > 0, you need to > use ComplexExplanation to override this behaviour) > - return an empty array instead of null when there are no "details" -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (LUCENE-6446) Simplify Explanation API
[ https://issues.apache.org/jira/browse/LUCENE-6446?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14507038#comment-14507038 ] Terry Smith commented on LUCENE-6446: - The refactored Explanation looks great, however I see a couple of small issues worth raising. 1. The constructor is private and there is a protected toString(int depth) method, it doesn't look like anyone else is calling it and no-one can subclass it. Should this method be private? 2. The toString() output is different! ComplexExplanation had a slightly different getSummary() method: {code} return getValue() + " = " + (isMatch() ? "(MATCH) " : "(NON-MATCH) ") + getDescription(); {code} versus {code} return getValue() + " = " + getDescription(); {code} I find this extra context invaluable, especially with the decoupling of score and match, we can't assume that a score of 0 is a NON-MATCH yet the output no longer tells is if an explanation is a MATCH or not. I understand that I can roll my own string building code with the current API. It'd be great if the default output was as useful as possible. > Simplify Explanation API > > > Key: LUCENE-6446 > URL: https://issues.apache.org/jira/browse/LUCENE-6446 > Project: Lucene - Core > Issue Type: Bug >Reporter: Adrien Grand >Assignee: Adrien Grand >Priority: Minor > Fix For: Trunk, 5.2 > > Attachments: LUCENE-6446.patch > > > We should make this API easier to consume, for instance: > - enforce important components to be non-null (eg. description) > - decouple entirely the score computation from whether there is a match or > not (Explanation assumes there is a match if the score is > 0, you need to > use ComplexExplanation to override this behaviour) > - return an empty array instead of null when there are no "details" -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (LUCENE-6446) Simplify Explanation API
[ https://issues.apache.org/jira/browse/LUCENE-6446?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14505229#comment-14505229 ] ASF subversion and git services commented on LUCENE-6446: - Commit 1675153 from [~jpountz] in branch 'dev/trunk' [ https://svn.apache.org/r1675153 ] LUCENE-6446: Protected against null sub explanations. > Simplify Explanation API > > > Key: LUCENE-6446 > URL: https://issues.apache.org/jira/browse/LUCENE-6446 > Project: Lucene - Core > Issue Type: Bug >Reporter: Adrien Grand >Assignee: Adrien Grand >Priority: Minor > Fix For: Trunk, 5.2 > > Attachments: LUCENE-6446.patch > > > We should make this API easier to consume, for instance: > - enforce important components to be non-null (eg. description) > - decouple entirely the score computation from whether there is a match or > not (Explanation assumes there is a match if the score is > 0, you need to > use ComplexExplanation to override this behaviour) > - return an empty array instead of null when there are no "details" -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (LUCENE-6446) Simplify Explanation API
[ https://issues.apache.org/jira/browse/LUCENE-6446?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14505226#comment-14505226 ] ASF subversion and git services commented on LUCENE-6446: - Commit 1675152 from [~jpountz] in branch 'dev/branches/branch_5x' [ https://svn.apache.org/r1675152 ] LUCENE-6446: Protected against null sub explanations. > Simplify Explanation API > > > Key: LUCENE-6446 > URL: https://issues.apache.org/jira/browse/LUCENE-6446 > Project: Lucene - Core > Issue Type: Bug >Reporter: Adrien Grand >Assignee: Adrien Grand >Priority: Minor > Fix For: Trunk, 5.2 > > Attachments: LUCENE-6446.patch > > > We should make this API easier to consume, for instance: > - enforce important components to be non-null (eg. description) > - decouple entirely the score computation from whether there is a match or > not (Explanation assumes there is a match if the score is > 0, you need to > use ComplexExplanation to override this behaviour) > - return an empty array instead of null when there are no "details" -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (LUCENE-6446) Simplify Explanation API
[ https://issues.apache.org/jira/browse/LUCENE-6446?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14505095#comment-14505095 ] ASF subversion and git services commented on LUCENE-6446: - Commit 1675133 from [~jpountz] in branch 'dev/trunk' [ https://svn.apache.org/r1675133 ] LUCENE-6446: Fix explanations of BM25Similarity. > Simplify Explanation API > > > Key: LUCENE-6446 > URL: https://issues.apache.org/jira/browse/LUCENE-6446 > Project: Lucene - Core > Issue Type: Bug >Reporter: Adrien Grand >Assignee: Adrien Grand >Priority: Minor > Fix For: Trunk, 5.2 > > Attachments: LUCENE-6446.patch > > > We should make this API easier to consume, for instance: > - enforce important components to be non-null (eg. description) > - decouple entirely the score computation from whether there is a match or > not (Explanation assumes there is a match if the score is > 0, you need to > use ComplexExplanation to override this behaviour) > - return an empty array instead of null when there are no "details" -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (LUCENE-6446) Simplify Explanation API
[ https://issues.apache.org/jira/browse/LUCENE-6446?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14505094#comment-14505094 ] ASF subversion and git services commented on LUCENE-6446: - Commit 1675132 from [~jpountz] in branch 'dev/branches/branch_5x' [ https://svn.apache.org/r1675132 ] LUCENE-6446: Fix explanations of BM25Similarity. > Simplify Explanation API > > > Key: LUCENE-6446 > URL: https://issues.apache.org/jira/browse/LUCENE-6446 > Project: Lucene - Core > Issue Type: Bug >Reporter: Adrien Grand >Assignee: Adrien Grand >Priority: Minor > Fix For: Trunk, 5.2 > > Attachments: LUCENE-6446.patch > > > We should make this API easier to consume, for instance: > - enforce important components to be non-null (eg. description) > - decouple entirely the score computation from whether there is a match or > not (Explanation assumes there is a match if the score is > 0, you need to > use ComplexExplanation to override this behaviour) > - return an empty array instead of null when there are no "details" -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (LUCENE-6446) Simplify Explanation API
[ https://issues.apache.org/jira/browse/LUCENE-6446?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14504933#comment-14504933 ] ASF subversion and git services commented on LUCENE-6446: - Commit 1675114 from [~jpountz] in branch 'dev/branches/branch_5x' [ https://svn.apache.org/r1675114 ] LUCENE-6446: Simplified Explanation API. > Simplify Explanation API > > > Key: LUCENE-6446 > URL: https://issues.apache.org/jira/browse/LUCENE-6446 > Project: Lucene - Core > Issue Type: Bug >Reporter: Adrien Grand >Assignee: Adrien Grand >Priority: Minor > Fix For: Trunk, 5.2 > > Attachments: LUCENE-6446.patch > > > We should make this API easier to consume, for instance: > - enforce important components to be non-null (eg. description) > - decouple entirely the score computation from whether there is a match or > not (Explanation assumes there is a match if the score is > 0, you need to > use ComplexExplanation to override this behaviour) > - return an empty array instead of null when there are no "details" -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (LUCENE-6446) Simplify Explanation API
[ https://issues.apache.org/jira/browse/LUCENE-6446?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14504900#comment-14504900 ] ASF subversion and git services commented on LUCENE-6446: - Commit 1675109 from [~jpountz] in branch 'dev/trunk' [ https://svn.apache.org/r1675109 ] LUCENE-6446: Simplified Explanation API. > Simplify Explanation API > > > Key: LUCENE-6446 > URL: https://issues.apache.org/jira/browse/LUCENE-6446 > Project: Lucene - Core > Issue Type: Bug >Reporter: Adrien Grand >Assignee: Adrien Grand >Priority: Minor > Fix For: Trunk, 5.2 > > Attachments: LUCENE-6446.patch > > > We should make this API easier to consume, for instance: > - enforce important components to be non-null (eg. description) > - decouple entirely the score computation from whether there is a match or > not (Explanation assumes there is a match if the score is > 0, you need to > use ComplexExplanation to override this behaviour) > - return an empty array instead of null when there are no "details" -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (LUCENE-6446) Simplify Explanation API
[ https://issues.apache.org/jira/browse/LUCENE-6446?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14504018#comment-14504018 ] Ryan Ernst commented on LUCENE-6446: +1, this is much cleaner! > Simplify Explanation API > > > Key: LUCENE-6446 > URL: https://issues.apache.org/jira/browse/LUCENE-6446 > Project: Lucene - Core > Issue Type: Bug >Reporter: Adrien Grand >Assignee: Adrien Grand >Priority: Minor > Fix For: Trunk, 5.2 > > Attachments: LUCENE-6446.patch > > > We should make this API easier to consume, for instance: > - enforce important components to be non-null (eg. description) > - decouple entirely the score computation from whether there is a match or > not (Explanation assumes there is a match if the score is > 0, you need to > use ComplexExplanation to override this behaviour) > - return an empty array instead of null when there are no "details" -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org