lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Erick Erickson (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (SOLR-10519) SolrCLI.atPath cannot handle children that begin with a slash.
Date Tue, 18 Apr 2017 23:56:41 GMT

     [ https://issues.apache.org/jira/browse/SOLR-10519?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Erick Erickson updated SOLR-10519:
----------------------------------
    Attachment: SOLR-10519.patch

it's kind of hard to read from the patch, but all it does is make
public static Object atPath(String jsonPath, Map<String,Object> json)
call
public static Object atPath(String jsonPath, Map<String,Object> json, String delim)


with "/" as the delim. Now I can call something like:
SolrCLI.atPath("#config#requestHandler#/query#defaults#wt", configJson, "#");

and get the wt parameter for this request handler.

I suppose one could also escape the slash somehow, but this works. I'll commit this relatively
soon unless there are objections (after precommit and testing of course, which I haven't done
yet).

> 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: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message