mirror of https://github.com/apache/lucene.git
SOLR-12769: correct documentation for delete op in request params API
This commit is contained in:
parent
dce0c5953c
commit
227a624f8a
|
@ -112,11 +112,13 @@ Optimizations
|
|||
|
||||
Bug Fixes
|
||||
---------------------
|
||||
|
||||
* SOLR-13827: Fail on unknown operation in Request Parameters API (Munendra S N, noble)
|
||||
|
||||
Other Changes
|
||||
---------------------
|
||||
(No changes)
|
||||
|
||||
* SOLR-12769: Fix incorrect documentation for 'delete' op in Request parameters API (Alexandre Rafalovitch, Munendra S N)
|
||||
|
||||
================== 8.3.0 ==================
|
||||
|
||||
|
|
|
@ -35,19 +35,19 @@ When might you want to use this feature?
|
|||
|
||||
All requests are sent to the `/config/params` endpoint of the Config API.
|
||||
|
||||
== Setting Request Parameters
|
||||
== Configuring Request Parameters
|
||||
|
||||
The request to set, unset, or update request parameters is sent as a set of Maps with names. These objects can be directly used in a request or a request handler definition.
|
||||
The request to set, or update request parameters is sent as a set of Maps with names. These objects can be directly used in a request or a request handler definition. The request to delete parameter set is sent as list of names or a name.
|
||||
|
||||
The available commands are:
|
||||
|
||||
* `set`: Create or overwrite a parameter set map.
|
||||
* `unset`: delete a parameter set map.
|
||||
* `delete`: Remove a request parameter set map.
|
||||
* `update`: update a parameter set map. This is equivalent to a `map.putAll(newMap)`. Both the maps are merged and if the new map has same keys as old they are overwritten.
|
||||
|
||||
You can mix these commands into a single request if necessary.
|
||||
|
||||
Each map must include a name so it can be referenced later, either in a direct request to Solr or in a request handler definition.
|
||||
For `set` or `update` commands, each map must include a name so it can be referenced later, either in a direct request to Solr or in a request handler definition.
|
||||
|
||||
In the following example, we are setting 2 sets of parameters named 'myFacets' and 'myQueries'.
|
||||
|
||||
|
@ -83,6 +83,27 @@ curl http://localhost:8983/solr/techproducts/config/params -H 'Content-type:appl
|
|||
}'
|
||||
----
|
||||
|
||||
In the following example, two set of parameters named 'myFacets' and 'myQueries' are deleted.
|
||||
|
||||
[source,bash]
|
||||
----
|
||||
curl http://localhost:8983/solr/techproducts/config/params -H 'Content-type:application/json' -d '{
|
||||
"delete":[
|
||||
"myFacets",
|
||||
"myQueries"
|
||||
]
|
||||
}'
|
||||
----
|
||||
|
||||
When deleting a single parameter set, the value could be specified as string instead of list.
|
||||
|
||||
[source,bash]
|
||||
----
|
||||
curl http://localhost:8983/solr/techproducts/config/params -H 'Content-type:application/json' -d '{
|
||||
"delete":"myFacets"
|
||||
}'
|
||||
----
|
||||
|
||||
== Using Request Parameters with RequestHandlers
|
||||
|
||||
After creating the `my_handler_params` paramset in the above section, it is possible to define a request handler as follows:
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
"description":"Add or overwrite one or more paramsets. Each paramset definition includes a paramset name, followed by key-value pairs of the parameter and value to be set.",
|
||||
"additionalProperties": true
|
||||
},
|
||||
"unset": {
|
||||
"delete": {
|
||||
"type":"array",
|
||||
"description": "Delete one or more paramsets.",
|
||||
"items": {
|
||||
|
|
Loading…
Reference in New Issue