You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "ASF subversion and git services (JIRA)" <ji...@apache.org> on 2016/07/08 17:08:11 UTC

[jira] [Commented] (LUCENE-7276) Add an optional reason to the MatchNoDocsQuery

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

ASF subversion and git services commented on LUCENE-7276:
---------------------------------------------------------

Commit cbbc505268e8fa994fa21383ed49a91b2e923f66 in lucene-solr's branch refs/heads/master from Mike McCandless
[ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=cbbc505 ]

LUCENE-7276: MatchNoDocsQuery now inclues an optional reason for why it was used


> 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, 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-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org