elasticsearch 9.1.2__py3-none-any.whl → 9.1.3__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- elasticsearch/_async/client/__init__.py +67 -65
- elasticsearch/_async/client/async_search.py +3 -3
- elasticsearch/_async/client/autoscaling.py +8 -4
- elasticsearch/_async/client/cat.py +40 -2
- elasticsearch/_async/client/ccr.py +10 -10
- elasticsearch/_async/client/cluster.py +34 -33
- elasticsearch/_async/client/connector.py +42 -41
- elasticsearch/_async/client/dangling_indices.py +8 -12
- elasticsearch/_async/client/enrich.py +10 -10
- elasticsearch/_async/client/eql.py +10 -10
- elasticsearch/_async/client/esql.py +16 -16
- elasticsearch/_async/client/features.py +6 -6
- elasticsearch/_async/client/fleet.py +8 -12
- elasticsearch/_async/client/graph.py +3 -7
- elasticsearch/_async/client/ilm.py +20 -28
- elasticsearch/_async/client/indices.py +140 -160
- elasticsearch/_async/client/inference.py +30 -126
- elasticsearch/_async/client/ingest.py +9 -9
- elasticsearch/_async/client/license.py +5 -7
- elasticsearch/_async/client/logstash.py +4 -4
- elasticsearch/_async/client/migration.py +6 -6
- elasticsearch/_async/client/ml.py +125 -85
- elasticsearch/_async/client/monitoring.py +4 -3
- elasticsearch/_async/client/nodes.py +15 -15
- elasticsearch/_async/client/query_rules.py +16 -16
- elasticsearch/_async/client/rollup.py +21 -21
- elasticsearch/_async/client/search_application.py +19 -19
- elasticsearch/_async/client/searchable_snapshots.py +10 -10
- elasticsearch/_async/client/security.py +8 -7
- elasticsearch/_async/client/shutdown.py +9 -4
- elasticsearch/_async/client/simulate.py +4 -4
- elasticsearch/_async/client/slm.py +18 -22
- elasticsearch/_async/client/snapshot.py +20 -20
- elasticsearch/_async/client/sql.py +10 -10
- elasticsearch/_async/client/streams.py +6 -6
- elasticsearch/_async/client/synonyms.py +10 -10
- elasticsearch/_async/client/tasks.py +8 -8
- elasticsearch/_async/client/text_structure.py +13 -9
- elasticsearch/_async/client/transform.py +51 -12
- elasticsearch/_async/client/utils.py +4 -2
- elasticsearch/_async/client/watcher.py +26 -26
- elasticsearch/_async/client/xpack.py +6 -5
- elasticsearch/_sync/client/__init__.py +69 -65
- elasticsearch/_sync/client/async_search.py +3 -3
- elasticsearch/_sync/client/autoscaling.py +8 -4
- elasticsearch/_sync/client/cat.py +40 -2
- elasticsearch/_sync/client/ccr.py +10 -10
- elasticsearch/_sync/client/cluster.py +34 -33
- elasticsearch/_sync/client/connector.py +42 -41
- elasticsearch/_sync/client/dangling_indices.py +8 -12
- elasticsearch/_sync/client/enrich.py +10 -10
- elasticsearch/_sync/client/eql.py +10 -10
- elasticsearch/_sync/client/esql.py +16 -16
- elasticsearch/_sync/client/features.py +6 -6
- elasticsearch/_sync/client/fleet.py +8 -12
- elasticsearch/_sync/client/graph.py +3 -7
- elasticsearch/_sync/client/ilm.py +20 -28
- elasticsearch/_sync/client/indices.py +140 -160
- elasticsearch/_sync/client/inference.py +30 -126
- elasticsearch/_sync/client/ingest.py +9 -9
- elasticsearch/_sync/client/license.py +5 -7
- elasticsearch/_sync/client/logstash.py +4 -4
- elasticsearch/_sync/client/migration.py +6 -6
- elasticsearch/_sync/client/ml.py +125 -85
- elasticsearch/_sync/client/monitoring.py +4 -3
- elasticsearch/_sync/client/nodes.py +15 -15
- elasticsearch/_sync/client/query_rules.py +16 -16
- elasticsearch/_sync/client/rollup.py +21 -21
- elasticsearch/_sync/client/search_application.py +19 -19
- elasticsearch/_sync/client/searchable_snapshots.py +10 -10
- elasticsearch/_sync/client/security.py +8 -7
- elasticsearch/_sync/client/shutdown.py +9 -4
- elasticsearch/_sync/client/simulate.py +4 -4
- elasticsearch/_sync/client/slm.py +18 -22
- elasticsearch/_sync/client/snapshot.py +20 -20
- elasticsearch/_sync/client/sql.py +10 -10
- elasticsearch/_sync/client/streams.py +6 -6
- elasticsearch/_sync/client/synonyms.py +10 -10
- elasticsearch/_sync/client/tasks.py +8 -8
- elasticsearch/_sync/client/text_structure.py +13 -9
- elasticsearch/_sync/client/transform.py +51 -12
- elasticsearch/_sync/client/utils.py +16 -2
- elasticsearch/_sync/client/watcher.py +26 -26
- elasticsearch/_sync/client/xpack.py +6 -5
- elasticsearch/_version.py +2 -2
- elasticsearch/dsl/_async/document.py +4 -5
- elasticsearch/dsl/_async/index.py +1 -1
- elasticsearch/dsl/_async/search.py +2 -3
- elasticsearch/dsl/_sync/document.py +4 -5
- elasticsearch/dsl/_sync/index.py +1 -1
- elasticsearch/dsl/_sync/search.py +2 -3
- elasticsearch/dsl/aggs.py +3 -3
- elasticsearch/dsl/async_connections.py +1 -2
- elasticsearch/dsl/connections.py +1 -2
- elasticsearch/dsl/document_base.py +1 -1
- elasticsearch/dsl/field.py +1 -9
- elasticsearch/dsl/query.py +24 -5
- elasticsearch/dsl/serializer.py +1 -2
- elasticsearch/dsl/types.py +11 -43
- elasticsearch/dsl/utils.py +1 -2
- elasticsearch/esql/esql.py +1 -1
- elasticsearch/esql/functions.py +2 -2
- elasticsearch/helpers/vectorstore/__init__.py +7 -7
- elasticsearch/helpers/vectorstore/_async/_utils.py +1 -1
- elasticsearch/helpers/vectorstore/_async/embedding_service.py +2 -2
- elasticsearch/helpers/vectorstore/_async/strategies.py +3 -3
- elasticsearch/helpers/vectorstore/_async/vectorstore.py +5 -5
- elasticsearch/helpers/vectorstore/_sync/_utils.py +1 -1
- elasticsearch/helpers/vectorstore/_sync/embedding_service.py +2 -2
- elasticsearch/helpers/vectorstore/_sync/strategies.py +3 -3
- elasticsearch/helpers/vectorstore/_sync/vectorstore.py +5 -5
- {elasticsearch-9.1.2.dist-info → elasticsearch-9.1.3.dist-info}/METADATA +1 -1
- elasticsearch-9.1.3.dist-info/RECORD +165 -0
- {elasticsearch-9.1.2.dist-info → elasticsearch-9.1.3.dist-info}/WHEEL +1 -1
- elasticsearch-9.1.2.dist-info/RECORD +0 -165
- {elasticsearch-9.1.2.dist-info → elasticsearch-9.1.3.dist-info}/licenses/LICENSE +0 -0
- {elasticsearch-9.1.2.dist-info → elasticsearch-9.1.3.dist-info}/licenses/NOTICE +0 -0
|
@@ -23,9 +23,9 @@ from ._base import NamespacedClient
|
|
|
23
23
|
from .utils import (
|
|
24
24
|
SKIP_IN_PATH,
|
|
25
25
|
Stability,
|
|
26
|
+
_availability_warning,
|
|
26
27
|
_quote,
|
|
27
28
|
_rewrite_parameters,
|
|
28
|
-
_stability_warning,
|
|
29
29
|
)
|
|
30
30
|
|
|
31
31
|
|
|
@@ -165,8 +165,8 @@ class IndicesClient(NamespacedClient):
|
|
|
165
165
|
"""
|
|
166
166
|
.. raw:: html
|
|
167
167
|
|
|
168
|
-
<p>Get tokens from text analysis
|
|
169
|
-
The analyze API performs analysis on a text string and returns the resulting tokens.</p>
|
|
168
|
+
<p>Get tokens from text analysis.</p>
|
|
169
|
+
<p>The analyze API performs analysis on a text string and returns the resulting tokens.</p>
|
|
170
170
|
<p>Generating excessive amount of tokens may cause a node to run out of memory.
|
|
171
171
|
The <code>index.analyze.max_token_count</code> setting enables you to limit the number of tokens that can be produced.
|
|
172
172
|
If more than this limit of tokens gets generated, an error occurs.
|
|
@@ -232,11 +232,7 @@ class IndicesClient(NamespacedClient):
|
|
|
232
232
|
__body["text"] = text
|
|
233
233
|
if tokenizer is not None:
|
|
234
234
|
__body["tokenizer"] = tokenizer
|
|
235
|
-
|
|
236
|
-
__body = None # type: ignore[assignment]
|
|
237
|
-
__headers = {"accept": "application/json"}
|
|
238
|
-
if __body is not None:
|
|
239
|
-
__headers["content-type"] = "application/json"
|
|
235
|
+
__headers = {"accept": "application/json", "content-type": "application/json"}
|
|
240
236
|
return await self.perform_request( # type: ignore[return-value]
|
|
241
237
|
"POST",
|
|
242
238
|
__path,
|
|
@@ -248,7 +244,7 @@ class IndicesClient(NamespacedClient):
|
|
|
248
244
|
)
|
|
249
245
|
|
|
250
246
|
@_rewrite_parameters()
|
|
251
|
-
@
|
|
247
|
+
@_availability_warning(Stability.EXPERIMENTAL)
|
|
252
248
|
async def cancel_migrate_reindex(
|
|
253
249
|
self,
|
|
254
250
|
*,
|
|
@@ -319,8 +315,8 @@ class IndicesClient(NamespacedClient):
|
|
|
319
315
|
"""
|
|
320
316
|
.. raw:: html
|
|
321
317
|
|
|
322
|
-
<p>Clear the cache
|
|
323
|
-
Clear the cache of one or more indices.
|
|
318
|
+
<p>Clear the cache.</p>
|
|
319
|
+
<p>Clear the cache of one or more indices.
|
|
324
320
|
For data streams, the API clears the caches of the stream's backing indices.</p>
|
|
325
321
|
<p>By default, the clear cache API clears all caches.
|
|
326
322
|
To clear only specific caches, use the <code>fielddata</code>, <code>query</code>, or <code>request</code> parameters.
|
|
@@ -412,8 +408,8 @@ class IndicesClient(NamespacedClient):
|
|
|
412
408
|
"""
|
|
413
409
|
.. raw:: html
|
|
414
410
|
|
|
415
|
-
<p>Clone an index
|
|
416
|
-
Clone an existing index into a new index.
|
|
411
|
+
<p>Clone an index.</p>
|
|
412
|
+
<p>Clone an existing index into a new index.
|
|
417
413
|
Each original primary shard is cloned into a new primary shard in the new index.</p>
|
|
418
414
|
<p>IMPORTANT: Elasticsearch does not apply index templates to the resulting index.
|
|
419
415
|
The API also does not copy index metadata from the original index.
|
|
@@ -537,8 +533,8 @@ class IndicesClient(NamespacedClient):
|
|
|
537
533
|
"""
|
|
538
534
|
.. raw:: html
|
|
539
535
|
|
|
540
|
-
<p>Close an index
|
|
541
|
-
A closed index is blocked for read or write operations and does not allow all operations that opened indices allow.
|
|
536
|
+
<p>Close an index.</p>
|
|
537
|
+
<p>A closed index is blocked for read or write operations and does not allow all operations that opened indices allow.
|
|
542
538
|
It is not possible to index documents or to search for documents in a closed index.
|
|
543
539
|
Closed indices do not have to maintain internal data structures for indexing or searching documents, which results in a smaller overhead on the cluster.</p>
|
|
544
540
|
<p>When opening or closing an index, the master node is responsible for restarting the index shards to reflect the new state of the index.
|
|
@@ -634,8 +630,8 @@ class IndicesClient(NamespacedClient):
|
|
|
634
630
|
"""
|
|
635
631
|
.. raw:: html
|
|
636
632
|
|
|
637
|
-
<p>Create an index
|
|
638
|
-
You can use the create index API to add a new index to an Elasticsearch cluster.
|
|
633
|
+
<p>Create an index.</p>
|
|
634
|
+
<p>You can use the create index API to add a new index to an Elasticsearch cluster.
|
|
639
635
|
When creating an index, you can specify the following:</p>
|
|
640
636
|
<ul>
|
|
641
637
|
<li>Settings for the index.</li>
|
|
@@ -782,7 +778,7 @@ class IndicesClient(NamespacedClient):
|
|
|
782
778
|
@_rewrite_parameters(
|
|
783
779
|
body_name="create_from",
|
|
784
780
|
)
|
|
785
|
-
@
|
|
781
|
+
@_availability_warning(Stability.EXPERIMENTAL)
|
|
786
782
|
async def create_from(
|
|
787
783
|
self,
|
|
788
784
|
*,
|
|
@@ -930,8 +926,8 @@ class IndicesClient(NamespacedClient):
|
|
|
930
926
|
"""
|
|
931
927
|
.. raw:: html
|
|
932
928
|
|
|
933
|
-
<p>Delete indices
|
|
934
|
-
Deleting an index deletes its documents, shards, and metadata.
|
|
929
|
+
<p>Delete indices.</p>
|
|
930
|
+
<p>Deleting an index deletes its documents, shards, and metadata.
|
|
935
931
|
It does not delete related Kibana components, such as data views, visualizations, or dashboards.</p>
|
|
936
932
|
<p>You cannot delete the current write index of a data stream.
|
|
937
933
|
To delete the index, you must roll over the data stream so a new write index is created.
|
|
@@ -1008,8 +1004,8 @@ class IndicesClient(NamespacedClient):
|
|
|
1008
1004
|
"""
|
|
1009
1005
|
.. raw:: html
|
|
1010
1006
|
|
|
1011
|
-
<p>Delete an alias
|
|
1012
|
-
Removes a data stream or index from an alias.</p>
|
|
1007
|
+
<p>Delete an alias.</p>
|
|
1008
|
+
<p>Removes a data stream or index from an alias.</p>
|
|
1013
1009
|
|
|
1014
1010
|
|
|
1015
1011
|
`<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-delete-alias>`_
|
|
@@ -1076,18 +1072,18 @@ class IndicesClient(NamespacedClient):
|
|
|
1076
1072
|
"""
|
|
1077
1073
|
.. raw:: html
|
|
1078
1074
|
|
|
1079
|
-
<p>Delete data stream lifecycles
|
|
1080
|
-
Removes the data stream lifecycle from a data stream, rendering it not managed by the data stream lifecycle.</p>
|
|
1075
|
+
<p>Delete data stream lifecycles.</p>
|
|
1076
|
+
<p>Removes the data stream lifecycle from a data stream, rendering it not managed by the data stream lifecycle.</p>
|
|
1081
1077
|
|
|
1082
1078
|
|
|
1083
1079
|
`<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-delete-data-lifecycle>`_
|
|
1084
1080
|
|
|
1085
1081
|
:param name: A comma-separated list of data streams of which the data stream
|
|
1086
|
-
lifecycle will be deleted
|
|
1082
|
+
lifecycle will be deleted. Use `*` to get all data streams
|
|
1087
1083
|
:param expand_wildcards: Whether wildcard expressions should get expanded to
|
|
1088
1084
|
open or closed indices (default: open)
|
|
1089
|
-
:param master_timeout:
|
|
1090
|
-
:param timeout:
|
|
1085
|
+
:param master_timeout: The period to wait for a connection to the master node.
|
|
1086
|
+
:param timeout: The period to wait for a response.
|
|
1091
1087
|
"""
|
|
1092
1088
|
if name in SKIP_IN_PATH:
|
|
1093
1089
|
raise ValueError("Empty value passed for parameter 'name'")
|
|
@@ -1140,8 +1136,8 @@ class IndicesClient(NamespacedClient):
|
|
|
1140
1136
|
"""
|
|
1141
1137
|
.. raw:: html
|
|
1142
1138
|
|
|
1143
|
-
<p>Delete data streams
|
|
1144
|
-
Deletes one or more data streams and their backing indices.</p>
|
|
1139
|
+
<p>Delete data streams.</p>
|
|
1140
|
+
<p>Deletes one or more data streams and their backing indices.</p>
|
|
1145
1141
|
|
|
1146
1142
|
|
|
1147
1143
|
`<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-delete-data-stream>`_
|
|
@@ -1204,18 +1200,18 @@ class IndicesClient(NamespacedClient):
|
|
|
1204
1200
|
"""
|
|
1205
1201
|
.. raw:: html
|
|
1206
1202
|
|
|
1207
|
-
<p>Delete data stream options
|
|
1208
|
-
Removes the data stream options from a data stream.</p>
|
|
1203
|
+
<p>Delete data stream options.</p>
|
|
1204
|
+
<p>Removes the data stream options from a data stream.</p>
|
|
1209
1205
|
|
|
1210
1206
|
|
|
1211
1207
|
`<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-delete-data-stream-options>`_
|
|
1212
1208
|
|
|
1213
1209
|
:param name: A comma-separated list of data streams of which the data stream
|
|
1214
|
-
options will be deleted
|
|
1210
|
+
options will be deleted. Use `*` to get all data streams
|
|
1215
1211
|
:param expand_wildcards: Whether wildcard expressions should get expanded to
|
|
1216
|
-
open or closed indices
|
|
1217
|
-
:param master_timeout:
|
|
1218
|
-
:param timeout:
|
|
1212
|
+
open or closed indices
|
|
1213
|
+
:param master_timeout: The period to wait for a connection to the master node.
|
|
1214
|
+
:param timeout: The period to wait for a response.
|
|
1219
1215
|
"""
|
|
1220
1216
|
if name in SKIP_IN_PATH:
|
|
1221
1217
|
raise ValueError("Empty value passed for parameter 'name'")
|
|
@@ -1261,8 +1257,8 @@ class IndicesClient(NamespacedClient):
|
|
|
1261
1257
|
"""
|
|
1262
1258
|
.. raw:: html
|
|
1263
1259
|
|
|
1264
|
-
<p>Delete an index template
|
|
1265
|
-
The provided <!-- raw HTML omitted --> may contain multiple template names separated by a comma. If multiple template
|
|
1260
|
+
<p>Delete an index template.</p>
|
|
1261
|
+
<p>The provided <!-- raw HTML omitted --> may contain multiple template names separated by a comma. If multiple template
|
|
1266
1262
|
names are specified then there is no wildcard support and the provided names should match completely with
|
|
1267
1263
|
existing templates.</p>
|
|
1268
1264
|
|
|
@@ -1319,8 +1315,8 @@ class IndicesClient(NamespacedClient):
|
|
|
1319
1315
|
"""
|
|
1320
1316
|
.. raw:: html
|
|
1321
1317
|
|
|
1322
|
-
<p>Delete a legacy index template
|
|
1323
|
-
IMPORTANT: This documentation is about legacy index templates, which are deprecated and will be replaced by the composable templates introduced in Elasticsearch 7.8.</p>
|
|
1318
|
+
<p>Delete a legacy index template.</p>
|
|
1319
|
+
<p>IMPORTANT: This documentation is about legacy index templates, which are deprecated and will be replaced by the composable templates introduced in Elasticsearch 7.8.</p>
|
|
1324
1320
|
|
|
1325
1321
|
|
|
1326
1322
|
`<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-delete-template>`_
|
|
@@ -1361,7 +1357,7 @@ class IndicesClient(NamespacedClient):
|
|
|
1361
1357
|
)
|
|
1362
1358
|
|
|
1363
1359
|
@_rewrite_parameters()
|
|
1364
|
-
@
|
|
1360
|
+
@_availability_warning(Stability.EXPERIMENTAL)
|
|
1365
1361
|
async def disk_usage(
|
|
1366
1362
|
self,
|
|
1367
1363
|
*,
|
|
@@ -1386,8 +1382,8 @@ class IndicesClient(NamespacedClient):
|
|
|
1386
1382
|
"""
|
|
1387
1383
|
.. raw:: html
|
|
1388
1384
|
|
|
1389
|
-
<p>Analyze the index disk usage
|
|
1390
|
-
Analyze the disk usage of each field of an index or data stream.
|
|
1385
|
+
<p>Analyze the index disk usage.</p>
|
|
1386
|
+
<p>Analyze the disk usage of each field of an index or data stream.
|
|
1391
1387
|
This API might not support indices created in previous Elasticsearch versions.
|
|
1392
1388
|
The result of a small index can be inaccurate as some parts of an index might not be analyzed by the API.</p>
|
|
1393
1389
|
<p>NOTE: The total size of fields of the analyzed shards of the index in the response is usually smaller than the index <code>store_size</code> value because some small metadata files are ignored and some parts of data files might not be scanned by the API.
|
|
@@ -1453,7 +1449,7 @@ class IndicesClient(NamespacedClient):
|
|
|
1453
1449
|
@_rewrite_parameters(
|
|
1454
1450
|
body_name="config",
|
|
1455
1451
|
)
|
|
1456
|
-
@
|
|
1452
|
+
@_availability_warning(Stability.EXPERIMENTAL)
|
|
1457
1453
|
async def downsample(
|
|
1458
1454
|
self,
|
|
1459
1455
|
*,
|
|
@@ -1469,8 +1465,8 @@ class IndicesClient(NamespacedClient):
|
|
|
1469
1465
|
"""
|
|
1470
1466
|
.. raw:: html
|
|
1471
1467
|
|
|
1472
|
-
<p>Downsample an index
|
|
1473
|
-
Aggregate a time series (TSDS) index and store pre-computed statistical summaries (<code>min</code>, <code>max</code>, <code>sum</code>, <code>value_count</code> and <code>avg</code>) for each metric field grouped by a configured time interval.
|
|
1468
|
+
<p>Downsample an index.</p>
|
|
1469
|
+
<p>Aggregate a time series (TSDS) index and store pre-computed statistical summaries (<code>min</code>, <code>max</code>, <code>sum</code>, <code>value_count</code> and <code>avg</code>) for each metric field grouped by a configured time interval.
|
|
1474
1470
|
For example, a TSDS index that contains metrics sampled every 10 seconds can be downsampled to an hourly index.
|
|
1475
1471
|
All documents within an hour interval are summarized and stored as a single document in the downsample index.</p>
|
|
1476
1472
|
<p>NOTE: Only indices in a time series data stream are supported.
|
|
@@ -1546,8 +1542,8 @@ class IndicesClient(NamespacedClient):
|
|
|
1546
1542
|
"""
|
|
1547
1543
|
.. raw:: html
|
|
1548
1544
|
|
|
1549
|
-
<p>Check indices
|
|
1550
|
-
Check if one or more indices, index aliases, or data streams exist.</p>
|
|
1545
|
+
<p>Check indices.</p>
|
|
1546
|
+
<p>Check if one or more indices, index aliases, or data streams exist.</p>
|
|
1551
1547
|
|
|
1552
1548
|
|
|
1553
1549
|
`<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-exists>`_
|
|
@@ -1766,8 +1762,8 @@ class IndicesClient(NamespacedClient):
|
|
|
1766
1762
|
"""
|
|
1767
1763
|
.. raw:: html
|
|
1768
1764
|
|
|
1769
|
-
<p>Check existence of index templates
|
|
1770
|
-
Get information about whether index templates exist.
|
|
1765
|
+
<p>Check existence of index templates.</p>
|
|
1766
|
+
<p>Get information about whether index templates exist.
|
|
1771
1767
|
Index templates define settings, mappings, and aliases that can be applied automatically to new indices.</p>
|
|
1772
1768
|
<p>IMPORTANT: This documentation is about legacy index templates, which are deprecated and will be replaced by the composable templates introduced in Elasticsearch 7.8.</p>
|
|
1773
1769
|
|
|
@@ -1826,16 +1822,16 @@ class IndicesClient(NamespacedClient):
|
|
|
1826
1822
|
"""
|
|
1827
1823
|
.. raw:: html
|
|
1828
1824
|
|
|
1829
|
-
<p>Get the status for a data stream lifecycle
|
|
1830
|
-
Get information about an index or data stream's current data stream lifecycle status, such as time since index creation, time since rollover, the lifecycle configuration managing the index, or any errors encountered during lifecycle execution.</p>
|
|
1825
|
+
<p>Get the status for a data stream lifecycle.</p>
|
|
1826
|
+
<p>Get information about an index or data stream's current data stream lifecycle status, such as time since index creation, time since rollover, the lifecycle configuration managing the index, or any errors encountered during lifecycle execution.</p>
|
|
1831
1827
|
|
|
1832
1828
|
|
|
1833
1829
|
`<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-explain-data-lifecycle>`_
|
|
1834
1830
|
|
|
1835
|
-
:param index:
|
|
1836
|
-
:param include_defaults:
|
|
1831
|
+
:param index: Comma-separated list of index names to explain
|
|
1832
|
+
:param include_defaults: Indicates if the API should return the default values
|
|
1837
1833
|
the system uses for the index's lifecycle
|
|
1838
|
-
:param master_timeout:
|
|
1834
|
+
:param master_timeout: The period to wait for a connection to the master node.
|
|
1839
1835
|
"""
|
|
1840
1836
|
if index in SKIP_IN_PATH:
|
|
1841
1837
|
raise ValueError("Empty value passed for parameter 'index'")
|
|
@@ -1865,7 +1861,7 @@ class IndicesClient(NamespacedClient):
|
|
|
1865
1861
|
)
|
|
1866
1862
|
|
|
1867
1863
|
@_rewrite_parameters()
|
|
1868
|
-
@
|
|
1864
|
+
@_availability_warning(Stability.EXPERIMENTAL)
|
|
1869
1865
|
async def field_usage_stats(
|
|
1870
1866
|
self,
|
|
1871
1867
|
*,
|
|
@@ -1889,8 +1885,8 @@ class IndicesClient(NamespacedClient):
|
|
|
1889
1885
|
"""
|
|
1890
1886
|
.. raw:: html
|
|
1891
1887
|
|
|
1892
|
-
<p>Get field usage stats
|
|
1893
|
-
Get field usage information for each shard and field of an index.
|
|
1888
|
+
<p>Get field usage stats.</p>
|
|
1889
|
+
<p>Get field usage information for each shard and field of an index.
|
|
1894
1890
|
Field usage statistics are automatically captured when queries are running on a cluster.
|
|
1895
1891
|
A shard-level search request that accesses a given field, even if multiple times during that request, is counted as a single use.</p>
|
|
1896
1892
|
<p>The response body reports the per-shard usage count of the data structures that back the fields in the index.
|
|
@@ -1971,8 +1967,8 @@ class IndicesClient(NamespacedClient):
|
|
|
1971
1967
|
"""
|
|
1972
1968
|
.. raw:: html
|
|
1973
1969
|
|
|
1974
|
-
<p>Flush data streams or indices
|
|
1975
|
-
Flushing a data stream or index is the process of making sure that any data that is currently only stored in the transaction log is also permanently stored in the Lucene index.
|
|
1970
|
+
<p>Flush data streams or indices.</p>
|
|
1971
|
+
<p>Flushing a data stream or index is the process of making sure that any data that is currently only stored in the transaction log is also permanently stored in the Lucene index.
|
|
1976
1972
|
When restarting, Elasticsearch replays any unflushed operations from the transaction log into the Lucene index to bring it back into the state that it was in before the restart.
|
|
1977
1973
|
Elasticsearch automatically triggers flushes as needed, using heuristics that trade off the size of the unflushed transaction log against the cost of performing each flush.</p>
|
|
1978
1974
|
<p>After each operation has been flushed it is permanently stored in the Lucene index.
|
|
@@ -2065,8 +2061,8 @@ class IndicesClient(NamespacedClient):
|
|
|
2065
2061
|
"""
|
|
2066
2062
|
.. raw:: html
|
|
2067
2063
|
|
|
2068
|
-
<p>Force a merge
|
|
2069
|
-
Perform the force merge operation on the shards of one or more indices.
|
|
2064
|
+
<p>Force a merge.</p>
|
|
2065
|
+
<p>Perform the force merge operation on the shards of one or more indices.
|
|
2070
2066
|
For data streams, the API forces a merge on the shards of the stream's backing indices.</p>
|
|
2071
2067
|
<p>Merging reduces the number of segments in each shard by merging some of them together and also frees up the space used by deleted documents.
|
|
2072
2068
|
Merging normally happens automatically, but sometimes it is useful to trigger a merge manually.</p>
|
|
@@ -2117,15 +2113,15 @@ class IndicesClient(NamespacedClient):
|
|
|
2117
2113
|
:param expand_wildcards: Whether to expand wildcard expression to concrete indices
|
|
2118
2114
|
that are open, closed or both.
|
|
2119
2115
|
:param flush: Specify whether the index should be flushed after performing the
|
|
2120
|
-
operation
|
|
2116
|
+
operation
|
|
2121
2117
|
:param ignore_unavailable: Whether specified concrete indices should be ignored
|
|
2122
2118
|
when unavailable (missing or closed)
|
|
2123
2119
|
:param max_num_segments: The number of segments the index should be merged into
|
|
2124
|
-
(
|
|
2120
|
+
(defayult: dynamic)
|
|
2125
2121
|
:param only_expunge_deletes: Specify whether the operation should only expunge
|
|
2126
2122
|
deleted documents
|
|
2127
2123
|
:param wait_for_completion: Should the request wait until the force merge is
|
|
2128
|
-
completed
|
|
2124
|
+
completed
|
|
2129
2125
|
"""
|
|
2130
2126
|
__path_parts: t.Dict[str, str]
|
|
2131
2127
|
if index not in SKIP_IN_PATH:
|
|
@@ -2200,8 +2196,8 @@ class IndicesClient(NamespacedClient):
|
|
|
2200
2196
|
"""
|
|
2201
2197
|
.. raw:: html
|
|
2202
2198
|
|
|
2203
|
-
<p>Get index information
|
|
2204
|
-
Get information about one or more indices. For data streams, the API returns information about the
|
|
2199
|
+
<p>Get index information.</p>
|
|
2200
|
+
<p>Get information about one or more indices. For data streams, the API returns information about the
|
|
2205
2201
|
stream’s backing indices.</p>
|
|
2206
2202
|
|
|
2207
2203
|
|
|
@@ -2294,8 +2290,8 @@ class IndicesClient(NamespacedClient):
|
|
|
2294
2290
|
"""
|
|
2295
2291
|
.. raw:: html
|
|
2296
2292
|
|
|
2297
|
-
<p>Get aliases
|
|
2298
|
-
Retrieves information for one or more data stream or index aliases.</p>
|
|
2293
|
+
<p>Get aliases.</p>
|
|
2294
|
+
<p>Retrieves information for one or more data stream or index aliases.</p>
|
|
2299
2295
|
|
|
2300
2296
|
|
|
2301
2297
|
`<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-get-alias>`_
|
|
@@ -2438,8 +2434,8 @@ class IndicesClient(NamespacedClient):
|
|
|
2438
2434
|
"""
|
|
2439
2435
|
.. raw:: html
|
|
2440
2436
|
|
|
2441
|
-
<p>Get data stream lifecycle stats
|
|
2442
|
-
Get statistics about the data streams that are managed by a data stream lifecycle.</p>
|
|
2437
|
+
<p>Get data stream lifecycle stats.</p>
|
|
2438
|
+
<p>Get statistics about the data streams that are managed by a data stream lifecycle.</p>
|
|
2443
2439
|
|
|
2444
2440
|
|
|
2445
2441
|
`<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-get-data-lifecycle-stats>`_
|
|
@@ -2682,8 +2678,8 @@ class IndicesClient(NamespacedClient):
|
|
|
2682
2678
|
"""
|
|
2683
2679
|
.. raw:: html
|
|
2684
2680
|
|
|
2685
|
-
<p>Get mapping definitions
|
|
2686
|
-
Retrieves mapping definitions for one or more fields.
|
|
2681
|
+
<p>Get mapping definitions.</p>
|
|
2682
|
+
<p>Retrieves mapping definitions for one or more fields.
|
|
2687
2683
|
For data streams, the API retrieves field mappings for the stream’s backing indices.</p>
|
|
2688
2684
|
<p>This API is useful if you don't need a complete mapping or if an index mapping contains a large number of fields.</p>
|
|
2689
2685
|
|
|
@@ -2761,14 +2757,14 @@ class IndicesClient(NamespacedClient):
|
|
|
2761
2757
|
"""
|
|
2762
2758
|
.. raw:: html
|
|
2763
2759
|
|
|
2764
|
-
<p>Get index templates
|
|
2765
|
-
Get information about one or more index templates.</p>
|
|
2760
|
+
<p>Get index templates.</p>
|
|
2761
|
+
<p>Get information about one or more index templates.</p>
|
|
2766
2762
|
|
|
2767
2763
|
|
|
2768
2764
|
`<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-get-index-template>`_
|
|
2769
2765
|
|
|
2770
|
-
:param name:
|
|
2771
|
-
|
|
2766
|
+
:param name: Name of index template to retrieve. Wildcard (*) expressions are
|
|
2767
|
+
supported.
|
|
2772
2768
|
:param flat_settings: If true, returns settings in flat format.
|
|
2773
2769
|
:param include_defaults: If true, returns all relevant default configurations
|
|
2774
2770
|
for the index template.
|
|
@@ -2838,8 +2834,8 @@ class IndicesClient(NamespacedClient):
|
|
|
2838
2834
|
"""
|
|
2839
2835
|
.. raw:: html
|
|
2840
2836
|
|
|
2841
|
-
<p>Get mapping definitions
|
|
2842
|
-
For data streams, the API retrieves mappings for the stream’s backing indices.</p>
|
|
2837
|
+
<p>Get mapping definitions.</p>
|
|
2838
|
+
<p>For data streams, the API retrieves mappings for the stream’s backing indices.</p>
|
|
2843
2839
|
|
|
2844
2840
|
|
|
2845
2841
|
`<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-get-mapping>`_
|
|
@@ -2899,7 +2895,7 @@ class IndicesClient(NamespacedClient):
|
|
|
2899
2895
|
)
|
|
2900
2896
|
|
|
2901
2897
|
@_rewrite_parameters()
|
|
2902
|
-
@
|
|
2898
|
+
@_availability_warning(Stability.EXPERIMENTAL)
|
|
2903
2899
|
async def get_migrate_reindex_status(
|
|
2904
2900
|
self,
|
|
2905
2901
|
*,
|
|
@@ -2971,8 +2967,8 @@ class IndicesClient(NamespacedClient):
|
|
|
2971
2967
|
"""
|
|
2972
2968
|
.. raw:: html
|
|
2973
2969
|
|
|
2974
|
-
<p>Get index settings
|
|
2975
|
-
Get setting information for one or more indices.
|
|
2970
|
+
<p>Get index settings.</p>
|
|
2971
|
+
<p>Get setting information for one or more indices.
|
|
2976
2972
|
For data streams, it returns setting information for the stream's backing indices.</p>
|
|
2977
2973
|
|
|
2978
2974
|
|
|
@@ -3063,8 +3059,8 @@ class IndicesClient(NamespacedClient):
|
|
|
3063
3059
|
"""
|
|
3064
3060
|
.. raw:: html
|
|
3065
3061
|
|
|
3066
|
-
<p>Get legacy index templates
|
|
3067
|
-
Get information about one or more index templates.</p>
|
|
3062
|
+
<p>Get legacy index templates.</p>
|
|
3063
|
+
<p>Get information about one or more index templates.</p>
|
|
3068
3064
|
<p>IMPORTANT: This documentation is about legacy index templates, which are deprecated and will be replaced by the composable templates introduced in Elasticsearch 7.8.</p>
|
|
3069
3065
|
|
|
3070
3066
|
|
|
@@ -3115,7 +3111,7 @@ class IndicesClient(NamespacedClient):
|
|
|
3115
3111
|
@_rewrite_parameters(
|
|
3116
3112
|
body_name="reindex",
|
|
3117
3113
|
)
|
|
3118
|
-
@
|
|
3114
|
+
@_availability_warning(Stability.EXPERIMENTAL)
|
|
3119
3115
|
async def migrate_reindex(
|
|
3120
3116
|
self,
|
|
3121
3117
|
*,
|
|
@@ -3183,8 +3179,8 @@ class IndicesClient(NamespacedClient):
|
|
|
3183
3179
|
"""
|
|
3184
3180
|
.. raw:: html
|
|
3185
3181
|
|
|
3186
|
-
<p>Convert an index alias to a data stream
|
|
3187
|
-
Converts an index alias to a data stream.
|
|
3182
|
+
<p>Convert an index alias to a data stream.</p>
|
|
3183
|
+
<p>Converts an index alias to a data stream.
|
|
3188
3184
|
You must have a matching index template that is data stream enabled.
|
|
3189
3185
|
The alias must meet the following criteria:
|
|
3190
3186
|
The alias must have a write index;
|
|
@@ -3248,8 +3244,8 @@ class IndicesClient(NamespacedClient):
|
|
|
3248
3244
|
"""
|
|
3249
3245
|
.. raw:: html
|
|
3250
3246
|
|
|
3251
|
-
<p>Update data streams
|
|
3252
|
-
Performs one or more data stream modification actions in a single atomic operation.</p>
|
|
3247
|
+
<p>Update data streams.</p>
|
|
3248
|
+
<p>Performs one or more data stream modification actions in a single atomic operation.</p>
|
|
3253
3249
|
|
|
3254
3250
|
|
|
3255
3251
|
`<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-modify-data-stream>`_
|
|
@@ -3312,8 +3308,8 @@ class IndicesClient(NamespacedClient):
|
|
|
3312
3308
|
"""
|
|
3313
3309
|
.. raw:: html
|
|
3314
3310
|
|
|
3315
|
-
<p>Open a closed index
|
|
3316
|
-
For data streams, the API opens any closed backing indices.</p>
|
|
3311
|
+
<p>Open a closed index.</p>
|
|
3312
|
+
<p>For data streams, the API opens any closed backing indices.</p>
|
|
3317
3313
|
<p>A closed index is blocked for read/write operations and does not allow all operations that opened indices allow.
|
|
3318
3314
|
It is not possible to index documents or to search for documents in a closed index.
|
|
3319
3315
|
This allows closed indices to not have to maintain internal data structures for indexing or searching documents, resulting in a smaller overhead on the cluster.</p>
|
|
@@ -3406,8 +3402,8 @@ class IndicesClient(NamespacedClient):
|
|
|
3406
3402
|
"""
|
|
3407
3403
|
.. raw:: html
|
|
3408
3404
|
|
|
3409
|
-
<p>Promote a data stream
|
|
3410
|
-
Promote a data stream from a replicated data stream managed by cross-cluster replication (CCR) to a regular data stream.</p>
|
|
3405
|
+
<p>Promote a data stream.</p>
|
|
3406
|
+
<p>Promote a data stream from a replicated data stream managed by cross-cluster replication (CCR) to a regular data stream.</p>
|
|
3411
3407
|
<p>With CCR auto following, a data stream from a remote cluster can be replicated to the local cluster.
|
|
3412
3408
|
These data streams can't be rolled over in the local cluster.
|
|
3413
3409
|
These replicated data streams roll over only if the upstream data stream rolls over.
|
|
@@ -3419,7 +3415,7 @@ class IndicesClient(NamespacedClient):
|
|
|
3419
3415
|
|
|
3420
3416
|
`<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-promote-data-stream>`_
|
|
3421
3417
|
|
|
3422
|
-
:param name: The name of the data stream
|
|
3418
|
+
:param name: The name of the data stream to promote
|
|
3423
3419
|
:param master_timeout: Period to wait for a connection to the master node. If
|
|
3424
3420
|
no response is received before the timeout expires, the request fails and
|
|
3425
3421
|
returns an error.
|
|
@@ -3479,8 +3475,8 @@ class IndicesClient(NamespacedClient):
|
|
|
3479
3475
|
"""
|
|
3480
3476
|
.. raw:: html
|
|
3481
3477
|
|
|
3482
|
-
<p>Create or update an alias
|
|
3483
|
-
Adds a data stream or index to an alias.</p>
|
|
3478
|
+
<p>Create or update an alias.</p>
|
|
3479
|
+
<p>Adds a data stream or index to an alias.</p>
|
|
3484
3480
|
|
|
3485
3481
|
|
|
3486
3482
|
`<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-put-alias>`_
|
|
@@ -3565,7 +3561,7 @@ class IndicesClient(NamespacedClient):
|
|
|
3565
3561
|
*,
|
|
3566
3562
|
name: t.Union[str, t.Sequence[str]],
|
|
3567
3563
|
data_retention: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
|
|
3568
|
-
downsampling: t.Optional[t.Mapping[str, t.Any]] = None,
|
|
3564
|
+
downsampling: t.Optional[t.Sequence[t.Mapping[str, t.Any]]] = None,
|
|
3569
3565
|
enabled: t.Optional[bool] = None,
|
|
3570
3566
|
error_trace: t.Optional[bool] = None,
|
|
3571
3567
|
expand_wildcards: t.Optional[
|
|
@@ -3586,8 +3582,8 @@ class IndicesClient(NamespacedClient):
|
|
|
3586
3582
|
"""
|
|
3587
3583
|
.. raw:: html
|
|
3588
3584
|
|
|
3589
|
-
<p>Update data stream lifecycles
|
|
3590
|
-
Update the data stream lifecycle of the specified data streams.</p>
|
|
3585
|
+
<p>Update data stream lifecycles.</p>
|
|
3586
|
+
<p>Update the data stream lifecycle of the specified data streams.</p>
|
|
3591
3587
|
|
|
3592
3588
|
|
|
3593
3589
|
`<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-put-data-lifecycle>`_
|
|
@@ -3638,11 +3634,7 @@ class IndicesClient(NamespacedClient):
|
|
|
3638
3634
|
__body["downsampling"] = downsampling
|
|
3639
3635
|
if enabled is not None:
|
|
3640
3636
|
__body["enabled"] = enabled
|
|
3641
|
-
|
|
3642
|
-
__body = None # type: ignore[assignment]
|
|
3643
|
-
__headers = {"accept": "application/json"}
|
|
3644
|
-
if __body is not None:
|
|
3645
|
-
__headers["content-type"] = "application/json"
|
|
3637
|
+
__headers = {"accept": "application/json", "content-type": "application/json"}
|
|
3646
3638
|
return await self.perform_request( # type: ignore[return-value]
|
|
3647
3639
|
"PUT",
|
|
3648
3640
|
__path,
|
|
@@ -3680,8 +3672,8 @@ class IndicesClient(NamespacedClient):
|
|
|
3680
3672
|
"""
|
|
3681
3673
|
.. raw:: html
|
|
3682
3674
|
|
|
3683
|
-
<p>Update data stream options
|
|
3684
|
-
Update the data stream options of the specified data streams.</p>
|
|
3675
|
+
<p>Update data stream options.</p>
|
|
3676
|
+
<p>Update the data stream options of the specified data streams.</p>
|
|
3685
3677
|
|
|
3686
3678
|
|
|
3687
3679
|
`<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-put-data-stream-options>`_
|
|
@@ -3721,11 +3713,7 @@ class IndicesClient(NamespacedClient):
|
|
|
3721
3713
|
if not __body:
|
|
3722
3714
|
if failure_store is not None:
|
|
3723
3715
|
__body["failure_store"] = failure_store
|
|
3724
|
-
|
|
3725
|
-
__body = None # type: ignore[assignment]
|
|
3726
|
-
__headers = {"accept": "application/json"}
|
|
3727
|
-
if __body is not None:
|
|
3728
|
-
__headers["content-type"] = "application/json"
|
|
3716
|
+
__headers = {"accept": "application/json", "content-type": "application/json"}
|
|
3729
3717
|
return await self.perform_request( # type: ignore[return-value]
|
|
3730
3718
|
"PUT",
|
|
3731
3719
|
__path,
|
|
@@ -3855,8 +3843,8 @@ class IndicesClient(NamespacedClient):
|
|
|
3855
3843
|
"""
|
|
3856
3844
|
.. raw:: html
|
|
3857
3845
|
|
|
3858
|
-
<p>Create or update an index template
|
|
3859
|
-
Index templates define settings, mappings, and aliases that can be applied automatically to new indices.</p>
|
|
3846
|
+
<p>Create or update an index template.</p>
|
|
3847
|
+
<p>Index templates define settings, mappings, and aliases that can be applied automatically to new indices.</p>
|
|
3860
3848
|
<p>Elasticsearch applies templates to new indices based on an wildcard pattern that matches the index name.
|
|
3861
3849
|
Index templates are applied during data stream or index creation.
|
|
3862
3850
|
For data streams, these settings and mappings are applied when the stream's backing indices are created.
|
|
@@ -3887,7 +3875,7 @@ class IndicesClient(NamespacedClient):
|
|
|
3887
3875
|
via `actions.auto_create_index`. If set to `false`, then indices or data
|
|
3888
3876
|
streams matching the template must always be explicitly created, and may
|
|
3889
3877
|
never be automatically created.
|
|
3890
|
-
:param cause: User defined reason for creating
|
|
3878
|
+
:param cause: User defined reason for creating or updating the index template
|
|
3891
3879
|
:param composed_of: An ordered list of component template names. Component templates
|
|
3892
3880
|
are merged in the order specified, meaning that the last component template
|
|
3893
3881
|
specified has the highest precedence.
|
|
@@ -4039,8 +4027,8 @@ class IndicesClient(NamespacedClient):
|
|
|
4039
4027
|
"""
|
|
4040
4028
|
.. raw:: html
|
|
4041
4029
|
|
|
4042
|
-
<p>Update field mappings
|
|
4043
|
-
Add new fields to an existing data stream or index.
|
|
4030
|
+
<p>Update field mappings.</p>
|
|
4031
|
+
<p>Add new fields to an existing data stream or index.
|
|
4044
4032
|
You can use the update mapping API to:</p>
|
|
4045
4033
|
<ul>
|
|
4046
4034
|
<li>Add a new field to an existing index</li>
|
|
@@ -4057,7 +4045,7 @@ class IndicesClient(NamespacedClient):
|
|
|
4057
4045
|
`<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-put-mapping>`_
|
|
4058
4046
|
|
|
4059
4047
|
:param index: A comma-separated list of index names the mapping should be added
|
|
4060
|
-
to (supports wildcards)
|
|
4048
|
+
to (supports wildcards). Use `_all` or omit to add the mapping on all indices.
|
|
4061
4049
|
:param allow_no_indices: If `false`, the request returns an error if any wildcard
|
|
4062
4050
|
expression, index alias, or `_all` value targets only missing or closed indices.
|
|
4063
4051
|
This behavior applies even if the request targets other open indices.
|
|
@@ -4184,8 +4172,8 @@ class IndicesClient(NamespacedClient):
|
|
|
4184
4172
|
"""
|
|
4185
4173
|
.. raw:: html
|
|
4186
4174
|
|
|
4187
|
-
<p>Update index settings
|
|
4188
|
-
Changes dynamic index settings in real time.
|
|
4175
|
+
<p>Update index settings.</p>
|
|
4176
|
+
<p>Changes dynamic index settings in real time.
|
|
4189
4177
|
For data streams, index setting changes are applied to all backing indices by default.</p>
|
|
4190
4178
|
<p>To revert a setting to the default value, use a null value.
|
|
4191
4179
|
The list of per-index settings that can be updated dynamically on live indices can be found in index settings documentation.
|
|
@@ -4338,8 +4326,8 @@ class IndicesClient(NamespacedClient):
|
|
|
4338
4326
|
"""
|
|
4339
4327
|
.. raw:: html
|
|
4340
4328
|
|
|
4341
|
-
<p>Create or update a legacy index template
|
|
4342
|
-
Index templates define settings, mappings, and aliases that can be applied automatically to new indices.
|
|
4329
|
+
<p>Create or update a legacy index template.</p>
|
|
4330
|
+
<p>Index templates define settings, mappings, and aliases that can be applied automatically to new indices.
|
|
4343
4331
|
Elasticsearch applies templates to new indices based on an index pattern that matches the index name.</p>
|
|
4344
4332
|
<p>IMPORTANT: This documentation is about legacy index templates, which are deprecated and will be replaced by the composable templates introduced in Elasticsearch 7.8.</p>
|
|
4345
4333
|
<p>Composable templates always take precedence over legacy templates.
|
|
@@ -4359,7 +4347,7 @@ class IndicesClient(NamespacedClient):
|
|
|
4359
4347
|
|
|
4360
4348
|
:param name: The name of the template
|
|
4361
4349
|
:param aliases: Aliases for the index.
|
|
4362
|
-
:param cause: User defined reason for creating
|
|
4350
|
+
:param cause: User defined reason for creating or updating the index template
|
|
4363
4351
|
:param create: If true, this request cannot replace or update existing index
|
|
4364
4352
|
templates.
|
|
4365
4353
|
:param index_patterns: Array of wildcard expressions used to match the names
|
|
@@ -4446,8 +4434,8 @@ class IndicesClient(NamespacedClient):
|
|
|
4446
4434
|
"""
|
|
4447
4435
|
.. raw:: html
|
|
4448
4436
|
|
|
4449
|
-
<p>Get index recovery information
|
|
4450
|
-
Get information about ongoing and completed shard recoveries for one or more indices.
|
|
4437
|
+
<p>Get index recovery information.</p>
|
|
4438
|
+
<p>Get information about ongoing and completed shard recoveries for one or more indices.
|
|
4451
4439
|
For data streams, the API returns information for the stream's backing indices.</p>
|
|
4452
4440
|
<p>All recoveries, whether ongoing or complete, are kept in the cluster state and may be reported on at any time.</p>
|
|
4453
4441
|
<p>Shard recovery is the process of initializing a shard copy, such as restoring a primary shard from a snapshot or creating a replica shard from a primary shard.
|
|
@@ -4544,8 +4532,8 @@ class IndicesClient(NamespacedClient):
|
|
|
4544
4532
|
"""
|
|
4545
4533
|
.. raw:: html
|
|
4546
4534
|
|
|
4547
|
-
<p>Refresh an index
|
|
4548
|
-
A refresh makes recent operations performed on one or more indices available for search.
|
|
4535
|
+
<p>Refresh an index.</p>
|
|
4536
|
+
<p>A refresh makes recent operations performed on one or more indices available for search.
|
|
4549
4537
|
For data streams, the API runs the refresh operation on the stream’s backing indices.</p>
|
|
4550
4538
|
<p>By default, Elasticsearch periodically refreshes indices every second, but only on indices that have received one search request or more in the last 30 seconds.
|
|
4551
4539
|
You can change this default interval with the <code>index.refresh_interval</code> setting.</p>
|
|
@@ -4628,8 +4616,8 @@ class IndicesClient(NamespacedClient):
|
|
|
4628
4616
|
"""
|
|
4629
4617
|
.. raw:: html
|
|
4630
4618
|
|
|
4631
|
-
<p>Reload search analyzers
|
|
4632
|
-
Reload an index's search analyzers and their resources.
|
|
4619
|
+
<p>Reload search analyzers.</p>
|
|
4620
|
+
<p>Reload an index's search analyzers and their resources.
|
|
4633
4621
|
For data streams, the API reloads search analyzers and resources for the stream's backing indices.</p>
|
|
4634
4622
|
<p>IMPORTANT: After reloading the search analyzers you should clear the request cache to make sure it doesn't contain responses derived from the previous versions of the analyzer.</p>
|
|
4635
4623
|
<p>You can use the reload search analyzers API to pick up changes to synonym files used in the <code>synonym_graph</code> or <code>synonym</code> token filter of a search analyzer.
|
|
@@ -4943,8 +4931,8 @@ class IndicesClient(NamespacedClient):
|
|
|
4943
4931
|
"""
|
|
4944
4932
|
.. raw:: html
|
|
4945
4933
|
|
|
4946
|
-
<p>Resolve indices
|
|
4947
|
-
Resolve the names and/or index patterns for indices, aliases, and data streams.
|
|
4934
|
+
<p>Resolve indices.</p>
|
|
4935
|
+
<p>Resolve the names and/or index patterns for indices, aliases, and data streams.
|
|
4948
4936
|
Multiple patterns and remote clusters are supported.</p>
|
|
4949
4937
|
|
|
4950
4938
|
|
|
@@ -5022,8 +5010,8 @@ class IndicesClient(NamespacedClient):
|
|
|
5022
5010
|
"""
|
|
5023
5011
|
.. raw:: html
|
|
5024
5012
|
|
|
5025
|
-
<p>Roll over to a new index
|
|
5026
|
-
TIP: It is recommended to use the index lifecycle rollover action to automate rollovers.</p>
|
|
5013
|
+
<p>Roll over to a new index.</p>
|
|
5014
|
+
<p>TIP: It is recommended to use the index lifecycle rollover action to automate rollovers.</p>
|
|
5027
5015
|
<p>The rollover API creates a new index for a data stream or index alias.
|
|
5028
5016
|
The API behavior depends on the rollover target.</p>
|
|
5029
5017
|
<p><strong>Roll over a data stream</strong></p>
|
|
@@ -5159,8 +5147,8 @@ class IndicesClient(NamespacedClient):
|
|
|
5159
5147
|
"""
|
|
5160
5148
|
.. raw:: html
|
|
5161
5149
|
|
|
5162
|
-
<p>Get index segments
|
|
5163
|
-
Get low-level information about the Lucene segments in index shards.
|
|
5150
|
+
<p>Get index segments.</p>
|
|
5151
|
+
<p>Get low-level information about the Lucene segments in index shards.
|
|
5164
5152
|
For data streams, the API returns information about the stream's backing indices.</p>
|
|
5165
5153
|
|
|
5166
5154
|
|
|
@@ -5240,8 +5228,8 @@ class IndicesClient(NamespacedClient):
|
|
|
5240
5228
|
"""
|
|
5241
5229
|
.. raw:: html
|
|
5242
5230
|
|
|
5243
|
-
<p>Get index shard stores
|
|
5244
|
-
Get store information about replica shards in one or more indices.
|
|
5231
|
+
<p>Get index shard stores.</p>
|
|
5232
|
+
<p>Get store information about replica shards in one or more indices.
|
|
5245
5233
|
For data streams, the API retrieves store information for the stream's backing indices.</p>
|
|
5246
5234
|
<p>The index shard stores API returns the following information:</p>
|
|
5247
5235
|
<ul>
|
|
@@ -5324,8 +5312,8 @@ class IndicesClient(NamespacedClient):
|
|
|
5324
5312
|
"""
|
|
5325
5313
|
.. raw:: html
|
|
5326
5314
|
|
|
5327
|
-
<p>Shrink an index
|
|
5328
|
-
Shrink an index into a new index with fewer primary shards.</p>
|
|
5315
|
+
<p>Shrink an index.</p>
|
|
5316
|
+
<p>Shrink an index into a new index with fewer primary shards.</p>
|
|
5329
5317
|
<p>Before you can shrink an index:</p>
|
|
5330
5318
|
<ul>
|
|
5331
5319
|
<li>The index must be read-only.</li>
|
|
@@ -5400,11 +5388,7 @@ class IndicesClient(NamespacedClient):
|
|
|
5400
5388
|
__body["aliases"] = aliases
|
|
5401
5389
|
if settings is not None:
|
|
5402
5390
|
__body["settings"] = settings
|
|
5403
|
-
|
|
5404
|
-
__body = None # type: ignore[assignment]
|
|
5405
|
-
__headers = {"accept": "application/json"}
|
|
5406
|
-
if __body is not None:
|
|
5407
|
-
__headers["content-type"] = "application/json"
|
|
5391
|
+
__headers = {"accept": "application/json", "content-type": "application/json"}
|
|
5408
5392
|
return await self.perform_request( # type: ignore[return-value]
|
|
5409
5393
|
"PUT",
|
|
5410
5394
|
__path,
|
|
@@ -5436,8 +5420,8 @@ class IndicesClient(NamespacedClient):
|
|
|
5436
5420
|
"""
|
|
5437
5421
|
.. raw:: html
|
|
5438
5422
|
|
|
5439
|
-
<p>Simulate an index
|
|
5440
|
-
Get the index configuration that would be applied to the specified index from an existing index template.</p>
|
|
5423
|
+
<p>Simulate an index.</p>
|
|
5424
|
+
<p>Get the index configuration that would be applied to the specified index from an existing index template.</p>
|
|
5441
5425
|
|
|
5442
5426
|
|
|
5443
5427
|
`<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-simulate-index-template>`_
|
|
@@ -5535,8 +5519,8 @@ class IndicesClient(NamespacedClient):
|
|
|
5535
5519
|
"""
|
|
5536
5520
|
.. raw:: html
|
|
5537
5521
|
|
|
5538
|
-
<p>Simulate an index template
|
|
5539
|
-
Get the index configuration that would be applied by a particular index template.</p>
|
|
5522
|
+
<p>Simulate an index template.</p>
|
|
5523
|
+
<p>Get the index configuration that would be applied by a particular index template.</p>
|
|
5540
5524
|
|
|
5541
5525
|
|
|
5542
5526
|
`<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-simulate-template>`_
|
|
@@ -5674,8 +5658,8 @@ class IndicesClient(NamespacedClient):
|
|
|
5674
5658
|
"""
|
|
5675
5659
|
.. raw:: html
|
|
5676
5660
|
|
|
5677
|
-
<p>Split an index
|
|
5678
|
-
Split an index into a new index with more primary shards.</p>
|
|
5661
|
+
<p>Split an index.</p>
|
|
5662
|
+
<p>Split an index into a new index with more primary shards.</p>
|
|
5679
5663
|
<ul>
|
|
5680
5664
|
<li>
|
|
5681
5665
|
<p>Before you can split an index:</p>
|
|
@@ -5756,11 +5740,7 @@ class IndicesClient(NamespacedClient):
|
|
|
5756
5740
|
__body["aliases"] = aliases
|
|
5757
5741
|
if settings is not None:
|
|
5758
5742
|
__body["settings"] = settings
|
|
5759
|
-
|
|
5760
|
-
__body = None # type: ignore[assignment]
|
|
5761
|
-
__headers = {"accept": "application/json"}
|
|
5762
|
-
if __body is not None:
|
|
5763
|
-
__headers["content-type"] = "application/json"
|
|
5743
|
+
__headers = {"accept": "application/json", "content-type": "application/json"}
|
|
5764
5744
|
return await self.perform_request( # type: ignore[return-value]
|
|
5765
5745
|
"PUT",
|
|
5766
5746
|
__path,
|
|
@@ -5803,8 +5783,8 @@ class IndicesClient(NamespacedClient):
|
|
|
5803
5783
|
"""
|
|
5804
5784
|
.. raw:: html
|
|
5805
5785
|
|
|
5806
|
-
<p>Get index statistics
|
|
5807
|
-
For data streams, the API retrieves statistics for the stream's backing indices.</p>
|
|
5786
|
+
<p>Get index statistics.</p>
|
|
5787
|
+
<p>For data streams, the API retrieves statistics for the stream's backing indices.</p>
|
|
5808
5788
|
<p>By default, the returned statistics are index-level with <code>primaries</code> and <code>total</code> aggregations.
|
|
5809
5789
|
<code>primaries</code> are the values for only the primary shards.
|
|
5810
5790
|
<code>total</code> are the accumulated values for both primary and replica shards.</p>
|
|
@@ -5817,7 +5797,7 @@ class IndicesClient(NamespacedClient):
|
|
|
5817
5797
|
|
|
5818
5798
|
:param index: A comma-separated list of index names; use `_all` or empty string
|
|
5819
5799
|
to perform the operation on all indices
|
|
5820
|
-
:param metric: Limit the information returned the specific metrics
|
|
5800
|
+
:param metric: Limit the information returned the specific metrics
|
|
5821
5801
|
:param completion_fields: Comma-separated list or wildcard expressions of fields
|
|
5822
5802
|
to include in fielddata and suggest statistics.
|
|
5823
5803
|
:param expand_wildcards: Type of index that wildcard patterns can match. If the
|
|
@@ -5908,8 +5888,8 @@ class IndicesClient(NamespacedClient):
|
|
|
5908
5888
|
"""
|
|
5909
5889
|
.. raw:: html
|
|
5910
5890
|
|
|
5911
|
-
<p>Create or update an alias
|
|
5912
|
-
Adds a data stream or index to an alias.</p>
|
|
5891
|
+
<p>Create or update an alias.</p>
|
|
5892
|
+
<p>Adds a data stream or index to an alias.</p>
|
|
5913
5893
|
|
|
5914
5894
|
|
|
5915
5895
|
`<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-update-aliases>`_
|
|
@@ -5987,8 +5967,8 @@ class IndicesClient(NamespacedClient):
|
|
|
5987
5967
|
"""
|
|
5988
5968
|
.. raw:: html
|
|
5989
5969
|
|
|
5990
|
-
<p>Validate a query
|
|
5991
|
-
Validates a query without running it.</p>
|
|
5970
|
+
<p>Validate a query.</p>
|
|
5971
|
+
<p>Validates a query without running it.</p>
|
|
5992
5972
|
|
|
5993
5973
|
|
|
5994
5974
|
`<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-validate-query>`_
|