dsmiley commented on code in PR #4512:
URL: https://github.com/apache/solr/pull/4512#discussion_r3381265315
##########
solr/core/src/java/org/apache/solr/schema/NestPathField.java:
##########
@@ -62,4 +67,16 @@ public void setArgs(IndexSchema schema, Map<String, String>
args) {
setIndexAnalyzer(new TokenizerChain(customAnalyzer));
// leave queryAnalyzer as literal
}
+
+ @Override
+ public Query getFieldQuery(QParser parser, SchemaField field, String
externalVal) {
+ if (externalVal == null || externalVal.isEmpty() ||
"/".equals(externalVal)) {
Review Comment:
I'm suspicious of null/empty. Do you think it should be implied the user
means only root docs? Maybe we should just throw a SolrException BAD_REQUEST.
##########
changelog/unreleased/SOLR_18197_nest_path_easy_of_use.yml:
##########
@@ -0,0 +1,7 @@
+title: Add root document query shortcut support to NestPathField
+type: changed
Review Comment:
This isn't "changed" since no _existing_ user/query is going to trigger this
functionality. The functionality here is opt-in, hence "added". If you think
the changelog template could be improved here, LMK.
--
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]