Skip to content

[API] Updates synonyms.delete_synonym_rule, synonyms.put_synonym, synonyms.put_synonym_rule #2668

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 25, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ module Elasticsearch
module API
module MachineLearning
module Actions
# Get data frame analytics jobs usage info.
# Get data frame analytics job stats.
#
# @option arguments [String] :id Identifier for the data frame analytics job. If you do not specify this
# option, the API returns information for the first hundred data frame
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ module Elasticsearch
module API
module MachineLearning
module Actions
# Get datafeeds usage info.
# Get datafeed stats.
# You can get statistics for multiple datafeeds in a single API request by
# using a comma-separated list of datafeeds or a wildcard expression. You can
# get statistics for all datafeeds by using +_all+, by specifying +*+ as the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ module Elasticsearch
module API
module MachineLearning
module Actions
# Get anomaly detection jobs usage info.
# Get anomaly detection job stats.
#
# @option arguments [String] :job_id Identifier for the anomaly detection job. It can be a job identifier, a
# group name, a comma-separated list of jobs, or a wildcard expression. If
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ module Actions
#
# @option arguments [String] :set_id The ID of the synonym set to update. (*Required*)
# @option arguments [String] :rule_id The ID of the synonym rule to delete. (*Required*)
# @option arguments [Boolean] :refresh If +true+, the request will refresh the analyzers with the deleted synonym rule and wait for the new synonyms to be available before returning.
# If +false+, analyzers will not be reloaded with the deleted synonym rule Server default: true.
# @option arguments [Hash] :headers Custom HTTP headers
#
# @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-synonyms-delete-synonym-rule
Expand All @@ -53,7 +55,7 @@ def delete_synonym_rule(arguments = {})

method = Elasticsearch::API::HTTP_DELETE
path = "_synonyms/#{Utils.listify(_set_id)}/#{Utils.listify(_rule_id)}"
params = {}
params = Utils.process_params(arguments)

Elasticsearch::API::Response.new(
perform_request(method, path, params, body, headers, request_opts)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ module Actions
# This is equivalent to invoking the reload search analyzers API for all indices that use the synonyms set.
#
# @option arguments [String] :id The ID of the synonyms set to be created or updated. (*Required*)
# @option arguments [Boolean] :refresh If +true+, the request will refresh the analyzers with the new synonyms set and wait for the new synonyms to be available before returning.
# If +false+, analyzers will not be reloaded with the new synonym set Server default: true.
# @option arguments [Hash] :headers Custom HTTP headers
# @option arguments [Hash] :body request body
#
Expand All @@ -54,7 +56,7 @@ def put_synonym(arguments = {})

method = Elasticsearch::API::HTTP_PUT
path = "_synonyms/#{Utils.listify(_id)}"
params = {}
params = Utils.process_params(arguments)

Elasticsearch::API::Response.new(
perform_request(method, path, params, body, headers, request_opts)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ module Actions
#
# @option arguments [String] :set_id The ID of the synonym set. (*Required*)
# @option arguments [String] :rule_id The ID of the synonym rule to be updated or created. (*Required*)
# @option arguments [Boolean] :refresh If +true+, the request will refresh the analyzers with the new synonym rule and wait for the new synonyms to be available before returning.
# If +false+, analyzers will not be reloaded with the new synonym rule Server default: true.
# @option arguments [Hash] :headers Custom HTTP headers
# @option arguments [Hash] :body request body
#
Expand Down Expand Up @@ -57,7 +59,7 @@ def put_synonym_rule(arguments = {})

method = Elasticsearch::API::HTTP_PUT
path = "_synonyms/#{Utils.listify(_set_id)}/#{Utils.listify(_rule_id)}"
params = {}
params = Utils.process_params(arguments)

Elasticsearch::API::Response.new(
perform_request(method, path, params, body, headers, request_opts)
Expand Down
2 changes: 1 addition & 1 deletion elasticsearch-api/lib/elasticsearch/api/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@
module Elasticsearch
module API
VERSION = '9.0.0'.freeze
ES_SPECIFICATION_COMMIT = 'cd9c33775947086a99e6cf299b87733ba0111c28'.freeze
ES_SPECIFICATION_COMMIT = '2843115df10df34cd34d22868131fdf7592e2655'.freeze
end
end