lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Uwe Schindler (Resolved) (JIRA)" <>
Subject [jira] [Resolved] (LUCENE-3643) Improve FilteredQuery to shortcut on wrapped MatchAllDocsQuery
Date Tue, 13 Dec 2011 16:35:30 GMT


Uwe Schindler resolved LUCENE-3643.

    Resolution: Fixed

Committed LUCENE-3643-noNullQueryFilter.patch to trunk revision: 1213771
> Improve FilteredQuery to shortcut on wrapped MatchAllDocsQuery
> --------------------------------------------------------------
>                 Key: LUCENE-3643
>                 URL:
>             Project: Lucene - Java
>          Issue Type: Improvement
>          Components: core/search
>    Affects Versions: 4.0
>            Reporter: Uwe Schindler
>            Assignee: Uwe Schindler
>             Fix For: 4.0
>         Attachments: LUCENE-3643-allowNullQueryFilter.patch, LUCENE-3643-noNullQueryFilter.patch,
LUCENE-3643.patch, LUCENE-3643.patch, LUCENE-3643.patch, LUCENE-3643.patch
> Since the rewrite of Lucene trunk to delegate all Filter logic to FilteredQuery, by simply
wrapping in IndexSearcher.wrapFilter(), we can do more short circuits and improve query execution.
A common use case it to pass MatchAllDocsQuery as query to IndexSearcher and a filter. For
the underlying hit collection this is stupid and slow, as MatchAllDocsQuery simply increments
the docID and checks acceptDocs. If the filter is sparse, this is a big waste. This patch
changes FilteredQuery.rewrite() to short circuit and return ConstantScoreQuery, if the query
is MatchAllDocs.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message