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:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]