You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Yonik Seeley (JIRA)" <ji...@apache.org> on 2009/09/28 17:03:16 UTC

[jira] Commented: (LUCENE-1931) no hits query - query object that returns no hits

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

Yonik Seeley commented on LUCENE-1931:
--------------------------------------

Just return null from Weight.scorer() and you can remove the NoHitsScorer.

Of course, one could always just use 
this_field_doesnt_exist:foo

or from java code, something like 
new TermQuery(new Term("-","-"))

> no hits query - query object that returns no hits
> -------------------------------------------------
>
>                 Key: LUCENE-1931
>                 URL: https://issues.apache.org/jira/browse/LUCENE-1931
>             Project: Lucene - Java
>          Issue Type: New Feature
>          Components: Search
>    Affects Versions: 2.9
>            Reporter: John Wang
>         Attachments: nohitsquery.patch
>
>
> Query implementation that return no hits.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org