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

Uwe Schindler updated LUCENE-3643:
----------------------------------

    Description: 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.  (was: 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 null or MatchAllDocs. The same happens for filter==null, in this case 
FilteredQuery rewrites itsself to the inner query with modified boost.)
        Summary: Improve FilteredQuery to shortcut on wrapped MatchAllDocsQuery 
 (was: Improve FilteredQuery to shortcut on wrapped MatchAllDocsQuery, null 
Query or null Filter)
    
> Improve FilteredQuery to shortcut on wrapped MatchAllDocsQuery
> --------------------------------------------------------------
>
>                 Key: LUCENE-3643
>                 URL: https://issues.apache.org/jira/browse/LUCENE-3643
>             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: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to