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

Noble Paul updated SOLR-6770:
-----------------------------
    Description: 
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 '{
"set" : {"x": {
              "a":"A val",
              "b": "B val"}
           },
"set" : {"y": {
               "x":"X val",
               "Y": "Y val"}
           },
"update" : {"y": {
               "x":"X val modified"}
           },

"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?useParams=x,y

or it can be directly configured with a request handler as follows
{code}
<requestHandler name="/dump1" class="DumpRequestHandler" useParams="x"/>
{code}

 {{useParams}} specified in request overrides the one specified in 
{{requestHandler}}

A more realistic example
{code}
curl http://localhost:8983/solr/collection1/config/params -H 
'Content-type:application/json'  -d '{
"set":{"query":{
    "defType":"edismax",
    "q.alt":"*:*",
    "rows":10,
    "fl":"*,score"  },
  "facets":{
    "facet":"on",
    "facet.mincount": 1
  },
 "velocity":{
   "wt": "velocity",
   "v.template":"browse",
   "v.layout": "layout"
 }
}
}
{code}
 and use all of them directly is a requesthandler
{code:xml}
  <requestHandler name="/browse" class="solr.SearchHandler" 
useParams="query,facets,velocity,browse"/>  
{code}


  was:
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 '{
"set" : {"x": {
              "a":"A val",
              "b": "B val"}
           },
"set" : {"y": {
               "x":"X val",
               "Y": "Y val"}
           },
"update" : {"y": {
               "x":"X val modified"}
           },

"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?useParams=x,y

or it can be directly configured with a request handler as follows
{code}
<requestHandler name="/dump1" class="DumpRequestHandler" useParams="x"/>
{code}

 {{useParams}} specified in request overrides the one specified in 
{{requestHandler}}

A more realistic example
{code}
curl http://localhost:8983/solr/collection1/config/params -H 
'Content-type:application/json'  -d '{
"set":{"query":{
    "defType":"edismax",
    "q.alt":"*:*",
    "rows":"10",
    "fl":"*,score"  },
  "facets":{
    "facet":"on",
    "facet.mincount": "1"
  },
 "velocity":{
   "wt": "velocity",
   "v.template":"browse",
   "v.layout": "layout"
 }
}
}
{code}
 and use all of them directly is a requesthandler
{code:xml}
  <requestHandler name="/browse" class="solr.SearchHandler" 
useParams="query,facets,velocity,browse"/>  
{code}



> 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
>             Fix For: 5.0, Trunk
>
>         Attachments: SOLR-6770.patch, 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 '{
> "set" : {"x": {
>               "a":"A val",
>               "b": "B val"}
>            },
> "set" : {"y": {
>                "x":"X val",
>                "Y": "Y val"}
>            },
> "update" : {"y": {
>                "x":"X val modified"}
>            },
> "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?useParams=x,y
> or it can be directly configured with a request handler as follows
> {code}
> <requestHandler name="/dump1" class="DumpRequestHandler" useParams="x"/>
> {code}
>  {{useParams}} specified in request overrides the one specified in 
> {{requestHandler}}
> A more realistic example
> {code}
> curl http://localhost:8983/solr/collection1/config/params -H 
> 'Content-type:application/json'  -d '{
> "set":{"query":{
>     "defType":"edismax",
>     "q.alt":"*:*",
>     "rows":10,
>     "fl":"*,score"  },
>   "facets":{
>     "facet":"on",
>     "facet.mincount": 1
>   },
>  "velocity":{
>    "wt": "velocity",
>    "v.template":"browse",
>    "v.layout": "layout"
>  }
> }
> }
> {code}
>  and use all of them directly is a requesthandler
> {code:xml}
>   <requestHandler name="/browse" class="solr.SearchHandler" 
> useParams="query,facets,velocity,browse"/>  
> {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]

Reply via email to