dsmiley commented on code in PR #4891:
URL: https://github.com/apache/solr/pull/4891#discussion_r3963602689
##########
solr/core/src/test/org/apache/solr/search/TestExtendedDismaxParser.java:
##########
@@ -3377,4 +3377,33 @@ public void testValidateQueryFields() throws Exception {
"org.apache.solr.search.SyntaxError: Query Field 'nosuchfield' is not
a valid field name",
exception.getMessage());
}
+
+ /** SOLR-504: a missing or blank "pf" must not add an empty/no-op boolean
clause to the query */
+ @Test
+ public void testPfMissingOrBlankAddsNoEmptyClause() throws Exception {
+ final String expectedNoPf = "+((subject:hello | title:hello)
(subject:world | title:world))";
+ final String expectedRealPf = expectedNoPf + " (subject:\"hello world\")";
+
+ for (String defType : Arrays.asList("dismax", "edismax")) {
Review Comment:
`List.of` is more canonical
--
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]