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


##########
solr/core/src/java/org/apache/solr/parser/SolrQueryParserBase.java:
##########
@@ -538,6 +538,24 @@ protected Query newFieldQuery(
     return query;
   }
 
+  /**
+   * Delegates to {@link 
QueryBuilder#createFieldQuery(org.apache.lucene.analysis.Analyzer,
+   * org.apache.lucene.search.BooleanClause.Occur, java.lang.String, 
java.lang.String, boolean,
+   * int)} but returns MatchNoDocsQuery rather than null
+   */
+  protected Query createFieldQuery(
+      Analyzer analyzer,
+      BooleanClause.Occur operator,
+      String field,
+      String queryText,
+      boolean quoted,
+      int phraseSlop) {
+
+    Query fieldQuery =
+        super.createFieldQuery(analyzer, operator, field, queryText, quoted, 
phraseSlop);
+    return fieldQuery != null ? fieldQuery : new MatchNoDocsQuery("empty 
query");

Review Comment:
   To make sure we are on the same page: You think of reverting this since this 
 it has broken some tests and hence we can not further follow this approach?



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