dsmiley commented on code in PR #4512:
URL: https://github.com/apache/solr/pull/4512#discussion_r3483104621
##########
solr/core/src/test/org/apache/solr/update/TestNestedUpdateProcessor.java:
##########
@@ -686,12 +686,17 @@ private SolrParams parentQueryMaker(String parent_path,
String inner_child_query
if (verbose) {
return params(
"q", "{!parent which=$parent_filt v=$child_q}",
- "parent_filt", "(*:* -_nest_path_:*)",
+ "parent_filt", "{!field f=_nest_path_ v=$fieldQ}",
+ "fieldQ", "/",
"child_q", "(+" + inner_child_query + " +_nest_path_:*)");
} else {
return params(
"q",
- "{!parent which='(*:* -_nest_path_:*)'}(+" + inner_child_query +
" +_nest_path_:*)");
+ "{!parent which='{!field f=_nest_path_ v=$fieldQ}'}(+"
+ + inner_child_query
+ + " +_nest_path_:*)",
+ "fieldQ",
+ "/");
Review Comment:
there's irony in you modifying the non-verbose code path .... to make it
more verbose. surely you can keep it simple. I'll leave it as a test for you
:-)
##########
solr/core/src/test/org/apache/solr/update/TestNestedUpdateProcessor.java:
##########
@@ -686,12 +686,17 @@ private SolrParams parentQueryMaker(String parent_path,
String inner_child_query
if (verbose) {
return params(
"q", "{!parent which=$parent_filt v=$child_q}",
- "parent_filt", "(*:* -_nest_path_:*)",
+ "parent_filt", "{!field f=_nest_path_ v=$fieldQ}",
+ "fieldQ", "/",
Review Comment:
mabye leave the "verbose" codepath as-is.... it should be "verbose" after
all :-)
##########
solr/core/src/test/org/apache/solr/update/TestNestedUpdateProcessor.java:
##########
@@ -781,19 +786,24 @@ private SolrParams childQueryMaker(String parent_path,
String inner_parent_query
if (verbose) {
return params(
"q", "{!child of=$parent_filt v=$parent_q})",
- "parent_filt", "(*:* -_nest_path_:*)",
+ "parent_filt", "{!field f=_nest_path_ v=$fieldQ}",
+ "fieldQ", "/",
"parent_q", "(+" + inner_parent_query + " -_nest_path_:*)");
} else {
return params(
"q",
- "{!child of='(*:* -_nest_path_:*)'}(+" + inner_parent_query + "
-_nest_path_:*)");
+ "{!child of='{!field f=_nest_path_ v=$fieldQ}'}(+"
+ + inner_parent_query
+ + " -_nest_path_:*)",
+ "fieldQ",
+ "/");
Review Comment:
same critique as down here and below
--
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]