lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yonik Seeley (JIRA)" <j...@apache.org>
Subject [jira] Commented: (LUCENE-1931) no hits query - query object that returns no hits
Date Mon, 28 Sep 2009 15:03:16 GMT

    [ 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


Mime
View raw message