Skip to content

Commit a96608d

Browse files
authored
[8.10] Add Synonyms and Query rules APIs (#2300)
1 parent 8c5b750 commit a96608d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

74 files changed

+3846
-1988
lines changed

docs/sphinx/api.rst

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,12 @@ Nodes
144144
.. autoclass:: NodesClient
145145
:members:
146146

147+
Query rules
148+
-----------
149+
150+
.. autoclass:: QueryRulesetClient
151+
:members:
152+
147153
Rollup Indices
148154
--------------
149155

@@ -192,6 +198,12 @@ SQL
192198
.. autoclass:: SqlClient
193199
:members:
194200

201+
Synonyms
202+
--------
203+
204+
.. autoclass:: SynonymsClient
205+
:members:
206+
195207
TLS/SSL
196208
-------
197209

elasticsearch/_async/client/__init__.py

Lines changed: 193 additions & 132 deletions
Large diffs are not rendered by default.

elasticsearch/_async/client/async_search.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ async def delete(
4040
Deletes an async search by ID. If the search is still running, the search request
4141
will be cancelled. Otherwise, the saved search results are deleted.
4242
43-
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/async-search.html>`_
43+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.10/async-search.html>`_
4444
4545
:param id: A unique identifier for the async search.
4646
"""
@@ -82,7 +82,7 @@ async def get(
8282
Retrieves the results of a previously submitted async search request given its
8383
ID.
8484
85-
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/async-search.html>`_
85+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.10/async-search.html>`_
8686
8787
:param id: A unique identifier for the async search.
8888
:param keep_alive: Specifies how long the async search should be available in
@@ -139,7 +139,7 @@ async def status(
139139
Retrieves the status of a previously submitted async search request given its
140140
ID.
141141
142-
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/async-search.html>`_
142+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.10/async-search.html>`_
143143
144144
:param id: A unique identifier for the async search.
145145
"""
@@ -310,7 +310,7 @@ async def submit(
310310
"""
311311
Executes a search request asynchronously.
312312
313-
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/async-search.html>`_
313+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.10/async-search.html>`_
314314
315315
:param index: A comma-separated list of index names to search; use `_all` or
316316
empty string to perform the operation on all indices

elasticsearch/_async/client/autoscaling.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ async def delete_autoscaling_policy(
4040
Deletes an autoscaling policy. Designed for indirect use by ECE/ESS and ECK.
4141
Direct use is not supported.
4242
43-
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/autoscaling-delete-autoscaling-policy.html>`_
43+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.10/autoscaling-delete-autoscaling-policy.html>`_
4444
4545
:param name: the name of the autoscaling policy
4646
"""
@@ -76,7 +76,7 @@ async def get_autoscaling_capacity(
7676
Gets the current autoscaling capacity based on the configured autoscaling policy.
7777
Designed for indirect use by ECE/ESS and ECK. Direct use is not supported.
7878
79-
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/autoscaling-get-autoscaling-capacity.html>`_
79+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.10/autoscaling-get-autoscaling-capacity.html>`_
8080
"""
8181
__path = "/_autoscaling/capacity"
8282
__query: t.Dict[str, t.Any] = {}
@@ -109,7 +109,7 @@ async def get_autoscaling_policy(
109109
Retrieves an autoscaling policy. Designed for indirect use by ECE/ESS and ECK.
110110
Direct use is not supported.
111111
112-
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/autoscaling-get-autoscaling-capacity.html>`_
112+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.10/autoscaling-get-autoscaling-capacity.html>`_
113113
114114
:param name: the name of the autoscaling policy
115115
"""
@@ -149,7 +149,7 @@ async def put_autoscaling_policy(
149149
Creates a new autoscaling policy. Designed for indirect use by ECE/ESS and ECK.
150150
Direct use is not supported.
151151
152-
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/autoscaling-put-autoscaling-policy.html>`_
152+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.10/autoscaling-put-autoscaling-policy.html>`_
153153
154154
:param name: the name of the autoscaling policy
155155
:param policy:

elasticsearch/_async/client/cat.py

Lines changed: 80 additions & 61 deletions
Large diffs are not rendered by default.

elasticsearch/_async/client/ccr.py

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ async def delete_auto_follow_pattern(
3939
"""
4040
Deletes auto-follow patterns.
4141
42-
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/ccr-delete-auto-follow-pattern.html>`_
42+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.10/ccr-delete-auto-follow-pattern.html>`_
4343
4444
:param name: The name of the auto follow pattern.
4545
"""
@@ -96,7 +96,7 @@ async def follow(
9696
"""
9797
Creates a new follower index configured to follow the referenced leader index.
9898
99-
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/ccr-put-follow.html>`_
99+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.10/ccr-put-follow.html>`_
100100
101101
:param index: The name of the follower index
102102
:param leader_index:
@@ -180,7 +180,7 @@ async def follow_info(
180180
Retrieves information about all follower indices, including parameters and status
181181
for each follower index
182182
183-
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/ccr-get-follow-info.html>`_
183+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.10/ccr-get-follow-info.html>`_
184184
185185
:param index: A comma-separated list of index patterns; use `_all` to perform
186186
the operation on all indices
@@ -218,7 +218,7 @@ async def follow_stats(
218218
Retrieves follower stats. return shard-level stats about the following tasks
219219
associated with each shard for the specified indices.
220220
221-
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/ccr-get-follow-stats.html>`_
221+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.10/ccr-get-follow-stats.html>`_
222222
223223
:param index: A comma-separated list of index patterns; use `_all` to perform
224224
the operation on all indices
@@ -261,7 +261,7 @@ async def forget_follower(
261261
"""
262262
Removes the follower retention leases from the leader.
263263
264-
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/ccr-post-forget-follower.html>`_
264+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.10/ccr-post-forget-follower.html>`_
265265
266266
:param index: the name of the leader index for which specified follower retention
267267
leases should be removed
@@ -312,7 +312,7 @@ async def get_auto_follow_pattern(
312312
Gets configured auto-follow patterns. Returns the specified auto-follow pattern
313313
collection.
314314
315-
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/ccr-get-auto-follow-pattern.html>`_
315+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.10/ccr-get-auto-follow-pattern.html>`_
316316
317317
:param name: Specifies the auto-follow pattern collection that you want to retrieve.
318318
If you do not specify a name, the API returns information for all collections.
@@ -350,7 +350,7 @@ async def pause_auto_follow_pattern(
350350
"""
351351
Pauses an auto-follow pattern
352352
353-
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/ccr-pause-auto-follow-pattern.html>`_
353+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.10/ccr-pause-auto-follow-pattern.html>`_
354354
355355
:param name: The name of the auto follow pattern that should pause discovering
356356
new indices to follow.
@@ -388,7 +388,7 @@ async def pause_follow(
388388
Pauses a follower index. The follower index will not fetch any additional operations
389389
from the leader index.
390390
391-
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/ccr-post-pause-follow.html>`_
391+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.10/ccr-post-pause-follow.html>`_
392392
393393
:param index: The name of the follower index that should pause following its
394394
leader index.
@@ -452,7 +452,7 @@ async def put_auto_follow_pattern(
452452
cluster. Newly created indices on the remote cluster matching any of the specified
453453
patterns will be automatically configured as follower indices.
454454
455-
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/ccr-put-auto-follow-pattern.html>`_
455+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.10/ccr-put-auto-follow-pattern.html>`_
456456
457457
:param name: The name of the collection of auto-follow patterns.
458458
:param remote_cluster: The remote cluster containing the leader indices to match
@@ -566,7 +566,7 @@ async def resume_auto_follow_pattern(
566566
"""
567567
Resumes an auto-follow pattern that has been paused
568568
569-
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/ccr-resume-auto-follow-pattern.html>`_
569+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.10/ccr-resume-auto-follow-pattern.html>`_
570570
571571
:param name: The name of the auto follow pattern to resume discovering new indices
572572
to follow.
@@ -619,7 +619,7 @@ async def resume_follow(
619619
"""
620620
Resumes a follower index that has been paused
621621
622-
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/ccr-post-resume-follow.html>`_
622+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.10/ccr-post-resume-follow.html>`_
623623
624624
:param index: The name of the follow index to resume following.
625625
:param max_outstanding_read_requests:
@@ -693,7 +693,7 @@ async def stats(
693693
"""
694694
Gets all stats related to cross-cluster replication.
695695
696-
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/ccr-get-stats.html>`_
696+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.10/ccr-get-stats.html>`_
697697
"""
698698
__path = "/_ccr/stats"
699699
__query: t.Dict[str, t.Any] = {}
@@ -726,7 +726,7 @@ async def unfollow(
726726
Stops the following task associated with a follower index and removes index metadata
727727
and settings associated with cross-cluster replication.
728728
729-
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/ccr-post-unfollow.html>`_
729+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.10/ccr-post-unfollow.html>`_
730730
731731
:param index: The name of the follower index that should be turned into a regular
732732
index.

0 commit comments

Comments
 (0)