Skip to content

Commit e0871f8

Browse files
committed
[API] Updates synonyms.delete_synonym_rule, synonyms.put_synonym, synonyms.put_synonym_rule
Adds Boolean :refresh parameter. 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. Updates source code documentation.
1 parent ff9ec8f commit e0871f8

File tree

7 files changed

+13
-7
lines changed

7 files changed

+13
-7
lines changed

elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_data_frame_analytics_stats.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ module Elasticsearch
2222
module API
2323
module MachineLearning
2424
module Actions
25-
# Get data frame analytics jobs usage info.
25+
# Get data frame analytics job stats.
2626
#
2727
# @option arguments [String] :id Identifier for the data frame analytics job. If you do not specify this
2828
# option, the API returns information for the first hundred data frame

elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_datafeed_stats.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ module Elasticsearch
2222
module API
2323
module MachineLearning
2424
module Actions
25-
# Get datafeeds usage info.
25+
# Get datafeed stats.
2626
# You can get statistics for multiple datafeeds in a single API request by
2727
# using a comma-separated list of datafeeds or a wildcard expression. You can
2828
# get statistics for all datafeeds by using +_all+, by specifying +*+ as the

elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_job_stats.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ module Elasticsearch
2222
module API
2323
module MachineLearning
2424
module Actions
25-
# Get anomaly detection jobs usage info.
25+
# Get anomaly detection job stats.
2626
#
2727
# @option arguments [String] :job_id Identifier for the anomaly detection job. It can be a job identifier, a
2828
# group name, a comma-separated list of jobs, or a wildcard expression. If

elasticsearch-api/lib/elasticsearch/api/actions/synonyms/delete_synonym_rule.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ module Actions
2727
#
2828
# @option arguments [String] :set_id The ID of the synonym set to update. (*Required*)
2929
# @option arguments [String] :rule_id The ID of the synonym rule to delete. (*Required*)
30+
# @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.
31+
# If +false+, analyzers will not be reloaded with the deleted synonym rule Server default: true.
3032
# @option arguments [Hash] :headers Custom HTTP headers
3133
#
3234
# @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-synonyms-delete-synonym-rule
@@ -53,7 +55,7 @@ def delete_synonym_rule(arguments = {})
5355

5456
method = Elasticsearch::API::HTTP_DELETE
5557
path = "_synonyms/#{Utils.listify(_set_id)}/#{Utils.listify(_rule_id)}"
56-
params = {}
58+
params = Utils.process_params(arguments)
5759

5860
Elasticsearch::API::Response.new(
5961
perform_request(method, path, params, body, headers, request_opts)

elasticsearch-api/lib/elasticsearch/api/actions/synonyms/put_synonym.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ module Actions
2929
# This is equivalent to invoking the reload search analyzers API for all indices that use the synonyms set.
3030
#
3131
# @option arguments [String] :id The ID of the synonyms set to be created or updated. (*Required*)
32+
# @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.
33+
# If +false+, analyzers will not be reloaded with the new synonym set Server default: true.
3234
# @option arguments [Hash] :headers Custom HTTP headers
3335
# @option arguments [Hash] :body request body
3436
#
@@ -54,7 +56,7 @@ def put_synonym(arguments = {})
5456

5557
method = Elasticsearch::API::HTTP_PUT
5658
path = "_synonyms/#{Utils.listify(_id)}"
57-
params = {}
59+
params = Utils.process_params(arguments)
5860

5961
Elasticsearch::API::Response.new(
6062
perform_request(method, path, params, body, headers, request_opts)

elasticsearch-api/lib/elasticsearch/api/actions/synonyms/put_synonym_rule.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ module Actions
2929
#
3030
# @option arguments [String] :set_id The ID of the synonym set. (*Required*)
3131
# @option arguments [String] :rule_id The ID of the synonym rule to be updated or created. (*Required*)
32+
# @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.
33+
# If +false+, analyzers will not be reloaded with the new synonym rule Server default: true.
3234
# @option arguments [Hash] :headers Custom HTTP headers
3335
# @option arguments [Hash] :body request body
3436
#
@@ -57,7 +59,7 @@ def put_synonym_rule(arguments = {})
5759

5860
method = Elasticsearch::API::HTTP_PUT
5961
path = "_synonyms/#{Utils.listify(_set_id)}/#{Utils.listify(_rule_id)}"
60-
params = {}
62+
params = Utils.process_params(arguments)
6163

6264
Elasticsearch::API::Response.new(
6365
perform_request(method, path, params, body, headers, request_opts)

elasticsearch-api/lib/elasticsearch/api/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,6 @@
1818
module Elasticsearch
1919
module API
2020
VERSION = '9.0.0'.freeze
21-
ES_SPECIFICATION_COMMIT = 'cd9c33775947086a99e6cf299b87733ba0111c28'.freeze
21+
ES_SPECIFICATION_COMMIT = '2843115df10df34cd34d22868131fdf7592e2655'.freeze
2222
end
2323
end

0 commit comments

Comments
 (0)