You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Michael McCandless (JIRA)" <ji...@apache.org> on 2013/04/26 12:50:19 UTC

[jira] [Commented] (LUCENE-4961) Filters should return null if they don't accept documents

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

Michael McCandless commented on LUCENE-4961:
--------------------------------------------

+1
                
> Filters should return null if they don't accept documents
> ---------------------------------------------------------
>
>                 Key: LUCENE-4961
>                 URL: https://issues.apache.org/jira/browse/LUCENE-4961
>             Project: Lucene - Core
>          Issue Type: Improvement
>          Components: core/search
>    Affects Versions: 4.3, 4.2.1
>            Reporter: Simon Willnauer
>             Fix For: 5.0, 4.4
>
>         Attachments: LUCENE-4961.patch
>
>
> Today we document that Filter#getDocIdSet can return null if it doesn't accept documents. Infact in the code we sometimes return null and sometimes return DocIdSet.EMPTY_DOCIDSET. Conceptually there is nothing wrong with that but apparently we are not applying our optimisations accordingly ie. some parts of the code check for the EMPTY_DOCIDSET and all check for null. this is also a source of potential bugs like in LUCENE-4940 and I think there are still problems in the ToChildBlock query.
> Anyways, I think we should be consistent here about when to apply the optimisations and for the sake of caching in CachingWrapperFilter we should make the EMPTY_DOCIDSET and impl detail.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

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