[
https://issues.apache.org/jira/browse/SOLR-10519?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15982103#comment-15982103
]
Erick Erickson commented on SOLR-10519:
---------------------------------------
What do people think about this? The "delim" format in the patch makes for ugly
calls like
atPath(#part1#part2#/part3, "#");
You can still use
atPath(/part1/part2/part3);
but none of the parts can start with a slash. It's just wrong to be unable to
find one path or another, if we implemented some algorithm like "If the part
isn't found bare, then look for one with a slash", So the algo would be
for each part {
if (found a child with the name) continue
else {look for a child prepended with a slash}
}
makes it impossible to have both a forward slash and bar child, you'd never
find one part or another. As:
root/
child
/child
"child" and "/child" are distinct nodes so they must both be findable.
Siggghhhh. I suppose the proper solution is to be able to escape the slash as
atPath("/root/child/\/shashed_child/another_child);. I'll work that up I guess.
> SolrCLI.atPath cannot handle children that begin with a slash.
> --------------------------------------------------------------
>
> Key: SOLR-10519
> URL: https://issues.apache.org/jira/browse/SOLR-10519
> Project: Solr
> Issue Type: Improvement
> Security Level: Public(Default Security Level. Issues are Public)
> Affects Versions: 6.5, master (7.0)
> Reporter: Erick Erickson
> Assignee: Erick Erickson
> Attachments: SOLR-10519.patch
>
>
> When getting an element of a configuration from JSON where the _name_ of one
> of the elements in the tree begins with a slash (e.g. /query), SolrCLI.atPath
> fails because it splits on the slash.
> We either need a way to escape it or add an alternate delimiter. Here's one
> way that works, what do people think?
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]