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

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

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


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

Posted by "John Wang (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LUCENE-1931?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12760268#action_12760268 ] 

John Wang commented on LUCENE-1931:
-----------------------------------

Good to know!

Thanks

-John

> 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


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

Posted by "Mark Miller (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LUCENE-1931?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12760411#action_12760411 ] 

Mark Miller commented on LUCENE-1931:
-------------------------------------

Here is the history of this issue:

http://search.lucidimagination.com/search/document/c40bb4c0569ea7d3/q_alt_matching_no_documents

> 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


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

Posted by "Simon Willnauer (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LUCENE-1931?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12760350#action_12760350 ] 

Simon Willnauer commented on LUCENE-1931:
-----------------------------------------

Maybe I miss something but what is the usecase of this query? I guess you have a good reason for adding this patch - could you please add some documentation to the class and / or to this issue which explains what you are trying to do?

simon

> 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


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

Posted by "John Wang (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LUCENE-1931?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

John Wang updated LUCENE-1931:
------------------------------

    Attachment: nohitsquery.patch

2 classes:

NoHitsQuery.java: query implementation
TestNoHitsQuery.java: unit test

> 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


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

Posted by "Yonik Seeley (JIRA)" <ji...@apache.org>.
    [ 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