[ 
https://issues.apache.org/jira/browse/LUCENE-7276?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15316547#comment-15316547
 ] 

Michael McCandless commented on LUCENE-7276:
--------------------------------------------

It definitely is odd, and I don't like it, but I don't know how else to make 
the test happy on this weird corner case.

I will put a comment attempting to explain the situation.

> 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

Reply via email to