elasticsearch 9.1.2__py3-none-any.whl → 9.2.0__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 +94 -44
- elasticsearch/_async/client/async_search.py +7 -0
- elasticsearch/_async/client/cat.py +8 -1
- elasticsearch/_async/client/cluster.py +9 -8
- elasticsearch/_async/client/eql.py +7 -0
- elasticsearch/_async/client/esql.py +26 -3
- elasticsearch/_async/client/fleet.py +1 -5
- elasticsearch/_async/client/graph.py +1 -5
- elasticsearch/_async/client/ilm.py +2 -10
- elasticsearch/_async/client/indices.py +158 -28
- elasticsearch/_async/client/inference.py +280 -123
- elasticsearch/_async/client/ingest.py +8 -0
- elasticsearch/_async/client/license.py +4 -2
- elasticsearch/_async/client/ml.py +2 -2
- elasticsearch/_async/client/nodes.py +1 -3
- elasticsearch/_async/client/project.py +67 -0
- elasticsearch/_async/client/security.py +39 -0
- elasticsearch/_async/client/simulate.py +8 -0
- elasticsearch/_async/client/slm.py +1 -5
- elasticsearch/_async/client/snapshot.py +20 -10
- elasticsearch/_async/client/sql.py +7 -0
- elasticsearch/_async/client/streams.py +2 -3
- elasticsearch/_async/helpers.py +28 -15
- elasticsearch/_sync/client/__init__.py +94 -44
- elasticsearch/_sync/client/async_search.py +7 -0
- elasticsearch/_sync/client/cat.py +8 -1
- elasticsearch/_sync/client/cluster.py +9 -8
- elasticsearch/_sync/client/eql.py +7 -0
- elasticsearch/_sync/client/esql.py +26 -3
- elasticsearch/_sync/client/fleet.py +1 -5
- elasticsearch/_sync/client/graph.py +1 -5
- elasticsearch/_sync/client/ilm.py +2 -10
- elasticsearch/_sync/client/indices.py +158 -28
- elasticsearch/_sync/client/inference.py +280 -123
- elasticsearch/_sync/client/ingest.py +8 -0
- elasticsearch/_sync/client/license.py +4 -2
- elasticsearch/_sync/client/ml.py +2 -2
- elasticsearch/_sync/client/nodes.py +1 -3
- elasticsearch/_sync/client/project.py +67 -0
- elasticsearch/_sync/client/security.py +39 -0
- elasticsearch/_sync/client/simulate.py +8 -0
- elasticsearch/_sync/client/slm.py +1 -5
- elasticsearch/_sync/client/snapshot.py +20 -10
- elasticsearch/_sync/client/sql.py +7 -0
- elasticsearch/_sync/client/streams.py +2 -3
- elasticsearch/_version.py +2 -2
- elasticsearch/client.py +2 -0
- elasticsearch/compat.py +2 -15
- elasticsearch/dsl/_async/document.py +2 -1
- elasticsearch/dsl/_sync/document.py +2 -1
- elasticsearch/dsl/document_base.py +38 -13
- elasticsearch/dsl/pydantic.py +152 -0
- elasticsearch/dsl/search_base.py +5 -1
- elasticsearch/esql/esql.py +331 -41
- elasticsearch/esql/functions.py +88 -0
- elasticsearch/helpers/actions.py +1 -1
- {elasticsearch-9.1.2.dist-info → elasticsearch-9.2.0.dist-info}/METADATA +26 -4
- {elasticsearch-9.1.2.dist-info → elasticsearch-9.2.0.dist-info}/RECORD +61 -58
- {elasticsearch-9.1.2.dist-info → elasticsearch-9.2.0.dist-info}/WHEEL +0 -0
- {elasticsearch-9.1.2.dist-info → elasticsearch-9.2.0.dist-info}/licenses/LICENSE +0 -0
- {elasticsearch-9.1.2.dist-info → elasticsearch-9.2.0.dist-info}/licenses/NOTICE +0 -0
|
@@ -40,6 +40,7 @@ class EsqlClient(NamespacedClient):
|
|
|
40
40
|
"columnar",
|
|
41
41
|
"filter",
|
|
42
42
|
"include_ccs_metadata",
|
|
43
|
+
"include_execution_metadata",
|
|
43
44
|
"keep_alive",
|
|
44
45
|
"keep_on_completion",
|
|
45
46
|
"locale",
|
|
@@ -71,6 +72,7 @@ class EsqlClient(NamespacedClient):
|
|
|
71
72
|
] = None,
|
|
72
73
|
human: t.Optional[bool] = None,
|
|
73
74
|
include_ccs_metadata: t.Optional[bool] = None,
|
|
75
|
+
include_execution_metadata: t.Optional[bool] = None,
|
|
74
76
|
keep_alive: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
|
|
75
77
|
keep_on_completion: t.Optional[bool] = None,
|
|
76
78
|
locale: t.Optional[str] = None,
|
|
@@ -120,7 +122,11 @@ class EsqlClient(NamespacedClient):
|
|
|
120
122
|
be returned if the async query doesn't finish within the timeout. The query
|
|
121
123
|
ID and running status are available in the `X-Elasticsearch-Async-Id` and
|
|
122
124
|
`X-Elasticsearch-Async-Is-Running` HTTP headers of the response, respectively.
|
|
123
|
-
:param include_ccs_metadata: When set to `true` and performing a cross-cluster
|
|
125
|
+
:param include_ccs_metadata: When set to `true` and performing a cross-cluster/cross-project
|
|
126
|
+
query, the response will include an extra `_clusters` object with information
|
|
127
|
+
about the clusters that participated in the search along with info such as
|
|
128
|
+
shards count.
|
|
129
|
+
:param include_execution_metadata: When set to `true` and performing a cross-cluster/cross-project
|
|
124
130
|
query, the response will include an extra `_clusters` object with information
|
|
125
131
|
about the clusters that participated in the search along with info such as
|
|
126
132
|
shards count.
|
|
@@ -180,6 +186,8 @@ class EsqlClient(NamespacedClient):
|
|
|
180
186
|
__body["filter"] = filter
|
|
181
187
|
if include_ccs_metadata is not None:
|
|
182
188
|
__body["include_ccs_metadata"] = include_ccs_metadata
|
|
189
|
+
if include_execution_metadata is not None:
|
|
190
|
+
__body["include_execution_metadata"] = include_execution_metadata
|
|
183
191
|
if keep_alive is not None:
|
|
184
192
|
__body["keep_alive"] = keep_alive
|
|
185
193
|
if keep_on_completion is not None:
|
|
@@ -486,6 +494,7 @@ class EsqlClient(NamespacedClient):
|
|
|
486
494
|
"columnar",
|
|
487
495
|
"filter",
|
|
488
496
|
"include_ccs_metadata",
|
|
497
|
+
"include_execution_metadata",
|
|
489
498
|
"locale",
|
|
490
499
|
"params",
|
|
491
500
|
"profile",
|
|
@@ -514,8 +523,16 @@ class EsqlClient(NamespacedClient):
|
|
|
514
523
|
] = None,
|
|
515
524
|
human: t.Optional[bool] = None,
|
|
516
525
|
include_ccs_metadata: t.Optional[bool] = None,
|
|
526
|
+
include_execution_metadata: t.Optional[bool] = None,
|
|
517
527
|
locale: t.Optional[str] = None,
|
|
518
|
-
params: t.Optional[
|
|
528
|
+
params: t.Optional[
|
|
529
|
+
t.Sequence[
|
|
530
|
+
t.Union[
|
|
531
|
+
t.Sequence[t.Union[None, bool, float, int, str]],
|
|
532
|
+
t.Union[None, bool, float, int, str],
|
|
533
|
+
]
|
|
534
|
+
]
|
|
535
|
+
] = None,
|
|
519
536
|
pretty: t.Optional[bool] = None,
|
|
520
537
|
profile: t.Optional[bool] = None,
|
|
521
538
|
tables: t.Optional[
|
|
@@ -554,7 +571,11 @@ class EsqlClient(NamespacedClient):
|
|
|
554
571
|
:param format: A short version of the Accept header, e.g. json, yaml. `csv`,
|
|
555
572
|
`tsv`, and `txt` formats will return results in a tabular format, excluding
|
|
556
573
|
other metadata fields from the response.
|
|
557
|
-
:param include_ccs_metadata: When set to `true` and performing a cross-cluster
|
|
574
|
+
:param include_ccs_metadata: When set to `true` and performing a cross-cluster/cross-project
|
|
575
|
+
query, the response will include an extra `_clusters` object with information
|
|
576
|
+
about the clusters that participated in the search along with info such as
|
|
577
|
+
shards count.
|
|
578
|
+
:param include_execution_metadata: When set to `true` and performing a cross-cluster/cross-project
|
|
558
579
|
query, the response will include an extra `_clusters` object with information
|
|
559
580
|
about the clusters that participated in the search along with info such as
|
|
560
581
|
shards count.
|
|
@@ -600,6 +621,8 @@ class EsqlClient(NamespacedClient):
|
|
|
600
621
|
__body["filter"] = filter
|
|
601
622
|
if include_ccs_metadata is not None:
|
|
602
623
|
__body["include_ccs_metadata"] = include_ccs_metadata
|
|
624
|
+
if include_execution_metadata is not None:
|
|
625
|
+
__body["include_execution_metadata"] = include_execution_metadata
|
|
603
626
|
if locale is not None:
|
|
604
627
|
__body["locale"] = locale
|
|
605
628
|
if params is not None:
|
|
@@ -642,11 +642,7 @@ class FleetClient(NamespacedClient):
|
|
|
642
642
|
__body["track_total_hits"] = track_total_hits
|
|
643
643
|
if version is not None:
|
|
644
644
|
__body["version"] = version
|
|
645
|
-
|
|
646
|
-
__body = None # type: ignore[assignment]
|
|
647
|
-
__headers = {"accept": "application/json"}
|
|
648
|
-
if __body is not None:
|
|
649
|
-
__headers["content-type"] = "application/json"
|
|
645
|
+
__headers = {"accept": "application/json", "content-type": "application/json"}
|
|
650
646
|
return await self.perform_request( # type: ignore[return-value]
|
|
651
647
|
"POST",
|
|
652
648
|
__path,
|
|
@@ -97,11 +97,7 @@ class GraphClient(NamespacedClient):
|
|
|
97
97
|
__body["query"] = query
|
|
98
98
|
if vertices is not None:
|
|
99
99
|
__body["vertices"] = vertices
|
|
100
|
-
|
|
101
|
-
__body = None # type: ignore[assignment]
|
|
102
|
-
__headers = {"accept": "application/json"}
|
|
103
|
-
if __body is not None:
|
|
104
|
-
__headers["content-type"] = "application/json"
|
|
100
|
+
__headers = {"accept": "application/json", "content-type": "application/json"}
|
|
105
101
|
return await self.perform_request( # type: ignore[return-value]
|
|
106
102
|
"POST",
|
|
107
103
|
__path,
|
|
@@ -383,11 +383,7 @@ class IlmClient(NamespacedClient):
|
|
|
383
383
|
__body["current_step"] = current_step
|
|
384
384
|
if next_step is not None:
|
|
385
385
|
__body["next_step"] = next_step
|
|
386
|
-
|
|
387
|
-
__body = None # type: ignore[assignment]
|
|
388
|
-
__headers = {"accept": "application/json"}
|
|
389
|
-
if __body is not None:
|
|
390
|
-
__headers["content-type"] = "application/json"
|
|
386
|
+
__headers = {"accept": "application/json", "content-type": "application/json"}
|
|
391
387
|
return await self.perform_request( # type: ignore[return-value]
|
|
392
388
|
"POST",
|
|
393
389
|
__path,
|
|
@@ -453,11 +449,7 @@ class IlmClient(NamespacedClient):
|
|
|
453
449
|
if not __body:
|
|
454
450
|
if policy is not None:
|
|
455
451
|
__body["policy"] = policy
|
|
456
|
-
|
|
457
|
-
__body = None # type: ignore[assignment]
|
|
458
|
-
__headers = {"accept": "application/json"}
|
|
459
|
-
if __body is not None:
|
|
460
|
-
__headers["content-type"] = "application/json"
|
|
452
|
+
__headers = {"accept": "application/json", "content-type": "application/json"}
|
|
461
453
|
return await self.perform_request( # type: ignore[return-value]
|
|
462
454
|
"PUT",
|
|
463
455
|
__path,
|
|
@@ -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,
|
|
@@ -1393,6 +1389,7 @@ class IndicesClient(NamespacedClient):
|
|
|
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.
|
|
1394
1390
|
Since stored fields are stored together in a compressed format, the sizes of stored fields are also estimates and can be inaccurate.
|
|
1395
1391
|
The stored size of the <code>_id</code> field is likely underestimated while the <code>_source</code> field is overestimated.</p>
|
|
1392
|
+
<p>For usage examples see the External documentation or refer to <a href="https://www.elastic.co/docs/reference/elasticsearch/rest-apis/index-disk-usage">Analyze the index disk usage example</a> for an example.</p>
|
|
1396
1393
|
|
|
1397
1394
|
|
|
1398
1395
|
`<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-disk-usage>`_
|
|
@@ -2542,6 +2539,57 @@ class IndicesClient(NamespacedClient):
|
|
|
2542
2539
|
path_parts=__path_parts,
|
|
2543
2540
|
)
|
|
2544
2541
|
|
|
2542
|
+
@_rewrite_parameters()
|
|
2543
|
+
async def get_data_stream_mappings(
|
|
2544
|
+
self,
|
|
2545
|
+
*,
|
|
2546
|
+
name: t.Union[str, t.Sequence[str]],
|
|
2547
|
+
error_trace: t.Optional[bool] = None,
|
|
2548
|
+
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
2549
|
+
human: t.Optional[bool] = None,
|
|
2550
|
+
master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
|
|
2551
|
+
pretty: t.Optional[bool] = None,
|
|
2552
|
+
) -> ObjectApiResponse[t.Any]:
|
|
2553
|
+
"""
|
|
2554
|
+
.. raw:: html
|
|
2555
|
+
|
|
2556
|
+
<p>Get data stream mappings.</p>
|
|
2557
|
+
<p>Get mapping information for one or more data streams.</p>
|
|
2558
|
+
|
|
2559
|
+
|
|
2560
|
+
`<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-get-data-stream-mappings>`_
|
|
2561
|
+
|
|
2562
|
+
:param name: A comma-separated list of data streams or data stream patterns.
|
|
2563
|
+
Supports wildcards (`*`).
|
|
2564
|
+
:param master_timeout: The period to wait for a connection to the master node.
|
|
2565
|
+
If no response is received before the timeout expires, the request fails
|
|
2566
|
+
and returns an error.
|
|
2567
|
+
"""
|
|
2568
|
+
if name in SKIP_IN_PATH:
|
|
2569
|
+
raise ValueError("Empty value passed for parameter 'name'")
|
|
2570
|
+
__path_parts: t.Dict[str, str] = {"name": _quote(name)}
|
|
2571
|
+
__path = f'/_data_stream/{__path_parts["name"]}/_mappings'
|
|
2572
|
+
__query: t.Dict[str, t.Any] = {}
|
|
2573
|
+
if error_trace is not None:
|
|
2574
|
+
__query["error_trace"] = error_trace
|
|
2575
|
+
if filter_path is not None:
|
|
2576
|
+
__query["filter_path"] = filter_path
|
|
2577
|
+
if human is not None:
|
|
2578
|
+
__query["human"] = human
|
|
2579
|
+
if master_timeout is not None:
|
|
2580
|
+
__query["master_timeout"] = master_timeout
|
|
2581
|
+
if pretty is not None:
|
|
2582
|
+
__query["pretty"] = pretty
|
|
2583
|
+
__headers = {"accept": "application/json"}
|
|
2584
|
+
return await self.perform_request( # type: ignore[return-value]
|
|
2585
|
+
"GET",
|
|
2586
|
+
__path,
|
|
2587
|
+
params=__query,
|
|
2588
|
+
headers=__headers,
|
|
2589
|
+
endpoint_id="indices.get_data_stream_mappings",
|
|
2590
|
+
path_parts=__path_parts,
|
|
2591
|
+
)
|
|
2592
|
+
|
|
2545
2593
|
@_rewrite_parameters()
|
|
2546
2594
|
async def get_data_stream_options(
|
|
2547
2595
|
self,
|
|
@@ -3638,11 +3686,7 @@ class IndicesClient(NamespacedClient):
|
|
|
3638
3686
|
__body["downsampling"] = downsampling
|
|
3639
3687
|
if enabled is not None:
|
|
3640
3688
|
__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"
|
|
3689
|
+
__headers = {"accept": "application/json", "content-type": "application/json"}
|
|
3646
3690
|
return await self.perform_request( # type: ignore[return-value]
|
|
3647
3691
|
"PUT",
|
|
3648
3692
|
__path,
|
|
@@ -3653,6 +3697,83 @@ class IndicesClient(NamespacedClient):
|
|
|
3653
3697
|
path_parts=__path_parts,
|
|
3654
3698
|
)
|
|
3655
3699
|
|
|
3700
|
+
@_rewrite_parameters(
|
|
3701
|
+
body_name="mappings",
|
|
3702
|
+
)
|
|
3703
|
+
async def put_data_stream_mappings(
|
|
3704
|
+
self,
|
|
3705
|
+
*,
|
|
3706
|
+
name: t.Union[str, t.Sequence[str]],
|
|
3707
|
+
mappings: t.Optional[t.Mapping[str, t.Any]] = None,
|
|
3708
|
+
body: t.Optional[t.Mapping[str, t.Any]] = None,
|
|
3709
|
+
dry_run: t.Optional[bool] = None,
|
|
3710
|
+
error_trace: t.Optional[bool] = None,
|
|
3711
|
+
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
3712
|
+
human: t.Optional[bool] = None,
|
|
3713
|
+
master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
|
|
3714
|
+
pretty: t.Optional[bool] = None,
|
|
3715
|
+
timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
|
|
3716
|
+
) -> ObjectApiResponse[t.Any]:
|
|
3717
|
+
"""
|
|
3718
|
+
.. raw:: html
|
|
3719
|
+
|
|
3720
|
+
<p>Update data stream mappings.</p>
|
|
3721
|
+
<p>This API can be used to override mappings on specific data streams. These overrides will take precedence over what
|
|
3722
|
+
is specified in the template that the data stream matches. The mapping change is only applied to new write indices
|
|
3723
|
+
that are created during rollover after this API is called. No indices are changed by this API.</p>
|
|
3724
|
+
|
|
3725
|
+
|
|
3726
|
+
`<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-put-data-stream-mappings>`_
|
|
3727
|
+
|
|
3728
|
+
:param name: A comma-separated list of data streams or data stream patterns.
|
|
3729
|
+
:param mappings:
|
|
3730
|
+
:param dry_run: If `true`, the request does not actually change the mappings
|
|
3731
|
+
on any data streams. Instead, it simulates changing the settings and reports
|
|
3732
|
+
back to the user what would have happened had these settings actually been
|
|
3733
|
+
applied.
|
|
3734
|
+
:param master_timeout: The period to wait for a connection to the master node.
|
|
3735
|
+
If no response is received before the timeout expires, the request fails
|
|
3736
|
+
and returns an error.
|
|
3737
|
+
:param timeout: The period to wait for a response. If no response is received
|
|
3738
|
+
before the timeout expires, the request fails and returns an error.
|
|
3739
|
+
"""
|
|
3740
|
+
if name in SKIP_IN_PATH:
|
|
3741
|
+
raise ValueError("Empty value passed for parameter 'name'")
|
|
3742
|
+
if mappings is None and body is None:
|
|
3743
|
+
raise ValueError(
|
|
3744
|
+
"Empty value passed for parameters 'mappings' and 'body', one of them should be set."
|
|
3745
|
+
)
|
|
3746
|
+
elif mappings is not None and body is not None:
|
|
3747
|
+
raise ValueError("Cannot set both 'mappings' and 'body'")
|
|
3748
|
+
__path_parts: t.Dict[str, str] = {"name": _quote(name)}
|
|
3749
|
+
__path = f'/_data_stream/{__path_parts["name"]}/_mappings'
|
|
3750
|
+
__query: t.Dict[str, t.Any] = {}
|
|
3751
|
+
if dry_run is not None:
|
|
3752
|
+
__query["dry_run"] = dry_run
|
|
3753
|
+
if error_trace is not None:
|
|
3754
|
+
__query["error_trace"] = error_trace
|
|
3755
|
+
if filter_path is not None:
|
|
3756
|
+
__query["filter_path"] = filter_path
|
|
3757
|
+
if human is not None:
|
|
3758
|
+
__query["human"] = human
|
|
3759
|
+
if master_timeout is not None:
|
|
3760
|
+
__query["master_timeout"] = master_timeout
|
|
3761
|
+
if pretty is not None:
|
|
3762
|
+
__query["pretty"] = pretty
|
|
3763
|
+
if timeout is not None:
|
|
3764
|
+
__query["timeout"] = timeout
|
|
3765
|
+
__body = mappings if mappings is not None else body
|
|
3766
|
+
__headers = {"accept": "application/json", "content-type": "application/json"}
|
|
3767
|
+
return await self.perform_request( # type: ignore[return-value]
|
|
3768
|
+
"PUT",
|
|
3769
|
+
__path,
|
|
3770
|
+
params=__query,
|
|
3771
|
+
headers=__headers,
|
|
3772
|
+
body=__body,
|
|
3773
|
+
endpoint_id="indices.put_data_stream_mappings",
|
|
3774
|
+
path_parts=__path_parts,
|
|
3775
|
+
)
|
|
3776
|
+
|
|
3656
3777
|
@_rewrite_parameters(
|
|
3657
3778
|
body_fields=("failure_store",),
|
|
3658
3779
|
)
|
|
@@ -3721,11 +3842,7 @@ class IndicesClient(NamespacedClient):
|
|
|
3721
3842
|
if not __body:
|
|
3722
3843
|
if failure_store is not None:
|
|
3723
3844
|
__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"
|
|
3845
|
+
__headers = {"accept": "application/json", "content-type": "application/json"}
|
|
3729
3846
|
return await self.perform_request( # type: ignore[return-value]
|
|
3730
3847
|
"PUT",
|
|
3731
3848
|
__path,
|
|
@@ -4938,7 +5055,18 @@ class IndicesClient(NamespacedClient):
|
|
|
4938
5055
|
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
4939
5056
|
human: t.Optional[bool] = None,
|
|
4940
5057
|
ignore_unavailable: t.Optional[bool] = None,
|
|
5058
|
+
mode: t.Optional[
|
|
5059
|
+
t.Union[
|
|
5060
|
+
t.Sequence[
|
|
5061
|
+
t.Union[
|
|
5062
|
+
str, t.Literal["logsdb", "lookup", "standard", "time_series"]
|
|
5063
|
+
]
|
|
5064
|
+
],
|
|
5065
|
+
t.Union[str, t.Literal["logsdb", "lookup", "standard", "time_series"]],
|
|
5066
|
+
]
|
|
5067
|
+
] = None,
|
|
4941
5068
|
pretty: t.Optional[bool] = None,
|
|
5069
|
+
project_routing: t.Optional[str] = None,
|
|
4942
5070
|
) -> ObjectApiResponse[t.Any]:
|
|
4943
5071
|
"""
|
|
4944
5072
|
.. raw:: html
|
|
@@ -4964,6 +5092,12 @@ class IndicesClient(NamespacedClient):
|
|
|
4964
5092
|
as `open,hidden`.
|
|
4965
5093
|
:param ignore_unavailable: If `false`, the request returns an error if it targets
|
|
4966
5094
|
a missing or closed index.
|
|
5095
|
+
:param mode: Filter indices by index mode - standard, lookup, time_series, etc.
|
|
5096
|
+
Comma-separated list of IndexMode. Empty means no filter.
|
|
5097
|
+
:param project_routing: Specifies a subset of projects to target using project
|
|
5098
|
+
metadata tags in a subset of Lucene query syntax. Allowed Lucene queries:
|
|
5099
|
+
the _alias tag and a single value (possibly wildcarded). Examples: _alias:my-project
|
|
5100
|
+
_alias:_origin _alias:*pr* Supported in serverless only.
|
|
4967
5101
|
"""
|
|
4968
5102
|
if name in SKIP_IN_PATH:
|
|
4969
5103
|
raise ValueError("Empty value passed for parameter 'name'")
|
|
@@ -4982,8 +5116,12 @@ class IndicesClient(NamespacedClient):
|
|
|
4982
5116
|
__query["human"] = human
|
|
4983
5117
|
if ignore_unavailable is not None:
|
|
4984
5118
|
__query["ignore_unavailable"] = ignore_unavailable
|
|
5119
|
+
if mode is not None:
|
|
5120
|
+
__query["mode"] = mode
|
|
4985
5121
|
if pretty is not None:
|
|
4986
5122
|
__query["pretty"] = pretty
|
|
5123
|
+
if project_routing is not None:
|
|
5124
|
+
__query["project_routing"] = project_routing
|
|
4987
5125
|
__headers = {"accept": "application/json"}
|
|
4988
5126
|
return await self.perform_request( # type: ignore[return-value]
|
|
4989
5127
|
"GET",
|
|
@@ -5023,7 +5161,7 @@ class IndicesClient(NamespacedClient):
|
|
|
5023
5161
|
.. raw:: html
|
|
5024
5162
|
|
|
5025
5163
|
<p>Roll over to a new index.
|
|
5026
|
-
TIP:
|
|
5164
|
+
TIP: We recommend using the index lifecycle rollover action to automate rollovers. However, Serverless does not support Index Lifecycle Management (ILM), so don't use this approach in the Serverless context.</p>
|
|
5027
5165
|
<p>The rollover API creates a new index for a data stream or index alias.
|
|
5028
5166
|
The API behavior depends on the rollover target.</p>
|
|
5029
5167
|
<p><strong>Roll over a data stream</strong></p>
|
|
@@ -5400,11 +5538,7 @@ class IndicesClient(NamespacedClient):
|
|
|
5400
5538
|
__body["aliases"] = aliases
|
|
5401
5539
|
if settings is not None:
|
|
5402
5540
|
__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"
|
|
5541
|
+
__headers = {"accept": "application/json", "content-type": "application/json"}
|
|
5408
5542
|
return await self.perform_request( # type: ignore[return-value]
|
|
5409
5543
|
"PUT",
|
|
5410
5544
|
__path,
|
|
@@ -5756,11 +5890,7 @@ class IndicesClient(NamespacedClient):
|
|
|
5756
5890
|
__body["aliases"] = aliases
|
|
5757
5891
|
if settings is not None:
|
|
5758
5892
|
__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"
|
|
5893
|
+
__headers = {"accept": "application/json", "content-type": "application/json"}
|
|
5764
5894
|
return await self.perform_request( # type: ignore[return-value]
|
|
5765
5895
|
"PUT",
|
|
5766
5896
|
__path,
|
|
@@ -6004,8 +6134,8 @@ class IndicesClient(NamespacedClient):
|
|
|
6004
6134
|
:param analyze_wildcard: If `true`, wildcard and prefix queries are analyzed.
|
|
6005
6135
|
:param analyzer: Analyzer to use for the query string. This parameter can only
|
|
6006
6136
|
be used when the `q` query string parameter is specified.
|
|
6007
|
-
:param default_operator: The default operator for query string query: `
|
|
6008
|
-
`
|
|
6137
|
+
:param default_operator: The default operator for query string query: `and` or
|
|
6138
|
+
`or`.
|
|
6009
6139
|
:param df: Field to use as default where no field prefix is given in the query
|
|
6010
6140
|
string. This parameter can only be used when the `q` query string parameter
|
|
6011
6141
|
is specified.
|