[
https://issues.apache.org/jira/browse/LUCENE-5424?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13886924#comment-13886924
]
Michael McCandless commented on LUCENE-5424:
--------------------------------------------
+1, there is a TODO about this in the code.
But I'm not sure how to translate cost to the right filter strategy.... maybe
we need a hasAdvance() as Rob suggested on LUCENE-5418?
Also, useRandomAccess should not be used for costly filters: it should be used
for cheap filters (e.g. a FixedBitSet), because this is passed down as the
acceptDocs to possibly many, many postings iterators. EG, if you run a BQ with
10 terms and pass a Filter to IS when doing the search ... if useRandomAccess
is true, that filter is checked in all 10 of those DocsEnums, quite possibly
many times per document.
> FilteredQuery useRandomAccess() should use cost()
> -------------------------------------------------
>
> Key: LUCENE-5424
> URL: https://issues.apache.org/jira/browse/LUCENE-5424
> Project: Lucene - Core
> Issue Type: Improvement
> Components: core/query/scoring
> Reporter: David Smiley
>
> Now that Lucene's DISI has a cost() method, it's possible for FilteredQuery's
> RANDOM_ACCESS_FILTER_STRATEGY to use a smarter algorithm in its
> useRandomAccess() method. In particular, it might examine filterIter.cost()
> to see if it is greater than the cost returned by weight.scorer().cost() of
> the query.
--
This message was sent by Atlassian JIRA
(v6.1.5#6160)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]