elasticsearch 8.17.2__py3-none-any.whl → 8.18.1__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 +174 -79
- elasticsearch/_async/client/_base.py +0 -1
- elasticsearch/_async/client/async_search.py +12 -8
- elasticsearch/_async/client/autoscaling.py +4 -4
- elasticsearch/_async/client/cat.py +26 -26
- elasticsearch/_async/client/ccr.py +186 -72
- elasticsearch/_async/client/cluster.py +38 -19
- elasticsearch/_async/client/connector.py +30 -30
- elasticsearch/_async/client/dangling_indices.py +3 -3
- elasticsearch/_async/client/enrich.py +26 -5
- elasticsearch/_async/client/eql.py +32 -4
- elasticsearch/_async/client/esql.py +62 -6
- elasticsearch/_async/client/features.py +12 -2
- elasticsearch/_async/client/fleet.py +8 -2
- elasticsearch/_async/client/graph.py +1 -1
- elasticsearch/_async/client/ilm.py +23 -22
- elasticsearch/_async/client/indices.py +424 -132
- elasticsearch/_async/client/inference.py +1906 -61
- elasticsearch/_async/client/ingest.py +32 -38
- elasticsearch/_async/client/license.py +51 -16
- elasticsearch/_async/client/logstash.py +3 -3
- elasticsearch/_async/client/migration.py +3 -3
- elasticsearch/_async/client/ml.py +144 -115
- elasticsearch/_async/client/monitoring.py +1 -1
- elasticsearch/_async/client/nodes.py +9 -27
- elasticsearch/_async/client/query_rules.py +8 -8
- elasticsearch/_async/client/rollup.py +8 -8
- elasticsearch/_async/client/search_application.py +13 -13
- elasticsearch/_async/client/searchable_snapshots.py +4 -4
- elasticsearch/_async/client/security.py +71 -71
- elasticsearch/_async/client/shutdown.py +3 -10
- elasticsearch/_async/client/simulate.py +6 -6
- elasticsearch/_async/client/slm.py +9 -9
- elasticsearch/_async/client/snapshot.py +13 -17
- elasticsearch/_async/client/sql.py +6 -6
- elasticsearch/_async/client/ssl.py +1 -1
- elasticsearch/_async/client/synonyms.py +7 -7
- elasticsearch/_async/client/tasks.py +3 -9
- elasticsearch/_async/client/text_structure.py +4 -4
- elasticsearch/_async/client/transform.py +30 -28
- elasticsearch/_async/client/watcher.py +22 -14
- elasticsearch/_async/client/xpack.py +2 -2
- elasticsearch/_async/helpers.py +0 -1
- elasticsearch/_sync/client/__init__.py +174 -79
- elasticsearch/_sync/client/_base.py +0 -1
- elasticsearch/_sync/client/async_search.py +12 -8
- elasticsearch/_sync/client/autoscaling.py +4 -4
- elasticsearch/_sync/client/cat.py +26 -26
- elasticsearch/_sync/client/ccr.py +186 -72
- elasticsearch/_sync/client/cluster.py +38 -19
- elasticsearch/_sync/client/connector.py +30 -30
- elasticsearch/_sync/client/dangling_indices.py +3 -3
- elasticsearch/_sync/client/enrich.py +26 -5
- elasticsearch/_sync/client/eql.py +32 -4
- elasticsearch/_sync/client/esql.py +62 -6
- elasticsearch/_sync/client/features.py +12 -2
- elasticsearch/_sync/client/fleet.py +8 -2
- elasticsearch/_sync/client/graph.py +1 -1
- elasticsearch/_sync/client/ilm.py +23 -22
- elasticsearch/_sync/client/indices.py +424 -132
- elasticsearch/_sync/client/inference.py +1906 -61
- elasticsearch/_sync/client/ingest.py +32 -38
- elasticsearch/_sync/client/license.py +51 -16
- elasticsearch/_sync/client/logstash.py +3 -3
- elasticsearch/_sync/client/migration.py +3 -3
- elasticsearch/_sync/client/ml.py +144 -115
- elasticsearch/_sync/client/monitoring.py +1 -1
- elasticsearch/_sync/client/nodes.py +9 -27
- elasticsearch/_sync/client/query_rules.py +8 -8
- elasticsearch/_sync/client/rollup.py +8 -8
- elasticsearch/_sync/client/search_application.py +13 -13
- elasticsearch/_sync/client/searchable_snapshots.py +4 -4
- elasticsearch/_sync/client/security.py +71 -71
- elasticsearch/_sync/client/shutdown.py +3 -10
- elasticsearch/_sync/client/simulate.py +6 -6
- elasticsearch/_sync/client/slm.py +9 -9
- elasticsearch/_sync/client/snapshot.py +13 -17
- elasticsearch/_sync/client/sql.py +6 -6
- elasticsearch/_sync/client/ssl.py +1 -1
- elasticsearch/_sync/client/synonyms.py +7 -7
- elasticsearch/_sync/client/tasks.py +3 -9
- elasticsearch/_sync/client/text_structure.py +4 -4
- elasticsearch/_sync/client/transform.py +30 -28
- elasticsearch/_sync/client/utils.py +0 -3
- elasticsearch/_sync/client/watcher.py +22 -14
- elasticsearch/_sync/client/xpack.py +2 -2
- elasticsearch/_version.py +1 -1
- elasticsearch/dsl/__init__.py +203 -0
- elasticsearch/dsl/_async/__init__.py +16 -0
- elasticsearch/dsl/_async/document.py +522 -0
- elasticsearch/dsl/_async/faceted_search.py +50 -0
- elasticsearch/dsl/_async/index.py +639 -0
- elasticsearch/dsl/_async/mapping.py +49 -0
- elasticsearch/dsl/_async/search.py +233 -0
- elasticsearch/dsl/_async/update_by_query.py +47 -0
- elasticsearch/dsl/_sync/__init__.py +16 -0
- elasticsearch/dsl/_sync/document.py +514 -0
- elasticsearch/dsl/_sync/faceted_search.py +50 -0
- elasticsearch/dsl/_sync/index.py +597 -0
- elasticsearch/dsl/_sync/mapping.py +49 -0
- elasticsearch/dsl/_sync/search.py +226 -0
- elasticsearch/dsl/_sync/update_by_query.py +45 -0
- elasticsearch/dsl/aggs.py +3730 -0
- elasticsearch/dsl/analysis.py +341 -0
- elasticsearch/dsl/async_connections.py +37 -0
- elasticsearch/dsl/connections.py +142 -0
- elasticsearch/dsl/document.py +20 -0
- elasticsearch/dsl/document_base.py +444 -0
- elasticsearch/dsl/exceptions.py +32 -0
- elasticsearch/dsl/faceted_search.py +28 -0
- elasticsearch/dsl/faceted_search_base.py +489 -0
- elasticsearch/dsl/field.py +4392 -0
- elasticsearch/dsl/function.py +180 -0
- elasticsearch/dsl/index.py +23 -0
- elasticsearch/dsl/index_base.py +178 -0
- elasticsearch/dsl/mapping.py +19 -0
- elasticsearch/dsl/mapping_base.py +219 -0
- elasticsearch/dsl/query.py +2822 -0
- elasticsearch/dsl/response/__init__.py +388 -0
- elasticsearch/dsl/response/aggs.py +100 -0
- elasticsearch/dsl/response/hit.py +53 -0
- elasticsearch/dsl/search.py +20 -0
- elasticsearch/dsl/search_base.py +1040 -0
- elasticsearch/dsl/serializer.py +34 -0
- elasticsearch/dsl/types.py +6509 -0
- elasticsearch/dsl/update_by_query.py +19 -0
- elasticsearch/dsl/update_by_query_base.py +149 -0
- elasticsearch/dsl/utils.py +687 -0
- elasticsearch/dsl/wrappers.py +119 -0
- {elasticsearch-8.17.2.dist-info → elasticsearch-8.18.1.dist-info}/METADATA +14 -2
- elasticsearch-8.18.1.dist-info/RECORD +163 -0
- elasticsearch-8.18.1.dist-info/licenses/LICENSE.txt +175 -0
- elasticsearch-8.18.1.dist-info/licenses/NOTICE.txt +559 -0
- elasticsearch-8.17.2.dist-info/RECORD +0 -119
- {elasticsearch-8.17.2.dist-info → elasticsearch-8.18.1.dist-info}/WHEEL +0 -0
- {elasticsearch-8.17.2.dist-info → elasticsearch-8.18.1.dist-info}/licenses/LICENSE +0 -0
- {elasticsearch-8.17.2.dist-info → elasticsearch-8.18.1.dist-info}/licenses/NOTICE +0 -0
|
@@ -628,6 +628,7 @@ class AsyncElasticsearch(BaseClient):
|
|
|
628
628
|
error_trace: t.Optional[bool] = None,
|
|
629
629
|
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
630
630
|
human: t.Optional[bool] = None,
|
|
631
|
+
include_source_on_error: t.Optional[bool] = None,
|
|
631
632
|
list_executed_pipelines: t.Optional[bool] = None,
|
|
632
633
|
pipeline: t.Optional[str] = None,
|
|
633
634
|
pretty: t.Optional[bool] = None,
|
|
@@ -730,11 +731,13 @@ class AsyncElasticsearch(BaseClient):
|
|
|
730
731
|
The other two shards that make up the index do not participate in the <code>_bulk</code> request at all.</p>
|
|
731
732
|
|
|
732
733
|
|
|
733
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
734
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/docs-bulk.html>`_
|
|
734
735
|
|
|
735
736
|
:param operations:
|
|
736
737
|
:param index: The name of the data stream, index, or index alias to perform bulk
|
|
737
738
|
actions on.
|
|
739
|
+
:param include_source_on_error: True or false if to include the document source
|
|
740
|
+
in the error message in case of parsing errors.
|
|
738
741
|
:param list_executed_pipelines: If `true`, the response will include the ingest
|
|
739
742
|
pipelines that were run for each index or create.
|
|
740
743
|
:param pipeline: The pipeline identifier to use to preprocess incoming documents.
|
|
@@ -792,6 +795,8 @@ class AsyncElasticsearch(BaseClient):
|
|
|
792
795
|
__query["filter_path"] = filter_path
|
|
793
796
|
if human is not None:
|
|
794
797
|
__query["human"] = human
|
|
798
|
+
if include_source_on_error is not None:
|
|
799
|
+
__query["include_source_on_error"] = include_source_on_error
|
|
795
800
|
if list_executed_pipelines is not None:
|
|
796
801
|
__query["list_executed_pipelines"] = list_executed_pipelines
|
|
797
802
|
if pipeline is not None:
|
|
@@ -851,7 +856,7 @@ class AsyncElasticsearch(BaseClient):
|
|
|
851
856
|
Clear the search context and results for a scrolling search.</p>
|
|
852
857
|
|
|
853
858
|
|
|
854
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
859
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/clear-scroll-api.html>`_
|
|
855
860
|
|
|
856
861
|
:param scroll_id: The scroll IDs to clear. To clear all scroll IDs, use `_all`.
|
|
857
862
|
"""
|
|
@@ -908,7 +913,7 @@ class AsyncElasticsearch(BaseClient):
|
|
|
908
913
|
However, keeping points in time has a cost; close them as soon as they are no longer required for search requests.</p>
|
|
909
914
|
|
|
910
915
|
|
|
911
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
916
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/point-in-time-api.html>`_
|
|
912
917
|
|
|
913
918
|
:param id: The ID of the point-in-time.
|
|
914
919
|
"""
|
|
@@ -992,7 +997,7 @@ class AsyncElasticsearch(BaseClient):
|
|
|
992
997
|
This means that replicas increase the scalability of the count.</p>
|
|
993
998
|
|
|
994
999
|
|
|
995
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
1000
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/search-count.html>`_
|
|
996
1001
|
|
|
997
1002
|
:param index: A comma-separated list of data streams, indices, and aliases to
|
|
998
1003
|
search. It supports wildcards (`*`). To search all data streams and indices,
|
|
@@ -1116,11 +1121,17 @@ class AsyncElasticsearch(BaseClient):
|
|
|
1116
1121
|
error_trace: t.Optional[bool] = None,
|
|
1117
1122
|
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
1118
1123
|
human: t.Optional[bool] = None,
|
|
1124
|
+
if_primary_term: t.Optional[int] = None,
|
|
1125
|
+
if_seq_no: t.Optional[int] = None,
|
|
1126
|
+
include_source_on_error: t.Optional[bool] = None,
|
|
1127
|
+
op_type: t.Optional[t.Union[str, t.Literal["create", "index"]]] = None,
|
|
1119
1128
|
pipeline: t.Optional[str] = None,
|
|
1120
1129
|
pretty: t.Optional[bool] = None,
|
|
1121
1130
|
refresh: t.Optional[
|
|
1122
1131
|
t.Union[bool, str, t.Literal["false", "true", "wait_for"]]
|
|
1123
1132
|
] = None,
|
|
1133
|
+
require_alias: t.Optional[bool] = None,
|
|
1134
|
+
require_data_stream: t.Optional[bool] = None,
|
|
1124
1135
|
routing: t.Optional[str] = None,
|
|
1125
1136
|
timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
|
|
1126
1137
|
version: t.Optional[int] = None,
|
|
@@ -1165,7 +1176,7 @@ class AsyncElasticsearch(BaseClient):
|
|
|
1165
1176
|
This does come at the (very minimal) cost of an additional document parsing pass.
|
|
1166
1177
|
If the <code>_routing</code> mapping is defined and set to be required, the index operation will fail if no routing value is provided or extracted.</p>
|
|
1167
1178
|
<p>NOTE: Data streams do not support custom routing unless they were created with the <code>allow_custom_routing</code> setting enabled in the template.</p>
|
|
1168
|
-
<p
|
|
1179
|
+
<p><strong>Distributed</strong></p>
|
|
1169
1180
|
<p>The index operation is directed to the primary shard based on its route and performed on the actual node containing this shard.
|
|
1170
1181
|
After the primary shard completes the operation, if needed, the update is distributed to applicable replicas.</p>
|
|
1171
1182
|
<p><strong>Active shards</strong></p>
|
|
@@ -1188,7 +1199,7 @@ class AsyncElasticsearch(BaseClient):
|
|
|
1188
1199
|
The <code>_shards</code> section of the API response reveals the number of shard copies on which replication succeeded and failed.</p>
|
|
1189
1200
|
|
|
1190
1201
|
|
|
1191
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
1202
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/docs-index_.html>`_
|
|
1192
1203
|
|
|
1193
1204
|
:param index: The name of the data stream or index to target. If the target doesn't
|
|
1194
1205
|
exist and matches the name or wildcard (`*`) pattern of an index template
|
|
@@ -1198,6 +1209,18 @@ class AsyncElasticsearch(BaseClient):
|
|
|
1198
1209
|
:param id: A unique identifier for the document. To automatically generate a
|
|
1199
1210
|
document ID, use the `POST /<target>/_doc/` request format.
|
|
1200
1211
|
:param document:
|
|
1212
|
+
:param if_primary_term: Only perform the operation if the document has this primary
|
|
1213
|
+
term.
|
|
1214
|
+
:param if_seq_no: Only perform the operation if the document has this sequence
|
|
1215
|
+
number.
|
|
1216
|
+
:param include_source_on_error: True or false if to include the document source
|
|
1217
|
+
in the error message in case of parsing errors.
|
|
1218
|
+
:param op_type: Set to `create` to only index the document if it does not already
|
|
1219
|
+
exist (put if absent). If a document with the specified `_id` already exists,
|
|
1220
|
+
the indexing operation will fail. The behavior is the same as using the `<index>/_create`
|
|
1221
|
+
endpoint. If a document ID is specified, this paramater defaults to `index`.
|
|
1222
|
+
Otherwise, it defaults to `create`. If the request targets a data stream,
|
|
1223
|
+
an `op_type` of `create` is required.
|
|
1201
1224
|
:param pipeline: The ID of the pipeline to use to preprocess incoming documents.
|
|
1202
1225
|
If the index has a default ingest pipeline specified, setting the value to
|
|
1203
1226
|
`_none` turns off the default ingest pipeline for this request. If a final
|
|
@@ -1206,6 +1229,9 @@ class AsyncElasticsearch(BaseClient):
|
|
|
1206
1229
|
:param refresh: If `true`, Elasticsearch refreshes the affected shards to make
|
|
1207
1230
|
this operation visible to search. If `wait_for`, it waits for a refresh to
|
|
1208
1231
|
make this operation visible to search. If `false`, it does nothing with refreshes.
|
|
1232
|
+
:param require_alias: If `true`, the destination must be an index alias.
|
|
1233
|
+
:param require_data_stream: If `true`, the request's actions must target a data
|
|
1234
|
+
stream (existing or to be created).
|
|
1209
1235
|
:param routing: A custom value that is used to route operations to a specific
|
|
1210
1236
|
shard.
|
|
1211
1237
|
:param timeout: The period the request waits for the following operations: automatic
|
|
@@ -1246,12 +1272,24 @@ class AsyncElasticsearch(BaseClient):
|
|
|
1246
1272
|
__query["filter_path"] = filter_path
|
|
1247
1273
|
if human is not None:
|
|
1248
1274
|
__query["human"] = human
|
|
1275
|
+
if if_primary_term is not None:
|
|
1276
|
+
__query["if_primary_term"] = if_primary_term
|
|
1277
|
+
if if_seq_no is not None:
|
|
1278
|
+
__query["if_seq_no"] = if_seq_no
|
|
1279
|
+
if include_source_on_error is not None:
|
|
1280
|
+
__query["include_source_on_error"] = include_source_on_error
|
|
1281
|
+
if op_type is not None:
|
|
1282
|
+
__query["op_type"] = op_type
|
|
1249
1283
|
if pipeline is not None:
|
|
1250
1284
|
__query["pipeline"] = pipeline
|
|
1251
1285
|
if pretty is not None:
|
|
1252
1286
|
__query["pretty"] = pretty
|
|
1253
1287
|
if refresh is not None:
|
|
1254
1288
|
__query["refresh"] = refresh
|
|
1289
|
+
if require_alias is not None:
|
|
1290
|
+
__query["require_alias"] = require_alias
|
|
1291
|
+
if require_data_stream is not None:
|
|
1292
|
+
__query["require_data_stream"] = require_data_stream
|
|
1255
1293
|
if routing is not None:
|
|
1256
1294
|
__query["routing"] = routing
|
|
1257
1295
|
if timeout is not None:
|
|
@@ -1328,7 +1366,7 @@ class AsyncElasticsearch(BaseClient):
|
|
|
1328
1366
|
It then gets redirected into the primary shard within that ID group and replicated (if needed) to shard replicas within that ID group.</p>
|
|
1329
1367
|
|
|
1330
1368
|
|
|
1331
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
1369
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/docs-delete.html>`_
|
|
1332
1370
|
|
|
1333
1371
|
:param index: The name of the target index.
|
|
1334
1372
|
:param id: A unique identifier for the document.
|
|
@@ -1517,7 +1555,7 @@ class AsyncElasticsearch(BaseClient):
|
|
|
1517
1555
|
The get task status API will continue to list the delete by query task until this task checks that it has been cancelled and terminates itself.</p>
|
|
1518
1556
|
|
|
1519
1557
|
|
|
1520
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
1558
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/docs-delete-by-query.html>`_
|
|
1521
1559
|
|
|
1522
1560
|
:param index: A comma-separated list of data streams, indices, and aliases to
|
|
1523
1561
|
search. It supports wildcards (`*`). To search all data streams or indices,
|
|
@@ -1543,7 +1581,7 @@ class AsyncElasticsearch(BaseClient):
|
|
|
1543
1581
|
If the request can target data streams, this argument determines whether
|
|
1544
1582
|
wildcard expressions match hidden data streams. It supports comma-separated
|
|
1545
1583
|
values, such as `open,hidden`.
|
|
1546
|
-
:param from_:
|
|
1584
|
+
:param from_: Skips the specified number of documents.
|
|
1547
1585
|
:param ignore_unavailable: If `false`, the request returns an error if it targets
|
|
1548
1586
|
a missing or closed index.
|
|
1549
1587
|
:param lenient: If `true`, format-based query failures (such as providing text
|
|
@@ -1714,7 +1752,7 @@ class AsyncElasticsearch(BaseClient):
|
|
|
1714
1752
|
Rethrottling that speeds up the query takes effect immediately but rethrotting that slows down the query takes effect after completing the current batch to prevent scroll timeouts.</p>
|
|
1715
1753
|
|
|
1716
1754
|
|
|
1717
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
1755
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/docs-delete-by-query.html#docs-delete-by-query-rethrottle>`_
|
|
1718
1756
|
|
|
1719
1757
|
:param task_id: The ID for the task.
|
|
1720
1758
|
:param requests_per_second: The throttle for this request in sub-requests per
|
|
@@ -1764,7 +1802,7 @@ class AsyncElasticsearch(BaseClient):
|
|
|
1764
1802
|
Deletes a stored script or search template.</p>
|
|
1765
1803
|
|
|
1766
1804
|
|
|
1767
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
1805
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/delete-stored-script-api.html>`_
|
|
1768
1806
|
|
|
1769
1807
|
:param id: The identifier for the stored script or search template.
|
|
1770
1808
|
:param master_timeout: The period to wait for a connection to the master node.
|
|
@@ -1848,7 +1886,7 @@ class AsyncElasticsearch(BaseClient):
|
|
|
1848
1886
|
Elasticsearch cleans up deleted documents in the background as you continue to index more data.</p>
|
|
1849
1887
|
|
|
1850
1888
|
|
|
1851
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
1889
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/docs-get.html>`_
|
|
1852
1890
|
|
|
1853
1891
|
:param index: A comma-separated list of data streams, indices, and aliases. It
|
|
1854
1892
|
supports wildcards (`*`).
|
|
@@ -1971,7 +2009,7 @@ class AsyncElasticsearch(BaseClient):
|
|
|
1971
2009
|
<p>A document's source is not available if it is disabled in the mapping.</p>
|
|
1972
2010
|
|
|
1973
2011
|
|
|
1974
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
2012
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/docs-get.html>`_
|
|
1975
2013
|
|
|
1976
2014
|
:param index: A comma-separated list of data streams, indices, and aliases. It
|
|
1977
2015
|
supports wildcards (`*`).
|
|
@@ -2077,7 +2115,7 @@ class AsyncElasticsearch(BaseClient):
|
|
|
2077
2115
|
It computes a score explanation for a query and a specific document.</p>
|
|
2078
2116
|
|
|
2079
2117
|
|
|
2080
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
2118
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/search-explain.html>`_
|
|
2081
2119
|
|
|
2082
2120
|
:param index: Index names that are used to limit the request. Only a single index
|
|
2083
2121
|
name can be provided to this parameter.
|
|
@@ -2212,7 +2250,7 @@ class AsyncElasticsearch(BaseClient):
|
|
|
2212
2250
|
For example, a runtime field with a type of keyword is returned the same as any other field that belongs to the <code>keyword</code> family.</p>
|
|
2213
2251
|
|
|
2214
2252
|
|
|
2215
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
2253
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/search-field-caps.html>`_
|
|
2216
2254
|
|
|
2217
2255
|
:param index: A comma-separated list of data streams, indices, and aliases used
|
|
2218
2256
|
to limit the request. Supports wildcards (*). To target all data streams
|
|
@@ -2373,7 +2411,7 @@ class AsyncElasticsearch(BaseClient):
|
|
|
2373
2411
|
Elasticsearch cleans up deleted documents in the background as you continue to index more data.</p>
|
|
2374
2412
|
|
|
2375
2413
|
|
|
2376
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
2414
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/docs-get.html>`_
|
|
2377
2415
|
|
|
2378
2416
|
:param index: The name of the index that contains the document.
|
|
2379
2417
|
:param id: A unique document identifier.
|
|
@@ -2480,7 +2518,7 @@ class AsyncElasticsearch(BaseClient):
|
|
|
2480
2518
|
Retrieves a stored script or search template.</p>
|
|
2481
2519
|
|
|
2482
2520
|
|
|
2483
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
2521
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/get-stored-script-api.html>`_
|
|
2484
2522
|
|
|
2485
2523
|
:param id: The identifier for the stored script or search template.
|
|
2486
2524
|
:param master_timeout: The period to wait for the master node. If the master
|
|
@@ -2529,7 +2567,7 @@ class AsyncElasticsearch(BaseClient):
|
|
|
2529
2567
|
<p>Get a list of supported script contexts and their methods.</p>
|
|
2530
2568
|
|
|
2531
2569
|
|
|
2532
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
2570
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/get-script-contexts-api.html>`_
|
|
2533
2571
|
"""
|
|
2534
2572
|
__path_parts: t.Dict[str, str] = {}
|
|
2535
2573
|
__path = "/_script_context"
|
|
@@ -2568,7 +2606,7 @@ class AsyncElasticsearch(BaseClient):
|
|
|
2568
2606
|
<p>Get a list of available script types, languages, and contexts.</p>
|
|
2569
2607
|
|
|
2570
2608
|
|
|
2571
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
2609
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/get-script-languages-api.html>`_
|
|
2572
2610
|
"""
|
|
2573
2611
|
__path_parts: t.Dict[str, str] = {}
|
|
2574
2612
|
__path = "/_script_language"
|
|
@@ -2633,7 +2671,7 @@ class AsyncElasticsearch(BaseClient):
|
|
|
2633
2671
|
</code></pre>
|
|
2634
2672
|
|
|
2635
2673
|
|
|
2636
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
2674
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/docs-get.html>`_
|
|
2637
2675
|
|
|
2638
2676
|
:param index: The name of the index that contains the document.
|
|
2639
2677
|
:param id: A unique document identifier.
|
|
@@ -2733,7 +2771,7 @@ class AsyncElasticsearch(BaseClient):
|
|
|
2733
2771
|
When setting up automated polling of the API for health status, set verbose to false to disable the more expensive analysis logic.</p>
|
|
2734
2772
|
|
|
2735
2773
|
|
|
2736
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
2774
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/health-api.html>`_
|
|
2737
2775
|
|
|
2738
2776
|
:param feature: A feature of the cluster, as returned by the top-level health
|
|
2739
2777
|
report API.
|
|
@@ -2788,6 +2826,7 @@ class AsyncElasticsearch(BaseClient):
|
|
|
2788
2826
|
human: t.Optional[bool] = None,
|
|
2789
2827
|
if_primary_term: t.Optional[int] = None,
|
|
2790
2828
|
if_seq_no: t.Optional[int] = None,
|
|
2829
|
+
include_source_on_error: t.Optional[bool] = None,
|
|
2791
2830
|
op_type: t.Optional[t.Union[str, t.Literal["create", "index"]]] = None,
|
|
2792
2831
|
pipeline: t.Optional[str] = None,
|
|
2793
2832
|
pretty: t.Optional[bool] = None,
|
|
@@ -2844,9 +2883,7 @@ class AsyncElasticsearch(BaseClient):
|
|
|
2844
2883
|
This does come at the (very minimal) cost of an additional document parsing pass.
|
|
2845
2884
|
If the <code>_routing</code> mapping is defined and set to be required, the index operation will fail if no routing value is provided or extracted.</p>
|
|
2846
2885
|
<p>NOTE: Data streams do not support custom routing unless they were created with the <code>allow_custom_routing</code> setting enabled in the template.</p>
|
|
2847
|
-
<
|
|
2848
|
-
<li>** Distributed**</li>
|
|
2849
|
-
</ul>
|
|
2886
|
+
<p><strong>Distributed</strong></p>
|
|
2850
2887
|
<p>The index operation is directed to the primary shard based on its route and performed on the actual node containing this shard.
|
|
2851
2888
|
After the primary shard completes the operation, if needed, the update is distributed to applicable replicas.</p>
|
|
2852
2889
|
<p><strong>Active shards</strong></p>
|
|
@@ -2899,7 +2936,7 @@ class AsyncElasticsearch(BaseClient):
|
|
|
2899
2936
|
</code></pre>
|
|
2900
2937
|
|
|
2901
2938
|
|
|
2902
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
2939
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/docs-index_.html>`_
|
|
2903
2940
|
|
|
2904
2941
|
:param index: The name of the data stream or index to target. If the target doesn't
|
|
2905
2942
|
exist and matches the name or wildcard (`*`) pattern of an index template
|
|
@@ -2915,6 +2952,8 @@ class AsyncElasticsearch(BaseClient):
|
|
|
2915
2952
|
term.
|
|
2916
2953
|
:param if_seq_no: Only perform the operation if the document has this sequence
|
|
2917
2954
|
number.
|
|
2955
|
+
:param include_source_on_error: True or false if to include the document source
|
|
2956
|
+
in the error message in case of parsing errors.
|
|
2918
2957
|
:param op_type: Set to `create` to only index the document if it does not already
|
|
2919
2958
|
exist (put if absent). If a document with the specified `_id` already exists,
|
|
2920
2959
|
the indexing operation will fail. The behavior is the same as using the `<index>/_create`
|
|
@@ -2979,6 +3018,8 @@ class AsyncElasticsearch(BaseClient):
|
|
|
2979
3018
|
__query["if_primary_term"] = if_primary_term
|
|
2980
3019
|
if if_seq_no is not None:
|
|
2981
3020
|
__query["if_seq_no"] = if_seq_no
|
|
3021
|
+
if include_source_on_error is not None:
|
|
3022
|
+
__query["include_source_on_error"] = include_source_on_error
|
|
2982
3023
|
if op_type is not None:
|
|
2983
3024
|
__query["op_type"] = op_type
|
|
2984
3025
|
if pipeline is not None:
|
|
@@ -3027,7 +3068,7 @@ class AsyncElasticsearch(BaseClient):
|
|
|
3027
3068
|
Get basic build, version, and cluster information.</p>
|
|
3028
3069
|
|
|
3029
3070
|
|
|
3030
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
3071
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/rest-api-root.html>`_
|
|
3031
3072
|
"""
|
|
3032
3073
|
__path_parts: t.Dict[str, str] = {}
|
|
3033
3074
|
__path = "/"
|
|
@@ -3101,7 +3142,7 @@ class AsyncElasticsearch(BaseClient):
|
|
|
3101
3142
|
</ul>
|
|
3102
3143
|
|
|
3103
3144
|
|
|
3104
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
3145
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/knn-search-api.html>`_
|
|
3105
3146
|
|
|
3106
3147
|
:param index: A comma-separated list of index names to search; use `_all` or
|
|
3107
3148
|
to perform the operation on all indices.
|
|
@@ -3217,7 +3258,7 @@ class AsyncElasticsearch(BaseClient):
|
|
|
3217
3258
|
You can include the <code>stored_fields</code> query parameter in the request URI to specify the defaults to use when there are no per-document instructions.</p>
|
|
3218
3259
|
|
|
3219
3260
|
|
|
3220
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
3261
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/docs-multi-get.html>`_
|
|
3221
3262
|
|
|
3222
3263
|
:param index: Name of the index to retrieve documents from when `ids` are specified,
|
|
3223
3264
|
or when a document in the `docs` array does not specify an index.
|
|
@@ -3352,7 +3393,7 @@ class AsyncElasticsearch(BaseClient):
|
|
|
3352
3393
|
When sending requests to this endpoint the <code>Content-Type</code> header should be set to <code>application/x-ndjson</code>.</p>
|
|
3353
3394
|
|
|
3354
3395
|
|
|
3355
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
3396
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/search-multi-search.html>`_
|
|
3356
3397
|
|
|
3357
3398
|
:param searches:
|
|
3358
3399
|
:param index: Comma-separated list of data streams, indices, and index aliases
|
|
@@ -3498,7 +3539,7 @@ class AsyncElasticsearch(BaseClient):
|
|
|
3498
3539
|
</code></pre>
|
|
3499
3540
|
|
|
3500
3541
|
|
|
3501
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
3542
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/multi-search-template.html>`_
|
|
3502
3543
|
|
|
3503
3544
|
:param search_templates:
|
|
3504
3545
|
:param index: A comma-separated list of data streams, indices, and aliases to
|
|
@@ -3603,7 +3644,7 @@ class AsyncElasticsearch(BaseClient):
|
|
|
3603
3644
|
The mapping used is determined by the specified <code>_index</code>.</p>
|
|
3604
3645
|
|
|
3605
3646
|
|
|
3606
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
3647
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/docs-multi-termvectors.html>`_
|
|
3607
3648
|
|
|
3608
3649
|
:param index: The name of the index that contains the documents.
|
|
3609
3650
|
:param docs: An array of existing or artificial documents.
|
|
@@ -3707,6 +3748,7 @@ class AsyncElasticsearch(BaseClient):
|
|
|
3707
3748
|
human: t.Optional[bool] = None,
|
|
3708
3749
|
ignore_unavailable: t.Optional[bool] = None,
|
|
3709
3750
|
index_filter: t.Optional[t.Mapping[str, t.Any]] = None,
|
|
3751
|
+
max_concurrent_shard_requests: t.Optional[int] = None,
|
|
3710
3752
|
preference: t.Optional[str] = None,
|
|
3711
3753
|
pretty: t.Optional[bool] = None,
|
|
3712
3754
|
routing: t.Optional[str] = None,
|
|
@@ -3743,7 +3785,7 @@ class AsyncElasticsearch(BaseClient):
|
|
|
3743
3785
|
You can check how many point-in-times (that is, search contexts) are open with the nodes stats API.</p>
|
|
3744
3786
|
|
|
3745
3787
|
|
|
3746
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
3788
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/point-in-time-api.html>`_
|
|
3747
3789
|
|
|
3748
3790
|
:param index: A comma-separated list of index names to open point in time; use
|
|
3749
3791
|
`_all` or empty string to perform the operation on all indices
|
|
@@ -3762,6 +3804,8 @@ class AsyncElasticsearch(BaseClient):
|
|
|
3762
3804
|
a missing or closed index.
|
|
3763
3805
|
:param index_filter: Filter indices if the provided query rewrites to `match_none`
|
|
3764
3806
|
on every shard.
|
|
3807
|
+
:param max_concurrent_shard_requests: Maximum number of concurrent shard requests
|
|
3808
|
+
that each sub-search request executes per node.
|
|
3765
3809
|
:param preference: The node or shard the operation should be performed on. By
|
|
3766
3810
|
default, it is random.
|
|
3767
3811
|
:param routing: A custom value that is used to route operations to a specific
|
|
@@ -3789,6 +3833,8 @@ class AsyncElasticsearch(BaseClient):
|
|
|
3789
3833
|
__query["human"] = human
|
|
3790
3834
|
if ignore_unavailable is not None:
|
|
3791
3835
|
__query["ignore_unavailable"] = ignore_unavailable
|
|
3836
|
+
if max_concurrent_shard_requests is not None:
|
|
3837
|
+
__query["max_concurrent_shard_requests"] = max_concurrent_shard_requests
|
|
3792
3838
|
if preference is not None:
|
|
3793
3839
|
__query["preference"] = preference
|
|
3794
3840
|
if pretty is not None:
|
|
@@ -3837,7 +3883,7 @@ class AsyncElasticsearch(BaseClient):
|
|
|
3837
3883
|
Creates or updates a stored script or search template.</p>
|
|
3838
3884
|
|
|
3839
3885
|
|
|
3840
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
3886
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/create-stored-script-api.html>`_
|
|
3841
3887
|
|
|
3842
3888
|
:param id: The identifier for the stored script or search template. It must be
|
|
3843
3889
|
unique within the cluster.
|
|
@@ -3927,7 +3973,7 @@ class AsyncElasticsearch(BaseClient):
|
|
|
3927
3973
|
<p>Evaluate the quality of ranked search results over a set of typical search queries.</p>
|
|
3928
3974
|
|
|
3929
3975
|
|
|
3930
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
3976
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/search-rank-eval.html>`_
|
|
3931
3977
|
|
|
3932
3978
|
:param requests: A set of typical search requests, together with their provided
|
|
3933
3979
|
ratings.
|
|
@@ -4075,7 +4121,7 @@ class AsyncElasticsearch(BaseClient):
|
|
|
4075
4121
|
}'
|
|
4076
4122
|
done
|
|
4077
4123
|
</code></pre>
|
|
4078
|
-
<p
|
|
4124
|
+
<p><strong>Throttling</strong></p>
|
|
4079
4125
|
<p>Set <code>requests_per_second</code> to any positive decimal number (<code>1.4</code>, <code>6</code>, <code>1000</code>, for example) to throttle the rate at which reindex issues batches of index operations.
|
|
4080
4126
|
Requests are throttled by padding each batch with a wait time.
|
|
4081
4127
|
To turn off throttling, set <code>requests_per_second</code> to <code>-1</code>.</p>
|
|
@@ -4159,7 +4205,7 @@ class AsyncElasticsearch(BaseClient):
|
|
|
4159
4205
|
It is not possible to configure SSL in the body of the reindex request.</p>
|
|
4160
4206
|
|
|
4161
4207
|
|
|
4162
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
4208
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/docs-reindex.html>`_
|
|
4163
4209
|
|
|
4164
4210
|
:param dest: The destination you are copying to.
|
|
4165
4211
|
:param source: The source you are copying from.
|
|
@@ -4283,7 +4329,7 @@ class AsyncElasticsearch(BaseClient):
|
|
|
4283
4329
|
This behavior prevents scroll timeouts.</p>
|
|
4284
4330
|
|
|
4285
4331
|
|
|
4286
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
4332
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/docs-reindex.html>`_
|
|
4287
4333
|
|
|
4288
4334
|
:param task_id: The task identifier, which can be found by using the tasks API.
|
|
4289
4335
|
:param requests_per_second: The throttle for this request in sub-requests per
|
|
@@ -4339,7 +4385,7 @@ class AsyncElasticsearch(BaseClient):
|
|
|
4339
4385
|
<p>Render a search template as a search request body.</p>
|
|
4340
4386
|
|
|
4341
4387
|
|
|
4342
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
4388
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/render-search-template-api.html>`_
|
|
4343
4389
|
|
|
4344
4390
|
:param id: The ID of the search template to render. If no `source` is specified,
|
|
4345
4391
|
this or the `id` request body parameter is required.
|
|
@@ -4396,7 +4442,24 @@ class AsyncElasticsearch(BaseClient):
|
|
|
4396
4442
|
async def scripts_painless_execute(
|
|
4397
4443
|
self,
|
|
4398
4444
|
*,
|
|
4399
|
-
context: t.Optional[
|
|
4445
|
+
context: t.Optional[
|
|
4446
|
+
t.Union[
|
|
4447
|
+
str,
|
|
4448
|
+
t.Literal[
|
|
4449
|
+
"boolean_field",
|
|
4450
|
+
"composite_field",
|
|
4451
|
+
"date_field",
|
|
4452
|
+
"double_field",
|
|
4453
|
+
"filter",
|
|
4454
|
+
"geo_point_field",
|
|
4455
|
+
"ip_field",
|
|
4456
|
+
"keyword_field",
|
|
4457
|
+
"long_field",
|
|
4458
|
+
"painless_test",
|
|
4459
|
+
"score",
|
|
4460
|
+
],
|
|
4461
|
+
]
|
|
4462
|
+
] = None,
|
|
4400
4463
|
context_setup: t.Optional[t.Mapping[str, t.Any]] = None,
|
|
4401
4464
|
error_trace: t.Optional[bool] = None,
|
|
4402
4465
|
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
@@ -4408,15 +4471,22 @@ class AsyncElasticsearch(BaseClient):
|
|
|
4408
4471
|
"""
|
|
4409
4472
|
.. raw:: html
|
|
4410
4473
|
|
|
4411
|
-
<p>Run a script
|
|
4412
|
-
Runs a script and returns a result
|
|
4474
|
+
<p>Run a script.</p>
|
|
4475
|
+
<p>Runs a script and returns a result.
|
|
4476
|
+
Use this API to build and test scripts, such as when defining a script for a runtime field.
|
|
4477
|
+
This API requires very few dependencies and is especially useful if you don't have permissions to write documents on a cluster.</p>
|
|
4478
|
+
<p>The API uses several <em>contexts</em>, which control how scripts are run, what variables are available at runtime, and what the return type is.</p>
|
|
4479
|
+
<p>Each context requires a script, but additional parameters depend on the context you're using for that script.</p>
|
|
4413
4480
|
|
|
4414
4481
|
|
|
4415
|
-
`<https://www.elastic.co/guide/en/elasticsearch/painless/8.
|
|
4482
|
+
`<https://www.elastic.co/guide/en/elasticsearch/painless/8.18/painless-execute-api.html>`_
|
|
4416
4483
|
|
|
4417
|
-
:param context: The context that the script should run in.
|
|
4418
|
-
|
|
4419
|
-
:param
|
|
4484
|
+
:param context: The context that the script should run in. NOTE: Result ordering
|
|
4485
|
+
in the field contexts is not guaranteed.
|
|
4486
|
+
:param context_setup: Additional parameters for the `context`. NOTE: This parameter
|
|
4487
|
+
is required for all contexts except `painless_test`, which is the default
|
|
4488
|
+
if no value is provided for `context`.
|
|
4489
|
+
:param script: The Painless script to run.
|
|
4420
4490
|
"""
|
|
4421
4491
|
__path_parts: t.Dict[str, str] = {}
|
|
4422
4492
|
__path = "/_scripts/painless/_execute"
|
|
@@ -4482,7 +4552,7 @@ class AsyncElasticsearch(BaseClient):
|
|
|
4482
4552
|
<p>IMPORTANT: Results from a scrolling search reflect the state of the index at the time of the initial search request. Subsequent indexing or document changes only affect later search and scroll requests.</p>
|
|
4483
4553
|
|
|
4484
4554
|
|
|
4485
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
4555
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/scroll-api.html>`_
|
|
4486
4556
|
|
|
4487
4557
|
:param scroll_id: The scroll ID of the search.
|
|
4488
4558
|
:param rest_total_hits_as_int: If true, the API response’s hit.total property
|
|
@@ -4688,7 +4758,7 @@ class AsyncElasticsearch(BaseClient):
|
|
|
4688
4758
|
This situation can occur because the splitting criterion is based on Lucene document IDs, which are not stable across changes to the index.</p>
|
|
4689
4759
|
|
|
4690
4760
|
|
|
4691
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
4761
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/search-search.html>`_
|
|
4692
4762
|
|
|
4693
4763
|
:param index: A comma-separated list of data streams, indices, and aliases to
|
|
4694
4764
|
search. It supports wildcards (`*`). To search all data streams and indices,
|
|
@@ -4767,7 +4837,7 @@ class AsyncElasticsearch(BaseClient):
|
|
|
4767
4837
|
limit the impact of the search on the cluster in order to limit the number
|
|
4768
4838
|
of concurrent shard requests.
|
|
4769
4839
|
:param min_compatible_shard_node: The minimum version of the node that can handle
|
|
4770
|
-
the request
|
|
4840
|
+
the request Any handling node with a lower version will fail the request.
|
|
4771
4841
|
:param min_score: The minimum `_score` for matching documents. Documents with
|
|
4772
4842
|
a lower `_score` are not included in the search results.
|
|
4773
4843
|
:param pit: Limit the search to a point in time (PIT). If you provide a PIT,
|
|
@@ -5438,7 +5508,7 @@ class AsyncElasticsearch(BaseClient):
|
|
|
5438
5508
|
Elasticsearch uses the H3 resolution that is closest to the corresponding geotile density.</p>
|
|
5439
5509
|
|
|
5440
5510
|
|
|
5441
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
5511
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/search-vector-tile-api.html>`_
|
|
5442
5512
|
|
|
5443
5513
|
:param index: Comma-separated list of data streams, indices, or aliases to search
|
|
5444
5514
|
:param field: Field containing geospatial data to return
|
|
@@ -5597,6 +5667,7 @@ class AsyncElasticsearch(BaseClient):
|
|
|
5597
5667
|
human: t.Optional[bool] = None,
|
|
5598
5668
|
ignore_unavailable: t.Optional[bool] = None,
|
|
5599
5669
|
local: t.Optional[bool] = None,
|
|
5670
|
+
master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
|
|
5600
5671
|
preference: t.Optional[str] = None,
|
|
5601
5672
|
pretty: t.Optional[bool] = None,
|
|
5602
5673
|
routing: t.Optional[str] = None,
|
|
@@ -5611,7 +5682,7 @@ class AsyncElasticsearch(BaseClient):
|
|
|
5611
5682
|
<p>If the Elasticsearch security features are enabled, you must have the <code>view_index_metadata</code> or <code>manage</code> index privilege for the target data stream, index, or alias.</p>
|
|
5612
5683
|
|
|
5613
5684
|
|
|
5614
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
5685
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/search-shards.html>`_
|
|
5615
5686
|
|
|
5616
5687
|
:param index: A comma-separated list of data streams, indices, and aliases to
|
|
5617
5688
|
search. It supports wildcards (`*`). To search all data streams and indices,
|
|
@@ -5629,6 +5700,10 @@ class AsyncElasticsearch(BaseClient):
|
|
|
5629
5700
|
a missing or closed index.
|
|
5630
5701
|
:param local: If `true`, the request retrieves information from the local node
|
|
5631
5702
|
only.
|
|
5703
|
+
:param master_timeout: The period to wait for a connection to the master node.
|
|
5704
|
+
If the master node is not available before the timeout expires, the request
|
|
5705
|
+
fails and returns an error. IT can also be set to `-1` to indicate that the
|
|
5706
|
+
request should never timeout.
|
|
5632
5707
|
:param preference: The node or shard the operation should be performed on. It
|
|
5633
5708
|
is random by default.
|
|
5634
5709
|
:param routing: A custom value used to route operations to a specific shard.
|
|
@@ -5655,6 +5730,8 @@ class AsyncElasticsearch(BaseClient):
|
|
|
5655
5730
|
__query["ignore_unavailable"] = ignore_unavailable
|
|
5656
5731
|
if local is not None:
|
|
5657
5732
|
__query["local"] = local
|
|
5733
|
+
if master_timeout is not None:
|
|
5734
|
+
__query["master_timeout"] = master_timeout
|
|
5658
5735
|
if preference is not None:
|
|
5659
5736
|
__query["preference"] = preference
|
|
5660
5737
|
if pretty is not None:
|
|
@@ -5716,7 +5793,7 @@ class AsyncElasticsearch(BaseClient):
|
|
|
5716
5793
|
<p>Run a search with a search template.</p>
|
|
5717
5794
|
|
|
5718
5795
|
|
|
5719
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
5796
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/search-template-api.html>`_
|
|
5720
5797
|
|
|
5721
5798
|
:param index: A comma-separated list of data streams, indices, and aliases to
|
|
5722
5799
|
search. It supports wildcards (`*`).
|
|
@@ -5859,7 +5936,7 @@ class AsyncElasticsearch(BaseClient):
|
|
|
5859
5936
|
</blockquote>
|
|
5860
5937
|
|
|
5861
5938
|
|
|
5862
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
5939
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/search-terms-enum.html>`_
|
|
5863
5940
|
|
|
5864
5941
|
:param index: A comma-separated list of data streams, indices, and index aliases
|
|
5865
5942
|
to search. Wildcard (`*`) expressions are supported. To search all data streams
|
|
@@ -5929,7 +6006,20 @@ class AsyncElasticsearch(BaseClient):
|
|
|
5929
6006
|
)
|
|
5930
6007
|
|
|
5931
6008
|
@_rewrite_parameters(
|
|
5932
|
-
body_fields=(
|
|
6009
|
+
body_fields=(
|
|
6010
|
+
"doc",
|
|
6011
|
+
"field_statistics",
|
|
6012
|
+
"fields",
|
|
6013
|
+
"filter",
|
|
6014
|
+
"offsets",
|
|
6015
|
+
"payloads",
|
|
6016
|
+
"per_field_analyzer",
|
|
6017
|
+
"positions",
|
|
6018
|
+
"routing",
|
|
6019
|
+
"term_statistics",
|
|
6020
|
+
"version",
|
|
6021
|
+
"version_type",
|
|
6022
|
+
),
|
|
5933
6023
|
)
|
|
5934
6024
|
async def termvectors(
|
|
5935
6025
|
self,
|
|
@@ -5995,7 +6085,7 @@ class AsyncElasticsearch(BaseClient):
|
|
|
5995
6085
|
Use <code>routing</code> only to hit a particular shard.</p>
|
|
5996
6086
|
|
|
5997
6087
|
|
|
5998
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
6088
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/docs-termvectors.html>`_
|
|
5999
6089
|
|
|
6000
6090
|
:param index: The name of the index that contains the document.
|
|
6001
6091
|
:param id: A unique identifier for the document.
|
|
@@ -6006,9 +6096,9 @@ class AsyncElasticsearch(BaseClient):
|
|
|
6006
6096
|
(the sum of document frequencies for all terms in this field). * The sum
|
|
6007
6097
|
of total term frequencies (the sum of total term frequencies of each term
|
|
6008
6098
|
in this field).
|
|
6009
|
-
:param fields: A
|
|
6010
|
-
|
|
6011
|
-
|
|
6099
|
+
:param fields: A list of fields to include in the statistics. It is used as the
|
|
6100
|
+
default list unless a specific field list is provided in the `completion_fields`
|
|
6101
|
+
or `fielddata_fields` parameters.
|
|
6012
6102
|
:param filter: Filter terms based on their tf-idf scores. This could be useful
|
|
6013
6103
|
in order find out a good characteristic vector of a document. This feature
|
|
6014
6104
|
works in a similar manner to the second phase of the More Like This Query.
|
|
@@ -6046,41 +6136,41 @@ class AsyncElasticsearch(BaseClient):
|
|
|
6046
6136
|
__body: t.Dict[str, t.Any] = body if body is not None else {}
|
|
6047
6137
|
if error_trace is not None:
|
|
6048
6138
|
__query["error_trace"] = error_trace
|
|
6049
|
-
if field_statistics is not None:
|
|
6050
|
-
__query["field_statistics"] = field_statistics
|
|
6051
|
-
if fields is not None:
|
|
6052
|
-
__query["fields"] = fields
|
|
6053
6139
|
if filter_path is not None:
|
|
6054
6140
|
__query["filter_path"] = filter_path
|
|
6055
6141
|
if human is not None:
|
|
6056
6142
|
__query["human"] = human
|
|
6057
|
-
if offsets is not None:
|
|
6058
|
-
__query["offsets"] = offsets
|
|
6059
|
-
if payloads is not None:
|
|
6060
|
-
__query["payloads"] = payloads
|
|
6061
|
-
if positions is not None:
|
|
6062
|
-
__query["positions"] = positions
|
|
6063
6143
|
if preference is not None:
|
|
6064
6144
|
__query["preference"] = preference
|
|
6065
6145
|
if pretty is not None:
|
|
6066
6146
|
__query["pretty"] = pretty
|
|
6067
6147
|
if realtime is not None:
|
|
6068
6148
|
__query["realtime"] = realtime
|
|
6069
|
-
if routing is not None:
|
|
6070
|
-
__query["routing"] = routing
|
|
6071
|
-
if term_statistics is not None:
|
|
6072
|
-
__query["term_statistics"] = term_statistics
|
|
6073
|
-
if version is not None:
|
|
6074
|
-
__query["version"] = version
|
|
6075
|
-
if version_type is not None:
|
|
6076
|
-
__query["version_type"] = version_type
|
|
6077
6149
|
if not __body:
|
|
6078
6150
|
if doc is not None:
|
|
6079
6151
|
__body["doc"] = doc
|
|
6152
|
+
if field_statistics is not None:
|
|
6153
|
+
__body["field_statistics"] = field_statistics
|
|
6154
|
+
if fields is not None:
|
|
6155
|
+
__body["fields"] = fields
|
|
6080
6156
|
if filter is not None:
|
|
6081
6157
|
__body["filter"] = filter
|
|
6158
|
+
if offsets is not None:
|
|
6159
|
+
__body["offsets"] = offsets
|
|
6160
|
+
if payloads is not None:
|
|
6161
|
+
__body["payloads"] = payloads
|
|
6082
6162
|
if per_field_analyzer is not None:
|
|
6083
6163
|
__body["per_field_analyzer"] = per_field_analyzer
|
|
6164
|
+
if positions is not None:
|
|
6165
|
+
__body["positions"] = positions
|
|
6166
|
+
if routing is not None:
|
|
6167
|
+
__body["routing"] = routing
|
|
6168
|
+
if term_statistics is not None:
|
|
6169
|
+
__body["term_statistics"] = term_statistics
|
|
6170
|
+
if version is not None:
|
|
6171
|
+
__body["version"] = version
|
|
6172
|
+
if version_type is not None:
|
|
6173
|
+
__body["version_type"] = version_type
|
|
6084
6174
|
if not __body:
|
|
6085
6175
|
__body = None # type: ignore[assignment]
|
|
6086
6176
|
__headers = {"accept": "application/json"}
|
|
@@ -6125,6 +6215,7 @@ class AsyncElasticsearch(BaseClient):
|
|
|
6125
6215
|
human: t.Optional[bool] = None,
|
|
6126
6216
|
if_primary_term: t.Optional[int] = None,
|
|
6127
6217
|
if_seq_no: t.Optional[int] = None,
|
|
6218
|
+
include_source_on_error: t.Optional[bool] = None,
|
|
6128
6219
|
lang: t.Optional[str] = None,
|
|
6129
6220
|
pretty: t.Optional[bool] = None,
|
|
6130
6221
|
refresh: t.Optional[
|
|
@@ -6165,7 +6256,7 @@ class AsyncElasticsearch(BaseClient):
|
|
|
6165
6256
|
In addition to <code>_source</code>, you can access the following variables through the <code>ctx</code> map: <code>_index</code>, <code>_type</code>, <code>_id</code>, <code>_version</code>, <code>_routing</code>, and <code>_now</code> (the current timestamp).</p>
|
|
6166
6257
|
|
|
6167
6258
|
|
|
6168
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
6259
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/docs-update.html>`_
|
|
6169
6260
|
|
|
6170
6261
|
:param index: The name of the target index. By default, the index is created
|
|
6171
6262
|
automatically if it doesn't exist.
|
|
@@ -6180,6 +6271,8 @@ class AsyncElasticsearch(BaseClient):
|
|
|
6180
6271
|
term.
|
|
6181
6272
|
:param if_seq_no: Only perform the operation if the document has this sequence
|
|
6182
6273
|
number.
|
|
6274
|
+
:param include_source_on_error: True or false if to include the document source
|
|
6275
|
+
in the error message in case of parsing errors.
|
|
6183
6276
|
:param lang: The script language.
|
|
6184
6277
|
:param refresh: If 'true', Elasticsearch refreshes the affected shards to make
|
|
6185
6278
|
this operation visible to search. If 'wait_for', it waits for a refresh to
|
|
@@ -6224,6 +6317,8 @@ class AsyncElasticsearch(BaseClient):
|
|
|
6224
6317
|
__query["if_primary_term"] = if_primary_term
|
|
6225
6318
|
if if_seq_no is not None:
|
|
6226
6319
|
__query["if_seq_no"] = if_seq_no
|
|
6320
|
+
if include_source_on_error is not None:
|
|
6321
|
+
__query["include_source_on_error"] = include_source_on_error
|
|
6227
6322
|
if lang is not None:
|
|
6228
6323
|
__query["lang"] = lang
|
|
6229
6324
|
if pretty is not None:
|
|
@@ -6399,7 +6494,7 @@ class AsyncElasticsearch(BaseClient):
|
|
|
6399
6494
|
This API enables you to only modify the source of matching documents; you cannot move them.</p>
|
|
6400
6495
|
|
|
6401
6496
|
|
|
6402
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
6497
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/docs-update-by-query.html>`_
|
|
6403
6498
|
|
|
6404
6499
|
:param index: A comma-separated list of data streams, indices, and aliases to
|
|
6405
6500
|
search. It supports wildcards (`*`). To search all data streams or indices,
|
|
@@ -6426,7 +6521,7 @@ class AsyncElasticsearch(BaseClient):
|
|
|
6426
6521
|
wildcard expressions match hidden data streams. It supports comma-separated
|
|
6427
6522
|
values, such as `open,hidden`. Valid values are: `all`, `open`, `closed`,
|
|
6428
6523
|
`hidden`, `none`.
|
|
6429
|
-
:param from_:
|
|
6524
|
+
:param from_: Skips the specified number of documents.
|
|
6430
6525
|
:param ignore_unavailable: If `false`, the request returns an error if it targets
|
|
6431
6526
|
a missing or closed index.
|
|
6432
6527
|
:param lenient: If `true`, format-based query failures (such as providing text
|
|
@@ -6619,7 +6714,7 @@ class AsyncElasticsearch(BaseClient):
|
|
|
6619
6714
|
Rethrottling that speeds up the query takes effect immediately but rethrotting that slows down the query takes effect after completing the current batch to prevent scroll timeouts.</p>
|
|
6620
6715
|
|
|
6621
6716
|
|
|
6622
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
6717
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/docs-update-by-query.html#docs-update-by-query-rethrottle>`_
|
|
6623
6718
|
|
|
6624
6719
|
:param task_id: The ID for the task.
|
|
6625
6720
|
:param requests_per_second: The throttle for this request in sub-requests per
|