elasticsearch 9.0.3__py3-none-any.whl → 9.0.5__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 +19 -6
- elasticsearch/_async/client/cat.py +610 -26
- elasticsearch/_async/client/esql.py +16 -6
- elasticsearch/_async/client/indices.py +2 -2
- elasticsearch/_async/client/logstash.py +3 -1
- elasticsearch/_async/client/sql.py +1 -1
- elasticsearch/_async/client/transform.py +60 -0
- elasticsearch/_sync/client/__init__.py +19 -6
- elasticsearch/_sync/client/cat.py +610 -26
- elasticsearch/_sync/client/esql.py +16 -6
- elasticsearch/_sync/client/indices.py +2 -2
- elasticsearch/_sync/client/logstash.py +3 -1
- elasticsearch/_sync/client/sql.py +1 -1
- elasticsearch/_sync/client/transform.py +60 -0
- elasticsearch/_version.py +1 -1
- elasticsearch/dsl/__init__.py +28 -0
- elasticsearch/dsl/_async/document.py +84 -0
- elasticsearch/dsl/_sync/document.py +84 -0
- elasticsearch/dsl/aggs.py +97 -0
- elasticsearch/dsl/document_base.py +43 -0
- elasticsearch/dsl/field.py +27 -10
- elasticsearch/dsl/response/__init__.py +3 -0
- elasticsearch/dsl/response/aggs.py +1 -1
- elasticsearch/dsl/types.py +203 -13
- elasticsearch/dsl/utils.py +1 -1
- elasticsearch/esql/__init__.py +2 -1
- elasticsearch/esql/esql.py +85 -34
- elasticsearch/esql/functions.py +37 -25
- {elasticsearch-9.0.3.dist-info → elasticsearch-9.0.5.dist-info}/METADATA +1 -3
- {elasticsearch-9.0.3.dist-info → elasticsearch-9.0.5.dist-info}/RECORD +33 -33
- {elasticsearch-9.0.3.dist-info → elasticsearch-9.0.5.dist-info}/WHEEL +1 -1
- {elasticsearch-9.0.3.dist-info → elasticsearch-9.0.5.dist-info}/licenses/LICENSE +0 -0
- {elasticsearch-9.0.3.dist-info → elasticsearch-9.0.5.dist-info}/licenses/NOTICE +0 -0
|
@@ -608,6 +608,7 @@ class AsyncElasticsearch(BaseClient):
|
|
|
608
608
|
<li>JavaScript: Check out <code>client.helpers.*</code></li>
|
|
609
609
|
<li>.NET: Check out <code>BulkAllObservable</code></li>
|
|
610
610
|
<li>PHP: Check out bulk indexing.</li>
|
|
611
|
+
<li>Ruby: Check out <code>Elasticsearch::Helpers::BulkHelper</code></li>
|
|
611
612
|
</ul>
|
|
612
613
|
<p><strong>Submitting bulk requests with cURL</strong></p>
|
|
613
614
|
<p>If you're providing text file input to <code>curl</code>, you must use the <code>--data-binary</code> flag instead of plain <code>-d</code>.
|
|
@@ -1326,7 +1327,7 @@ class AsyncElasticsearch(BaseClient):
|
|
|
1326
1327
|
)
|
|
1327
1328
|
|
|
1328
1329
|
@_rewrite_parameters(
|
|
1329
|
-
body_fields=("max_docs", "query", "slice"),
|
|
1330
|
+
body_fields=("max_docs", "query", "slice", "sort"),
|
|
1330
1331
|
parameter_aliases={"from": "from_"},
|
|
1331
1332
|
)
|
|
1332
1333
|
async def delete_by_query(
|
|
@@ -1370,7 +1371,12 @@ class AsyncElasticsearch(BaseClient):
|
|
|
1370
1371
|
] = None,
|
|
1371
1372
|
slice: t.Optional[t.Mapping[str, t.Any]] = None,
|
|
1372
1373
|
slices: t.Optional[t.Union[int, t.Union[str, t.Literal["auto"]]]] = None,
|
|
1373
|
-
sort: t.Optional[
|
|
1374
|
+
sort: t.Optional[
|
|
1375
|
+
t.Union[
|
|
1376
|
+
t.Sequence[t.Union[str, t.Mapping[str, t.Any]]],
|
|
1377
|
+
t.Union[str, t.Mapping[str, t.Any]],
|
|
1378
|
+
]
|
|
1379
|
+
] = None,
|
|
1374
1380
|
stats: t.Optional[t.Sequence[str]] = None,
|
|
1375
1381
|
terminate_after: t.Optional[int] = None,
|
|
1376
1382
|
timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
|
|
@@ -1502,7 +1508,7 @@ class AsyncElasticsearch(BaseClient):
|
|
|
1502
1508
|
:param slice: Slice the request manually using the provided slice ID and total
|
|
1503
1509
|
number of slices.
|
|
1504
1510
|
:param slices: The number of slices this task should be divided into.
|
|
1505
|
-
:param sort: A
|
|
1511
|
+
:param sort: A sort object that specifies the order of deleted documents.
|
|
1506
1512
|
:param stats: The specific `tag` of the request for logging and statistical purposes.
|
|
1507
1513
|
:param terminate_after: The maximum number of documents to collect for each shard.
|
|
1508
1514
|
If a query reaches this limit, Elasticsearch terminates the query early.
|
|
@@ -1592,8 +1598,6 @@ class AsyncElasticsearch(BaseClient):
|
|
|
1592
1598
|
__query["search_type"] = search_type
|
|
1593
1599
|
if slices is not None:
|
|
1594
1600
|
__query["slices"] = slices
|
|
1595
|
-
if sort is not None:
|
|
1596
|
-
__query["sort"] = sort
|
|
1597
1601
|
if stats is not None:
|
|
1598
1602
|
__query["stats"] = stats
|
|
1599
1603
|
if terminate_after is not None:
|
|
@@ -1613,6 +1617,8 @@ class AsyncElasticsearch(BaseClient):
|
|
|
1613
1617
|
__body["query"] = query
|
|
1614
1618
|
if slice is not None:
|
|
1615
1619
|
__body["slice"] = slice
|
|
1620
|
+
if sort is not None:
|
|
1621
|
+
__body["sort"] = sort
|
|
1616
1622
|
__headers = {"accept": "application/json", "content-type": "application/json"}
|
|
1617
1623
|
return await self.perform_request( # type: ignore[return-value]
|
|
1618
1624
|
"POST",
|
|
@@ -3870,6 +3876,13 @@ class AsyncElasticsearch(BaseClient):
|
|
|
3870
3876
|
In this case, the response includes a count of the version conflicts that were encountered.
|
|
3871
3877
|
Note that the handling of other error types is unaffected by the <code>conflicts</code> property.
|
|
3872
3878
|
Additionally, if you opt to count version conflicts, the operation could attempt to reindex more documents from the source than <code>max_docs</code> until it has successfully indexed <code>max_docs</code> documents into the target or it has gone through every document in the source query.</p>
|
|
3879
|
+
<p>It's recommended to reindex on indices with a green status. Reindexing can fail when a node shuts down or crashes.</p>
|
|
3880
|
+
<ul>
|
|
3881
|
+
<li>When requested with <code>wait_for_completion=true</code> (default), the request fails if the node shuts down.</li>
|
|
3882
|
+
<li>When requested with <code>wait_for_completion=false</code>, a task id is returned, for use with the task management APIs. The task may disappear or fail if the node shuts down.
|
|
3883
|
+
When retrying a failed reindex operation, it might be necessary to set <code>conflicts=proceed</code> or to first delete the partial destination index.
|
|
3884
|
+
Additionally, dry runs, checking disk space, and fetching index recovery information can help address the root cause.</li>
|
|
3885
|
+
</ul>
|
|
3873
3886
|
<p>Refer to the linked documentation for examples of how to reindex documents.</p>
|
|
3874
3887
|
|
|
3875
3888
|
|
|
@@ -5649,7 +5662,7 @@ class AsyncElasticsearch(BaseClient):
|
|
|
5649
5662
|
doc: t.Optional[t.Mapping[str, t.Any]] = None,
|
|
5650
5663
|
error_trace: t.Optional[bool] = None,
|
|
5651
5664
|
field_statistics: t.Optional[bool] = None,
|
|
5652
|
-
fields: t.Optional[t.
|
|
5665
|
+
fields: t.Optional[t.Sequence[str]] = None,
|
|
5653
5666
|
filter: t.Optional[t.Mapping[str, t.Any]] = None,
|
|
5654
5667
|
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
5655
5668
|
human: t.Optional[bool] = None,
|