Delete query ruleset
Removes a query ruleset and its associated data. This is a destructive action that is not recoverable.
Request
DELETE _query_rules/<ruleset_id>
Prerequisites
Requires the manage_search_query_rules privilege.
Path parameters
-
<ruleset_id> - (Required, string)
Response codes
-
400 - The
ruleset_idwas not provided. -
404(Missing resources) - No query ruleset matching
ruleset_idcould be found.
Examples
The following example deletes the query ruleset named my-ruleset:
resp = client.query_rules.delete_ruleset(
ruleset_id="my-ruleset",
)
print(resp) const response = await client.transport.request({
method: "DELETE",
path: "/_query_rules/my-ruleset",
});
console.log(response); DELETE _query_rules/my-ruleset/
© 2023-2025 Elasticsearch
As of September 2024, Elasticsearch is available under a choice of three licenses: the Server Side Public License (SSPL), the Elastic License, or the AGPLv3 (OSI approved).
Elasticsearch and the Elasticsearch logo are trademarks of Elasticsearch B.V., registered in the U.S. and in other countries.
https://www.elastic.co/guide/en/elasticsearch/reference/8.17/delete-query-ruleset.html