dsmiley commented on code in PR #4512:
URL: https://github.com/apache/solr/pull/4512#discussion_r3492107047


##########
solr/core/src/test/org/apache/solr/update/TestNestedUpdateProcessor.java:
##########
@@ -691,7 +691,9 @@ private SolrParams parentQueryMaker(String parent_path, 
String inner_child_query
         } else {
           return params(
               "q",
-              "{!parent which='(*:* -_nest_path_:*)'}(+" + inner_child_query + 
" +_nest_path_:*)");
+              "{!parent which='{!field f=_nest_path_ v=/}'}(+"
+                  + inner_child_query
+                  + " +_nest_path_:*)");

Review Comment:
   we can keep this non-verbose (we went from 1 line to 3).  You chose this 
syntax:
   
   ` {!field f=_nest_path_ v=/} `
   
   In the Lucene syntax, this is:
   
   `_nest_path_:\\/`
   
   I think.  I doubled the backslash to escape.
   
   It occurred to me that it'd be nice if a backslash in the field query causes 
a 400 error to alert the user they did too much escaping.  Such a mistake would 
likely go unnoticed.



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