dsmiley commented on a change in pull request #1407: Use 
QueryUtils.combineQueryAndFilter more
URL: https://github.com/apache/lucene-solr/pull/1407#discussion_r404385251
 
 

 ##########
 File path: solr/core/src/java/org/apache/solr/search/QueryUtils.java
 ##########
 @@ -151,7 +151,7 @@ public static BooleanQuery build(BooleanQuery.Builder 
builder, QParser parser) {
    * If neither are null then we combine with a BooleanQuery.
    */
   public static Query combineQueryAndFilter(Query scoreQuery, Query 
filterQuery) {
-    if (scoreQuery == null) {
+    if (scoreQuery == null || scoreQuery instanceof MatchAllDocsQuery) {
 
 Review comment:
   I'll add a comment:
   `// check for *:* is simple and avoids needless BooleanQuery wrapper even 
though BQ.rewrite optimizes this away

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

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

Reply via email to