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

Michael Busch commented on LUCENE-5488:
---------------------------------------

Patch looks good, and all tests pass.

Two minor things:
- Could you remove the unnecessary changes to the import statements?
- Could you create the patch file with "svn diff"?

> FilteredQuery.explain does not honor FilterStrategy
> ---------------------------------------------------
>
>                 Key: LUCENE-5488
>                 URL: https://issues.apache.org/jira/browse/LUCENE-5488
>             Project: Lucene - Core
>          Issue Type: Bug
>          Components: core/search
>    Affects Versions: 4.6.1
>            Reporter: John Wang
>         Attachments: LUCENE-5488.patch
>
>
> Some Filter implementations produce DocIdSets without the iterator() 
> implementation, such as o.a.l.facet.range.Range.getFilter(). It is done with 
> the intention to be used in conjunction with FilteredQuery with 
> FilterStrategy set to be QUERY_FIRST_FILTER_STRATEGY for performance reasons.
> However, this behavior is not honored by FilteredQuery.explain where 
> docidset.iterator is called regardless and causing such valid usages of above 
> filter types to fail.
> The fix is to check bits() first and and fall back to iterator if bits is 
> null. In which case, the input Filter is indeed bad.
> See attached unit test, which fails without this patch.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

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

Reply via email to