[ https://issues.apache.org/jira/browse/LUCENE-7276?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15316164#comment-15316164 ]
David Smiley commented on LUCENE-7276: -------------------------------------- bq. Somehow the test is angry that the rewritten query scores differently from the original ... so somehow the fact that we no longer rewrite to an empty BQ is changing something bq. New patch, fixing the test failure by wrapping in a BoostQuery with boost 0.0 in BQ when it rewrites! Hmm; this feels odd. If it needs to stay then it would be helpful to add some comments where this occurs to explain; I don't really get it. Do you think it might make sense to remove the wrapping BoostQuery for 7.0? Thanks. And nice addition Jim! > Add an optional reason to the MatchNoDocsQuery > ---------------------------------------------- > > Key: LUCENE-7276 > URL: https://issues.apache.org/jira/browse/LUCENE-7276 > Project: Lucene - Core > Issue Type: Improvement > Components: core/search > Reporter: Ferenczi Jim > Priority: Minor > Labels: patch > Attachments: LUCENE-7276.patch, LUCENE-7276.patch, LUCENE-7276.patch, > LUCENE-7276.patch > > > It's sometimes difficult to debug a query that results in a MatchNoDocsQuery. > The MatchNoDocsQuery is always rewritten in an empty boolean query. > This patch adds an optional reason and implements a weight in order to keep > track of the reason why the query did not match any document. The reason is > printed on toString and when an explanation for noMatch is asked. > For instance the query: > new MatchNoDocsQuery("Field not found").toString() > => 'MatchNoDocsQuery["field 'title' not found"]' -- 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