magibney commented on a change in pull request #129:
URL: https://github.com/apache/solr/pull/129#discussion_r644299691



##########
File path: 
solr/core/src/test/org/apache/solr/search/TestExtendedDismaxParser.java
##########
@@ -1771,6 +1775,35 @@ public void testSplitOnWhitespace_Basic() throws 
Exception {
     assertThat(parsedquery, anyOf(containsString("((name:stigma | 
title:stigma))"), containsString("((title:stigma | name:stigma))")));
   }
 
+    @Test 
+    public void testQf_stringFieldWithSowFalse_shouldBuildSingleQueryClause() 
throws Exception
+    {
+        assertJQ(req("qf", "trait_ss", "defType", "edismax", "q", "multi 
term", "sow", "false"),
+            "/response/numFound==1", "/response/docs/[0]/id=='75'");
+
+        String parsedquery = getParsedQuery(
+            req("qf", "trait_ss", "q", "multi term", "defType", "edismax", 
"sow", "false", "debugQuery", "true"));
+        assertThat(parsedquery, anyOf(containsString("((trait_ss:multi 
term))")));

Review comment:
       disjunction `anyOf(...)` shouldn't be necessary to wrap a single clause 
-- can just use `containsString(...)` directly at the top level.




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



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

Reply via email to