dsmiley commented on code in PR #4475:
URL: https://github.com/apache/solr/pull/4475#discussion_r3329301384


##########
solr/core/src/java/org/apache/solr/search/join/FiltersQParser.java:
##########
@@ -59,7 +59,14 @@ protected BooleanQuery parseImpl() throws SyntaxError {
 
     BooleanQuery.Builder builder = createBuilder();
     for (Map.Entry<QParser, Occur> clause : clauses.entrySet()) {
-      builder.add(unwrapQuery(clause.getKey().getQuery(), clause.getValue()), 
clause.getValue());
+
+      Query query = clause.getKey().getQuery();
+      Occur occur = clause.getValue();
+
+      if (occur == Occur.SHOULD && query instanceof BooleanQuery boolQ && 
boolQ.clauses().isEmpty()) {

Review Comment:
   The description says:
   
   > org.apache.solr.search.join.FiltersQParser#parseImpl can return 
empty-queries
   
   If you dig deeper... this isn't a fault/problem of FiltersQParser 
specifically or that method, it's that **broadly**, any QParser parse() may 
return either null or return an empty BooleanQuery.  It'd be great if you 
pursue fixing *that*.  But I don't think FiltersQParser needs a modification.



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to