You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Adrien Grand (JIRA)" <ji...@apache.org> on 2015/06/24 15:15:06 UTC

[jira] [Updated] (LUCENE-6601) Change FilteredQuery.FilterStrategy to use the two-phase iteration API

     [ https://issues.apache.org/jira/browse/LUCENE-6601?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Adrien Grand updated LUCENE-6601:
---------------------------------
    Attachment: LUCENE-6601.patch

Here is a patch against 5.x:
 - FilteredQuery always rewrites to a BooleanQuery
 - FilterStrategy was changed to have a single method that rewrites the filter to a wrapper that can decide to either use the iterator API or the random-access API to implement the scorer
 - QUERY_FIRST_FILTER_STRATEGY and LEAP_FROG_QUERY_FIRST_STRATEGY are now the same thing and use the iterator API, which one is iterated first depends on the cost API
 - QUERY_FIRST_FILTER_STRATEGY applies the filter as an approximation
 - RANDOM_ACCESS_FILTER_STRATEGY applies cheap filters using the iterator API. However a change is that costly filters are now applied as an approximation instead of acceptDocs. If the query is a simple term query, this doesn't make any difference, but in case of more sophisticated queries, Lucene will now execute the "cheap" components of the query before the filter.

This way FilteredQuery does not use acceptDocs anymore, which means we could backport LUCENE-6553 to 5.x.

> Change FilteredQuery.FilterStrategy to use the two-phase iteration API
> ----------------------------------------------------------------------
>
>                 Key: LUCENE-6601
>                 URL: https://issues.apache.org/jira/browse/LUCENE-6601
>             Project: Lucene - Core
>          Issue Type: Task
>            Reporter: Adrien Grand
>            Assignee: Adrien Grand
>            Priority: Minor
>             Fix For: 5.3
>
>         Attachments: LUCENE-6601.patch
>
>
> We could change FilterStrategy so that instead of being a factory of scorers, it would just rewrite filters in such a way that they can decide which of the iterator or random-access API should be used.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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