-
Notifications
You must be signed in to change notification settings - Fork 839
SOLR-18197: Add root document query shortcut support to NestPathField #4512
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
e306ef9
b39e339
cdb63fd
bbd24e3
c240e22
f3c86ff
e4ab909
ba79e8a
26866bc
a457c03
cb632ee
9da87be
35547e9
8303718
31b0676
647e1cd
3be192c
b23d0ff
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| title: Add root document query shortcut support to NestPathField | ||
| type: added | ||
| authors: | ||
| - name: Abhishek Umarjikar | ||
| nick: abumarjikar | ||
| links: | ||
| - name: SOLR-18197 | ||
| url: https://issues.apache.org/jira/browse/SOLR-18197 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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", "/", | ||
|
Comment on lines
-689
to
+690
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. mabye leave the "verbose" codepath as-is.... it should be "verbose" after all :-) |
||
| "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", | ||
| "/"); | ||
|
Comment on lines
-694
to
+699
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 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 :-) |
||
| } | ||
| } // else... | ||
|
|
||
|
|
@@ -781,12 +786,17 @@ 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", | ||
| "/"); | ||
|
Comment on lines
786
to
+799
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same critique as down here and below |
||
| } | ||
| } // else... | ||
|
|
||
|
|
||
|
abumarjikar marked this conversation as resolved.
|
Uh oh!
There was an error while loading. Please reload this page.