Creates or updates a query rule within a query ruleset Added in 8.15.0
Path parameters
-
The unique identifier of the query ruleset containing the rule to be created or updated
-
The unique identifier of the query rule within the specified ruleset to be created or updated
Body Required
PUT /_query_rules/{ruleset_id}/_rule/{rule_id}
curl \
-X PUT http://api.example.com/_query_rules/{ruleset_id}/_rule/{rule_id} \
-H "Content-Type: application/json" \
-d '{"type":"pinned","criteria":{"type":"global","metadata":"string","values":[{}]},"actions":{"ids":["string"],"docs":[{"_id":"string","_index":"string"}]},"priority":42.0}'
Request examples
{
"type": "pinned",
"criteria": {
"type": "global",
"metadata": "string",
"values": [
{}
]
},
"actions": {
"ids": [
"string"
],
"docs": [
{
"_id": "string",
"_index": "string"
}
]
},
"priority": 42.0
}
Response examples (200)
{
"result": "created"
}