[
https://issues.apache.org/jira/browse/LUCENE-5488?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
John Wang updated LUCENE-5488:
------------------------------
Attachment: LUCENE-5488.patch
> 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, 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: [email protected]
For additional commands, e-mail: [email protected]