janhoy commented on code in PR #887:
URL: https://github.com/apache/solr/pull/887#discussion_r887170885


##########
solr/modules/sql/src/java/org/apache/solr/handler/sql/SolrFilter.java:
##########
@@ -362,8 +362,9 @@ protected String translateLike(RexNode like) {
         // but that expects the terms wrapped in double-quotes, not parens
         boolean hasMultipleTerms = terms.split("\\s+").length > 1;
         if (hasMultipleTerms && (terms.contains("*") || terms.contains("?"))) {
-          String quotedTerms = "\"" + terms.substring(1, terms.length() - 1) + 
"\"";
-          return "{!complexphrase}" + pair.getKey() + ":" + quotedTerms;
+          String quotedTerms = "\\\"" + terms.substring(1, terms.length() - 1) 
+ "\\\"";
+          String query = pair.getKey() + ":" + quotedTerms;
+          return String.format("{!complexphrase v=\"%s\"}", query);

Review Comment:
   ```suggestion
             return String.format(Locale.ROOT, "{!complexphrase v=\"%s\"}", 
query);
   ```
   This should fix the precommit failure



-- 
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: issues-unsubscr...@solr.apache.org

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