[
https://issues.apache.org/jira/browse/SOLR-6770?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14256927#comment-14256927
]
Yonik Seeley commented on SOLR-6770:
------------------------------------
The singular "param" in "useParam" sounds a little weird since you're actually
specifying a set of params. How about "useParams"?
{code}
#do a GET to view all the configured params
curl http://localhost:8983/solr/collection1/config/params
#or GET with a specific name to get only one set of params
curl http://localhost:8983/solr/collection1/config/params/x
{code}
These feels very rest-like... is there a reason we're not going more rest-like
for the updates as well?
{code}
curl http://localhost:8983/solr/collection1/config/params/x -d '
{
"a":"A val",
"b": "B val"
}
'
OR...
curl -XPUT http://localhost:8983/solr/collection1/config/params -d '
{
"x" : {
"a":"A val",
"b": "B val"
}
}
'
{code}
I suppose it's because of the desire to be able to specify "create" vs "update"
(and I assume the latter changes a param set rather than overwrites it?).
Is there another "resty" way to specify that distinction?
Even if we keep updates of the form:
{code}
"create" : {"name" ,"x",
"params": {
"a":"A val",
"b": "B val"}
{code}
We could actually eliminate the other names of "name" and "params" with a
structure like:
{code}
"create" : {
"x": {
"a":"A val",
"b": "B val"
}
}
{code}
Which seems a little more straightforward.
> Add/edit param sets and use them in Requests
> --------------------------------------------
>
> Key: SOLR-6770
> URL: https://issues.apache.org/jira/browse/SOLR-6770
> Project: Solr
> Issue Type: Sub-task
> Reporter: Noble Paul
> Assignee: Noble Paul
> Attachments: SOLR-6770.patch, SOLR-6770.patch
>
>
> Make it possible to define paramsets and use them directly in requests
> example
> {code}
> curl http://localhost:8983/solr/collection1/config/params -H
> 'Content-type:application/json' -d '{
> "create" : {"name" ,"x",
> "params": {
> "a":"A val",
> "b": "B val"}
> },
> "update" : {"name" ,"y",
> "params": {
> "x":"X val",
> "Y": "Y val"}
> },
> "delete" : "z"
> }'
> #do a GET to view all the configured params
> curl http://localhost:8983/solr/collection1/config/params
> #or GET with a specific name to get only one set of params
> curl http://localhost:8983/solr/collection1/config/params/x
> {code}
> This data will be stored in conf/params.json
> This is used requesttime and adding/editing params will not result in core
> reload and it will have no impact on the performance
> example usage http://localhost/solr/collection/select?useParam=x,y
> or it can be directly configured with a request handler as follows
> {code}
> <requestHandler name="/dump1" class="DumpRequestHandler" useParam="x"/>
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]