Michael Braun created LUCENE-8127:
-------------------------------------

             Summary: BooleanQuery with needsScores=false, rewriteNoScoring 
improvement
                 Key: LUCENE-8127
                 URL: https://issues.apache.org/jira/browse/LUCENE-8127
             Project: Lucene - Core
          Issue Type: Improvement
            Reporter: Michael Braun


In the case needsScores=false, createWeight calls rewriteNoScoring before 
creating a new BooleanWeight. This in all cases creates a new BooleanQuery, 
even when it's not necessary (aka there are no MUST clauses). 

The rewriteNoScoring method could check for something as simple as if 
(clauseSets.get(Occur.MUST).size() > 0)  before creating a brand new 
BooleanQuery. 



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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

Reply via email to