diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/query_rules/delete_ruleset.rb b/elasticsearch-api/lib/elasticsearch/api/actions/query_rules/delete_ruleset.rb index 057962e12..f6739b40b 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/query_rules/delete_ruleset.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/query_rules/delete_ruleset.rb @@ -48,11 +48,19 @@ def delete_ruleset(arguments = {}) method = Elasticsearch::API::HTTP_DELETE path = "_query_rules/#{Utils.__listify(_ruleset_id)}" - params = {} + params = Utils.process_params(arguments) - Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers, request_opts) - ) + if Array(arguments[:ignore]).include?(404) + Utils.__rescue_from_not_found do + Elasticsearch::API::Response.new( + perform_request(method, path, params, body, headers, request_opts) + ) + end + else + Elasticsearch::API::Response.new( + perform_request(method, path, params, body, headers, request_opts) + ) + end end end end diff --git a/elasticsearch-api/utils/thor/endpoint_specifics.rb b/elasticsearch-api/utils/thor/endpoint_specifics.rb index 5dc4d6fa6..eea5f46cd 100644 --- a/elasticsearch-api/utils/thor/endpoint_specifics.rb +++ b/elasticsearch-api/utils/thor/endpoint_specifics.rb @@ -39,6 +39,7 @@ module EndpointSpecifics indices.delete indices.delete_template indices.flush_synced + query_rules.delete_ruleset security.get_role security.get_user snapshot.delete