elasticsearch9 9.1.0__py3-none-any.whl → 9.1.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.
Files changed (33) hide show
  1. elasticsearch9/_async/client/__init__.py +19 -6
  2. elasticsearch9/_async/client/cat.py +610 -26
  3. elasticsearch9/_async/client/cluster.py +7 -2
  4. elasticsearch9/_async/client/esql.py +20 -6
  5. elasticsearch9/_async/client/indices.py +4 -4
  6. elasticsearch9/_async/client/inference.py +5 -4
  7. elasticsearch9/_async/client/sql.py +1 -1
  8. elasticsearch9/_async/client/transform.py +60 -0
  9. elasticsearch9/_sync/client/__init__.py +19 -6
  10. elasticsearch9/_sync/client/cat.py +610 -26
  11. elasticsearch9/_sync/client/cluster.py +7 -2
  12. elasticsearch9/_sync/client/esql.py +20 -6
  13. elasticsearch9/_sync/client/indices.py +4 -4
  14. elasticsearch9/_sync/client/inference.py +5 -4
  15. elasticsearch9/_sync/client/sql.py +1 -1
  16. elasticsearch9/_sync/client/transform.py +60 -0
  17. elasticsearch9/_version.py +1 -1
  18. elasticsearch9/dsl/_async/document.py +84 -0
  19. elasticsearch9/dsl/_sync/document.py +84 -0
  20. elasticsearch9/dsl/document_base.py +42 -0
  21. elasticsearch9/dsl/field.py +23 -10
  22. elasticsearch9/dsl/response/aggs.py +1 -1
  23. elasticsearch9/dsl/types.py +47 -10
  24. elasticsearch9/dsl/utils.py +1 -1
  25. elasticsearch9/esql/__init__.py +2 -1
  26. elasticsearch9/esql/esql.py +85 -34
  27. elasticsearch9/esql/functions.py +37 -25
  28. {elasticsearch9-9.1.0.dist-info → elasticsearch9-9.1.1.dist-info}/METADATA +1 -3
  29. {elasticsearch9-9.1.0.dist-info → elasticsearch9-9.1.1.dist-info}/RECORD +32 -33
  30. elasticsearch9/esql/esql1.py1 +0 -307
  31. {elasticsearch9-9.1.0.dist-info → elasticsearch9-9.1.1.dist-info}/WHEEL +0 -0
  32. {elasticsearch9-9.1.0.dist-info → elasticsearch9-9.1.1.dist-info}/licenses/LICENSE +0 -0
  33. {elasticsearch9-9.1.0.dist-info → elasticsearch9-9.1.1.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[t.Sequence[str]] = None,
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 comma-separated list of `<field>:<direction>` pairs.
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.Union[str, t.Sequence[str]]] = None,
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,