ispringer commented on code in PR #4652:
URL: https://github.com/apache/solr/pull/4652#discussion_r3707182337


##########
solr/core/src/java/org/apache/solr/search/DisMaxQParser.java:
##########
@@ -227,6 +227,9 @@ protected Query getPhraseQuery(String userQuery, 
SolrPluginUtils.DisjunctionMaxQ
      * matched those phrases but do match looser phrases.
      */
     String userPhraseQuery = userQuery.replace("\"", "");
+    if (userPhraseQuery.trim().indexOf(' ') < 0) {
+      return null;
+    }

Review Comment:
   @dsmiley: I think it might actually make sense to do the quote processing 
before the trim to support a userQuery like:
   
   ```
   " blah "
   ```
   
   i.e. if quotes are stripped before trimming, we end up with "blah" and 
return early, otherwise we don't



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