@@ -29,7 +29,7 @@ module Actions
2929 # @option arguments [String] :ruleset_id The unique identifier of the query ruleset to delete (*Required*)
3030 # @option arguments [Hash] :headers Custom HTTP headers
3131 #
32- # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-query-rules-delete-ruleset
32+ # @see https://www.elastic.co/docs/api/doc/elasticsearch/v9/ operation/operation-query-rules-delete-ruleset
3333 #
3434 def delete_ruleset ( arguments = { } )
3535 request_opts = { endpoint : arguments [ :endpoint ] || 'query_rules.delete_ruleset' }
@@ -50,11 +50,19 @@ def delete_ruleset(arguments = {})
5050
5151 method = Elasticsearch ::API ::HTTP_DELETE
5252 path = "_query_rules/#{ Utils . listify ( _ruleset_id ) } "
53- params = { }
53+ params = Utils . process_params ( arguments )
5454
55- Elasticsearch ::API ::Response . new (
56- perform_request ( method , path , params , body , headers , request_opts )
57- )
55+ if Array ( arguments [ :ignore ] ) . include? ( 404 )
56+ Utils . rescue_from_not_found do
57+ Elasticsearch ::API ::Response . new (
58+ perform_request ( method , path , params , body , headers , request_opts )
59+ )
60+ end
61+ else
62+ Elasticsearch ::API ::Response . new (
63+ perform_request ( method , path , params , body , headers , request_opts )
64+ )
65+ end
5866 end
5967 end
6068 end
0 commit comments