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

Adrien Grand updated LUCENE-10412:
----------------------------------
    Description: 
Having MatchNoDocsQuery in your query tree usually doesn't make the query 
slower, but by recognizing it in rewrite rules, we could perform rewrites which 
would then sometimes unlock other rewrite rules.

For instance if you have a boolean query with 2 should clauses where one is a 
MatchAllDocsQuery and the other one is a MatchNoDocsQuery, we would naively run 
it as a disjunction today, while we could rewrite it to a MatchAllDocsQuery and 
leverage its specialized bulk scorer.

  was:
Having MatchNoDocsQuery in your query tree usually doesn't make the query 
slower, but by recognizing it in rewrite rules, we could perform rewrites which 
would then sometimes unlock other rewrite rules.

For instance if you have a boolean query with 2 should clauses where one is a 
MatchAllDocsQuery and the other one is a MatchNoDocsQuery, we would naively run 
it as a conjunction, while we could rewrite it to a MatchAllDocsQuery and 
leverage its specialized bulk scorer.


> Improve handling of MatchNoDocsQuery in rewrite rules
> -----------------------------------------------------
>
>                 Key: LUCENE-10412
>                 URL: https://issues.apache.org/jira/browse/LUCENE-10412
>             Project: Lucene - Core
>          Issue Type: Wish
>            Reporter: Adrien Grand
>            Priority: Minor
>
> Having MatchNoDocsQuery in your query tree usually doesn't make the query 
> slower, but by recognizing it in rewrite rules, we could perform rewrites 
> which would then sometimes unlock other rewrite rules.
> For instance if you have a boolean query with 2 should clauses where one is a 
> MatchAllDocsQuery and the other one is a MatchNoDocsQuery, we would naively 
> run it as a disjunction today, while we could rewrite it to a 
> MatchAllDocsQuery and leverage its specialized bulk scorer.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org

Reply via email to