elasticsearch 8.16.0__py3-none-any.whl → 8.17.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 +234 -96
- elasticsearch/_async/client/async_search.py +12 -22
- elasticsearch/_async/client/autoscaling.py +39 -4
- elasticsearch/_async/client/cat.py +90 -221
- elasticsearch/_async/client/ccr.py +85 -35
- elasticsearch/_async/client/cluster.py +160 -68
- elasticsearch/_async/client/connector.py +362 -25
- elasticsearch/_async/client/dangling_indices.py +3 -3
- elasticsearch/_async/client/enrich.py +6 -6
- elasticsearch/_async/client/eql.py +13 -11
- elasticsearch/_async/client/esql.py +3 -2
- elasticsearch/_async/client/features.py +27 -5
- elasticsearch/_async/client/fleet.py +1 -1
- elasticsearch/_async/client/graph.py +9 -3
- elasticsearch/_async/client/ilm.py +74 -39
- elasticsearch/_async/client/indices.py +633 -152
- elasticsearch/_async/client/inference.py +99 -16
- elasticsearch/_async/client/ingest.py +201 -23
- elasticsearch/_async/client/license.py +38 -22
- elasticsearch/_async/client/logstash.py +12 -9
- elasticsearch/_async/client/migration.py +17 -8
- elasticsearch/_async/client/ml.py +137 -79
- elasticsearch/_async/client/monitoring.py +3 -2
- elasticsearch/_async/client/nodes.py +37 -23
- elasticsearch/_async/client/query_rules.py +47 -25
- elasticsearch/_async/client/rollup.py +96 -21
- elasticsearch/_async/client/search_application.py +138 -9
- elasticsearch/_async/client/searchable_snapshots.py +33 -24
- elasticsearch/_async/client/security.py +751 -123
- elasticsearch/_async/client/shutdown.py +38 -15
- elasticsearch/_async/client/simulate.py +151 -0
- elasticsearch/_async/client/slm.py +147 -28
- elasticsearch/_async/client/snapshot.py +309 -25
- elasticsearch/_async/client/sql.py +79 -58
- elasticsearch/_async/client/ssl.py +1 -1
- elasticsearch/_async/client/synonyms.py +52 -29
- elasticsearch/_async/client/tasks.py +71 -31
- elasticsearch/_async/client/text_structure.py +468 -48
- elasticsearch/_async/client/transform.py +21 -14
- elasticsearch/_async/client/watcher.py +226 -60
- elasticsearch/_async/client/xpack.py +13 -8
- elasticsearch/_sync/client/__init__.py +234 -96
- elasticsearch/_sync/client/async_search.py +12 -22
- elasticsearch/_sync/client/autoscaling.py +39 -4
- elasticsearch/_sync/client/cat.py +90 -221
- elasticsearch/_sync/client/ccr.py +85 -35
- elasticsearch/_sync/client/cluster.py +160 -68
- elasticsearch/_sync/client/connector.py +362 -25
- elasticsearch/_sync/client/dangling_indices.py +3 -3
- elasticsearch/_sync/client/enrich.py +6 -6
- elasticsearch/_sync/client/eql.py +13 -11
- elasticsearch/_sync/client/esql.py +3 -2
- elasticsearch/_sync/client/features.py +27 -5
- elasticsearch/_sync/client/fleet.py +1 -1
- elasticsearch/_sync/client/graph.py +9 -3
- elasticsearch/_sync/client/ilm.py +74 -39
- elasticsearch/_sync/client/indices.py +633 -152
- elasticsearch/_sync/client/inference.py +99 -16
- elasticsearch/_sync/client/ingest.py +201 -23
- elasticsearch/_sync/client/license.py +38 -22
- elasticsearch/_sync/client/logstash.py +12 -9
- elasticsearch/_sync/client/migration.py +17 -8
- elasticsearch/_sync/client/ml.py +137 -79
- elasticsearch/_sync/client/monitoring.py +3 -2
- elasticsearch/_sync/client/nodes.py +37 -23
- elasticsearch/_sync/client/query_rules.py +47 -25
- elasticsearch/_sync/client/rollup.py +96 -21
- elasticsearch/_sync/client/search_application.py +138 -9
- elasticsearch/_sync/client/searchable_snapshots.py +33 -24
- elasticsearch/_sync/client/security.py +751 -123
- elasticsearch/_sync/client/shutdown.py +38 -15
- elasticsearch/_sync/client/simulate.py +151 -0
- elasticsearch/_sync/client/slm.py +147 -28
- elasticsearch/_sync/client/snapshot.py +309 -25
- elasticsearch/_sync/client/sql.py +79 -58
- elasticsearch/_sync/client/ssl.py +1 -1
- elasticsearch/_sync/client/synonyms.py +52 -29
- elasticsearch/_sync/client/tasks.py +71 -31
- elasticsearch/_sync/client/text_structure.py +468 -48
- elasticsearch/_sync/client/transform.py +21 -14
- elasticsearch/_sync/client/watcher.py +226 -60
- elasticsearch/_sync/client/xpack.py +13 -8
- elasticsearch/_version.py +1 -1
- elasticsearch/client.py +2 -0
- {elasticsearch-8.16.0.dist-info → elasticsearch-8.17.1.dist-info}/METADATA +6 -4
- elasticsearch-8.17.1.dist-info/RECORD +119 -0
- {elasticsearch-8.16.0.dist-info → elasticsearch-8.17.1.dist-info}/WHEEL +1 -1
- elasticsearch-8.16.0.dist-info/RECORD +0 -117
- {elasticsearch-8.16.0.dist-info → elasticsearch-8.17.1.dist-info}/licenses/LICENSE +0 -0
- {elasticsearch-8.16.0.dist-info → elasticsearch-8.17.1.dist-info}/licenses/NOTICE +0 -0
|
@@ -70,6 +70,7 @@ from .search_application import SearchApplicationClient
|
|
|
70
70
|
from .searchable_snapshots import SearchableSnapshotsClient
|
|
71
71
|
from .security import SecurityClient
|
|
72
72
|
from .shutdown import ShutdownClient
|
|
73
|
+
from .simulate import SimulateClient
|
|
73
74
|
from .slm import SlmClient
|
|
74
75
|
from .snapshot import SnapshotClient
|
|
75
76
|
from .sql import SqlClient
|
|
@@ -465,6 +466,7 @@ class Elasticsearch(BaseClient):
|
|
|
465
466
|
self.searchable_snapshots = SearchableSnapshotsClient(self)
|
|
466
467
|
self.security = SecurityClient(self)
|
|
467
468
|
self.slm = SlmClient(self)
|
|
469
|
+
self.simulate = SimulateClient(self)
|
|
468
470
|
self.shutdown = ShutdownClient(self)
|
|
469
471
|
self.sql = SqlClient(self)
|
|
470
472
|
self.ssl = SslClient(self)
|
|
@@ -624,12 +626,14 @@ class Elasticsearch(BaseClient):
|
|
|
624
626
|
error_trace: t.Optional[bool] = None,
|
|
625
627
|
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
626
628
|
human: t.Optional[bool] = None,
|
|
629
|
+
list_executed_pipelines: t.Optional[bool] = None,
|
|
627
630
|
pipeline: t.Optional[str] = None,
|
|
628
631
|
pretty: t.Optional[bool] = None,
|
|
629
632
|
refresh: t.Optional[
|
|
630
633
|
t.Union[bool, str, t.Literal["false", "true", "wait_for"]]
|
|
631
634
|
] = None,
|
|
632
635
|
require_alias: t.Optional[bool] = None,
|
|
636
|
+
require_data_stream: t.Optional[bool] = None,
|
|
633
637
|
routing: t.Optional[str] = None,
|
|
634
638
|
source: t.Optional[t.Union[bool, t.Union[str, t.Sequence[str]]]] = None,
|
|
635
639
|
source_excludes: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
@@ -640,37 +644,125 @@ class Elasticsearch(BaseClient):
|
|
|
640
644
|
] = None,
|
|
641
645
|
) -> ObjectApiResponse[t.Any]:
|
|
642
646
|
"""
|
|
643
|
-
Bulk index or delete documents.
|
|
644
|
-
in a single
|
|
645
|
-
speed.
|
|
646
|
-
|
|
647
|
-
|
|
647
|
+
Bulk index or delete documents. Perform multiple `index`, `create`, `delete`,
|
|
648
|
+
and `update` actions in a single request. This reduces overhead and can greatly
|
|
649
|
+
increase indexing speed. If the Elasticsearch security features are enabled,
|
|
650
|
+
you must have the following index privileges for the target data stream, index,
|
|
651
|
+
or index alias: * To use the `create` action, you must have the `create_doc`,
|
|
652
|
+
`create`, `index`, or `write` index privilege. Data streams support only the
|
|
653
|
+
`create` action. * To use the `index` action, you must have the `create`, `index`,
|
|
654
|
+
or `write` index privilege. * To use the `delete` action, you must have the `delete`
|
|
655
|
+
or `write` index privilege. * To use the `update` action, you must have the `index`
|
|
656
|
+
or `write` index privilege. * To automatically create a data stream or index
|
|
657
|
+
with a bulk API request, you must have the `auto_configure`, `create_index`,
|
|
658
|
+
or `manage` index privilege. * To make the result of a bulk operation visible
|
|
659
|
+
to search using the `refresh` parameter, you must have the `maintenance` or `manage`
|
|
660
|
+
index privilege. Automatic data stream creation requires a matching index template
|
|
661
|
+
with data stream enabled. The actions are specified in the request body using
|
|
662
|
+
a newline delimited JSON (NDJSON) structure: ``` action_and_meta_data\\n optional_source\\n
|
|
663
|
+
action_and_meta_data\\n optional_source\\n .... action_and_meta_data\\n optional_source\\n
|
|
664
|
+
``` The `index` and `create` actions expect a source on the next line and have
|
|
665
|
+
the same semantics as the `op_type` parameter in the standard index API. A `create`
|
|
666
|
+
action fails if a document with the same ID already exists in the target An `index`
|
|
667
|
+
action adds or replaces a document as necessary. NOTE: Data streams support only
|
|
668
|
+
the `create` action. To update or delete a document in a data stream, you must
|
|
669
|
+
target the backing index containing the document. An `update` action expects
|
|
670
|
+
that the partial doc, upsert, and script and its options are specified on the
|
|
671
|
+
next line. A `delete` action does not expect a source on the next line and has
|
|
672
|
+
the same semantics as the standard delete API. NOTE: The final line of data must
|
|
673
|
+
end with a newline character (`\\n`). Each newline character may be preceded
|
|
674
|
+
by a carriage return (`\\r`). When sending NDJSON data to the `_bulk` endpoint,
|
|
675
|
+
use a `Content-Type` header of `application/json` or `application/x-ndjson`.
|
|
676
|
+
Because this format uses literal newline characters (`\\n`) as delimiters, make
|
|
677
|
+
sure that the JSON actions and sources are not pretty printed. If you provide
|
|
678
|
+
a target in the request path, it is used for any actions that don't explicitly
|
|
679
|
+
specify an `_index` argument. A note on the format: the idea here is to make
|
|
680
|
+
processing as fast as possible. As some of the actions are redirected to other
|
|
681
|
+
shards on other nodes, only `action_meta_data` is parsed on the receiving node
|
|
682
|
+
side. Client libraries using this protocol should try and strive to do something
|
|
683
|
+
similar on the client side, and reduce buffering as much as possible. There is
|
|
684
|
+
no "correct" number of actions to perform in a single bulk request. Experiment
|
|
685
|
+
with different settings to find the optimal size for your particular workload.
|
|
686
|
+
Note that Elasticsearch limits the maximum size of a HTTP request to 100mb by
|
|
687
|
+
default so clients must ensure that no request exceeds this size. It is not possible
|
|
688
|
+
to index a single document that exceeds the size limit, so you must pre-process
|
|
689
|
+
any such documents into smaller pieces before sending them to Elasticsearch.
|
|
690
|
+
For instance, split documents into pages or chapters before indexing them, or
|
|
691
|
+
store raw binary data in a system outside Elasticsearch and replace the raw data
|
|
692
|
+
with a link to the external system in the documents that you send to Elasticsearch.
|
|
693
|
+
**Client suppport for bulk requests** Some of the officially supported clients
|
|
694
|
+
provide helpers to assist with bulk requests and reindexing: * Go: Check out
|
|
695
|
+
`esutil.BulkIndexer` * Perl: Check out `Search::Elasticsearch::Client::5_0::Bulk`
|
|
696
|
+
and `Search::Elasticsearch::Client::5_0::Scroll` * Python: Check out `elasticsearch.helpers.*`
|
|
697
|
+
* JavaScript: Check out `client.helpers.*` * .NET: Check out `BulkAllObservable`
|
|
698
|
+
* PHP: Check out bulk indexing. **Submitting bulk requests with cURL** If you're
|
|
699
|
+
providing text file input to `curl`, you must use the `--data-binary` flag instead
|
|
700
|
+
of plain `-d`. The latter doesn't preserve newlines. For example: ``` $ cat requests
|
|
701
|
+
{ "index" : { "_index" : "test", "_id" : "1" } } { "field1" : "value1" } $ curl
|
|
702
|
+
-s -H "Content-Type: application/x-ndjson" -XPOST localhost:9200/_bulk --data-binary
|
|
703
|
+
"@requests"; echo {"took":7, "errors": false, "items":[{"index":{"_index":"test","_id":"1","_version":1,"result":"created","forced_refresh":false}}]}
|
|
704
|
+
``` **Optimistic concurrency control** Each `index` and `delete` action within
|
|
705
|
+
a bulk API call may include the `if_seq_no` and `if_primary_term` parameters
|
|
706
|
+
in their respective action and meta data lines. The `if_seq_no` and `if_primary_term`
|
|
707
|
+
parameters control how operations are run, based on the last modification to
|
|
708
|
+
existing documents. See Optimistic concurrency control for more details. **Versioning**
|
|
709
|
+
Each bulk item can include the version value using the `version` field. It automatically
|
|
710
|
+
follows the behavior of the index or delete operation based on the `_version`
|
|
711
|
+
mapping. It also support the `version_type`. **Routing** Each bulk item can include
|
|
712
|
+
the routing value using the `routing` field. It automatically follows the behavior
|
|
713
|
+
of the index or delete operation based on the `_routing` mapping. NOTE: Data
|
|
714
|
+
streams do not support custom routing unless they were created with the `allow_custom_routing`
|
|
715
|
+
setting enabled in the template. **Wait for active shards** When making bulk
|
|
716
|
+
calls, you can set the `wait_for_active_shards` parameter to require a minimum
|
|
717
|
+
number of shard copies to be active before starting to process the bulk request.
|
|
718
|
+
**Refresh** Control when the changes made by this request are visible to search.
|
|
719
|
+
NOTE: Only the shards that receive the bulk request will be affected by refresh.
|
|
720
|
+
Imagine a `_bulk?refresh=wait_for` request with three documents in it that happen
|
|
721
|
+
to be routed to different shards in an index with five shards. The request will
|
|
722
|
+
only wait for those three shards to refresh. The other two shards that make up
|
|
723
|
+
the index do not participate in the `_bulk` request at all.
|
|
724
|
+
|
|
725
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/docs-bulk.html>`_
|
|
648
726
|
|
|
649
727
|
:param operations:
|
|
650
|
-
:param index:
|
|
728
|
+
:param index: The name of the data stream, index, or index alias to perform bulk
|
|
651
729
|
actions on.
|
|
652
|
-
:param
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
730
|
+
:param list_executed_pipelines: If `true`, the response will include the ingest
|
|
731
|
+
pipelines that were run for each index or create.
|
|
732
|
+
:param pipeline: The pipeline identifier to use to preprocess incoming documents.
|
|
733
|
+
If the index has a default ingest pipeline specified, setting the value to
|
|
734
|
+
`_none` turns off the default ingest pipeline for this request. If a final
|
|
735
|
+
pipeline is configured, it will always run regardless of the value of this
|
|
656
736
|
parameter.
|
|
657
737
|
:param refresh: If `true`, Elasticsearch refreshes the affected shards to make
|
|
658
|
-
this operation visible to search
|
|
659
|
-
|
|
738
|
+
this operation visible to search. If `wait_for`, wait for a refresh to make
|
|
739
|
+
this operation visible to search. If `false`, do nothing with refreshes.
|
|
660
740
|
Valid values: `true`, `false`, `wait_for`.
|
|
661
|
-
:param require_alias: If `true`, the request
|
|
662
|
-
:param
|
|
663
|
-
|
|
664
|
-
|
|
741
|
+
:param require_alias: If `true`, the request's actions must target an index alias.
|
|
742
|
+
:param require_data_stream: If `true`, the request's actions must target a data
|
|
743
|
+
stream (existing or to be created).
|
|
744
|
+
:param routing: A custom value that is used to route operations to a specific
|
|
745
|
+
shard.
|
|
746
|
+
:param source: Indicates whether to return the `_source` field (`true` or `false`)
|
|
747
|
+
or contains a list of fields to return.
|
|
665
748
|
:param source_excludes: A comma-separated list of source fields to exclude from
|
|
666
|
-
the response.
|
|
749
|
+
the response. You can also use this parameter to exclude fields from the
|
|
750
|
+
subset specified in `_source_includes` query parameter. If the `_source`
|
|
751
|
+
parameter is `false`, this parameter is ignored.
|
|
667
752
|
:param source_includes: A comma-separated list of source fields to include in
|
|
668
|
-
the response.
|
|
669
|
-
|
|
670
|
-
|
|
753
|
+
the response. If this parameter is specified, only these source fields are
|
|
754
|
+
returned. You can exclude fields from this subset using the `_source_excludes`
|
|
755
|
+
query parameter. If the `_source` parameter is `false`, this parameter is
|
|
756
|
+
ignored.
|
|
757
|
+
:param timeout: The period each action waits for the following operations: automatic
|
|
758
|
+
index creation, dynamic mapping updates, and waiting for active shards. The
|
|
759
|
+
default is `1m` (one minute), which guarantees Elasticsearch waits for at
|
|
760
|
+
least the timeout before failing. The actual wait time could be longer, particularly
|
|
761
|
+
when multiple waits occur.
|
|
671
762
|
:param wait_for_active_shards: The number of shard copies that must be active
|
|
672
|
-
before proceeding with the operation. Set to all or any positive integer
|
|
673
|
-
up to the total number of shards in the index (`number_of_replicas+1`).
|
|
763
|
+
before proceeding with the operation. Set to `all` or any positive integer
|
|
764
|
+
up to the total number of shards in the index (`number_of_replicas+1`). The
|
|
765
|
+
default is `1`, which waits for each primary shard to be active.
|
|
674
766
|
"""
|
|
675
767
|
if operations is None and body is None:
|
|
676
768
|
raise ValueError(
|
|
@@ -692,6 +784,8 @@ class Elasticsearch(BaseClient):
|
|
|
692
784
|
__query["filter_path"] = filter_path
|
|
693
785
|
if human is not None:
|
|
694
786
|
__query["human"] = human
|
|
787
|
+
if list_executed_pipelines is not None:
|
|
788
|
+
__query["list_executed_pipelines"] = list_executed_pipelines
|
|
695
789
|
if pipeline is not None:
|
|
696
790
|
__query["pipeline"] = pipeline
|
|
697
791
|
if pretty is not None:
|
|
@@ -700,6 +794,8 @@ class Elasticsearch(BaseClient):
|
|
|
700
794
|
__query["refresh"] = refresh
|
|
701
795
|
if require_alias is not None:
|
|
702
796
|
__query["require_alias"] = require_alias
|
|
797
|
+
if require_data_stream is not None:
|
|
798
|
+
__query["require_data_stream"] = require_data_stream
|
|
703
799
|
if routing is not None:
|
|
704
800
|
__query["routing"] = routing
|
|
705
801
|
if source is not None:
|
|
@@ -744,9 +840,9 @@ class Elasticsearch(BaseClient):
|
|
|
744
840
|
Clear a scrolling search. Clear the search context and results for a scrolling
|
|
745
841
|
search.
|
|
746
842
|
|
|
747
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
843
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/clear-scroll-api.html>`_
|
|
748
844
|
|
|
749
|
-
:param scroll_id:
|
|
845
|
+
:param scroll_id: The scroll IDs to clear. To clear all scroll IDs, use `_all`.
|
|
750
846
|
"""
|
|
751
847
|
__path_parts: t.Dict[str, str] = {}
|
|
752
848
|
__path = "/_search/scroll"
|
|
@@ -798,7 +894,7 @@ class Elasticsearch(BaseClient):
|
|
|
798
894
|
period has elapsed. However, keeping points in time has a cost; close them as
|
|
799
895
|
soon as they are no longer required for search requests.
|
|
800
896
|
|
|
801
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
897
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/point-in-time-api.html>`_
|
|
802
898
|
|
|
803
899
|
:param id: The ID of the point-in-time.
|
|
804
900
|
"""
|
|
@@ -870,46 +966,62 @@ class Elasticsearch(BaseClient):
|
|
|
870
966
|
body: t.Optional[t.Dict[str, t.Any]] = None,
|
|
871
967
|
) -> ObjectApiResponse[t.Any]:
|
|
872
968
|
"""
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
969
|
+
Count search results. Get the number of documents matching a query. The query
|
|
970
|
+
can either be provided using a simple query string as a parameter or using the
|
|
971
|
+
Query DSL defined within the request body. The latter must be nested in a `query`
|
|
972
|
+
key, which is the same as the search API. The count API supports multi-target
|
|
973
|
+
syntax. You can run a single count API search across multiple data streams and
|
|
974
|
+
indices. The operation is broadcast across all shards. For each shard ID group,
|
|
975
|
+
a replica is chosen and the search is run against it. This means that replicas
|
|
976
|
+
increase the scalability of the count.
|
|
977
|
+
|
|
978
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/search-count.html>`_
|
|
979
|
+
|
|
980
|
+
:param index: A comma-separated list of data streams, indices, and aliases to
|
|
981
|
+
search. It supports wildcards (`*`). To search all data streams and indices,
|
|
982
|
+
omit this parameter or use `*` or `_all`.
|
|
880
983
|
:param allow_no_indices: If `false`, the request returns an error if any wildcard
|
|
881
984
|
expression, index alias, or `_all` value targets only missing or closed indices.
|
|
882
|
-
This behavior applies even if the request targets other open indices.
|
|
985
|
+
This behavior applies even if the request targets other open indices. For
|
|
986
|
+
example, a request targeting `foo*,bar*` returns an error if an index starts
|
|
987
|
+
with `foo` but no index starts with `bar`.
|
|
883
988
|
:param analyze_wildcard: If `true`, wildcard and prefix queries are analyzed.
|
|
884
|
-
This parameter can
|
|
885
|
-
:param analyzer:
|
|
886
|
-
be used when the `q` query string parameter is specified.
|
|
989
|
+
This parameter can be used only when the `q` query string parameter is specified.
|
|
990
|
+
:param analyzer: The analyzer to use for the query string. This parameter can
|
|
991
|
+
be used only when the `q` query string parameter is specified.
|
|
887
992
|
:param default_operator: The default operator for query string query: `AND` or
|
|
888
|
-
`OR`. This parameter can
|
|
993
|
+
`OR`. This parameter can be used only when the `q` query string parameter
|
|
889
994
|
is specified.
|
|
890
|
-
:param df:
|
|
891
|
-
string. This parameter can
|
|
995
|
+
:param df: The field to use as a default when no field prefix is given in the
|
|
996
|
+
query string. This parameter can be used only when the `q` query string parameter
|
|
892
997
|
is specified.
|
|
893
|
-
:param expand_wildcards:
|
|
894
|
-
request can target data streams, this argument determines whether
|
|
895
|
-
expressions match hidden data streams.
|
|
896
|
-
as `open,hidden`.
|
|
897
|
-
:param ignore_throttled: If `true`, concrete, expanded or aliased indices are
|
|
998
|
+
:param expand_wildcards: The type of index that wildcard patterns can match.
|
|
999
|
+
If the request can target data streams, this argument determines whether
|
|
1000
|
+
wildcard expressions match hidden data streams. It supports comma-separated
|
|
1001
|
+
values, such as `open,hidden`.
|
|
1002
|
+
:param ignore_throttled: If `true`, concrete, expanded, or aliased indices are
|
|
898
1003
|
ignored when frozen.
|
|
899
1004
|
:param ignore_unavailable: If `false`, the request returns an error if it targets
|
|
900
1005
|
a missing or closed index.
|
|
901
1006
|
:param lenient: If `true`, format-based query failures (such as providing text
|
|
902
|
-
to a numeric field) in the query string will be ignored.
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
:param
|
|
909
|
-
:param
|
|
910
|
-
|
|
1007
|
+
to a numeric field) in the query string will be ignored. This parameter can
|
|
1008
|
+
be used only when the `q` query string parameter is specified.
|
|
1009
|
+
:param min_score: The minimum `_score` value that documents must have to be included
|
|
1010
|
+
in the result.
|
|
1011
|
+
:param preference: The node or shard the operation should be performed on. By
|
|
1012
|
+
default, it is random.
|
|
1013
|
+
:param q: The query in Lucene query string syntax.
|
|
1014
|
+
:param query: Defines the search definition using the Query DSL. The query is
|
|
1015
|
+
optional, and when not provided, it will use `match_all` to count all the
|
|
1016
|
+
docs.
|
|
1017
|
+
:param routing: A custom value used to route operations to a specific shard.
|
|
1018
|
+
:param terminate_after: The maximum number of documents to collect for each shard.
|
|
911
1019
|
If a query reaches this limit, Elasticsearch terminates the query early.
|
|
912
|
-
Elasticsearch collects documents before sorting.
|
|
1020
|
+
Elasticsearch collects documents before sorting. IMPORTANT: Use with caution.
|
|
1021
|
+
Elasticsearch applies this parameter to each shard handling the request.
|
|
1022
|
+
When possible, let Elasticsearch perform early termination automatically.
|
|
1023
|
+
Avoid specifying this parameter for requests that target data streams with
|
|
1024
|
+
backing indices across multiple data tiers.
|
|
913
1025
|
"""
|
|
914
1026
|
__path_parts: t.Dict[str, str]
|
|
915
1027
|
if index not in SKIP_IN_PATH:
|
|
@@ -1007,7 +1119,7 @@ class Elasticsearch(BaseClient):
|
|
|
1007
1119
|
and makes it searchable. If the target is an index and the document already exists,
|
|
1008
1120
|
the request updates the document and increments its version.
|
|
1009
1121
|
|
|
1010
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
1122
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/docs-index_.html>`_
|
|
1011
1123
|
|
|
1012
1124
|
:param index: Name of the data stream or index to target. If the target doesn’t
|
|
1013
1125
|
exist and matches the name or wildcard (`*`) pattern of an index template
|
|
@@ -1111,7 +1223,7 @@ class Elasticsearch(BaseClient):
|
|
|
1111
1223
|
"""
|
|
1112
1224
|
Delete a document. Removes a JSON document from the specified index.
|
|
1113
1225
|
|
|
1114
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
1226
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/docs-delete.html>`_
|
|
1115
1227
|
|
|
1116
1228
|
:param index: Name of the target index.
|
|
1117
1229
|
:param id: Unique identifier for the document.
|
|
@@ -1233,7 +1345,7 @@ class Elasticsearch(BaseClient):
|
|
|
1233
1345
|
"""
|
|
1234
1346
|
Delete documents. Deletes documents that match the specified query.
|
|
1235
1347
|
|
|
1236
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
1348
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/docs-delete-by-query.html>`_
|
|
1237
1349
|
|
|
1238
1350
|
:param index: Comma-separated list of data streams, indices, and aliases to search.
|
|
1239
1351
|
Supports wildcards (`*`). To search all data streams or indices, omit this
|
|
@@ -1414,7 +1526,7 @@ class Elasticsearch(BaseClient):
|
|
|
1414
1526
|
takes effect immediately but rethrotting that slows down the query takes effect
|
|
1415
1527
|
after completing the current batch to prevent scroll timeouts.
|
|
1416
1528
|
|
|
1417
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
1529
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/docs-delete-by-query.html>`_
|
|
1418
1530
|
|
|
1419
1531
|
:param task_id: The ID for the task.
|
|
1420
1532
|
:param requests_per_second: The throttle for this request in sub-requests per
|
|
@@ -1460,7 +1572,7 @@ class Elasticsearch(BaseClient):
|
|
|
1460
1572
|
"""
|
|
1461
1573
|
Delete a script or search template. Deletes a stored script or search template.
|
|
1462
1574
|
|
|
1463
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
1575
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/modules-scripting.html>`_
|
|
1464
1576
|
|
|
1465
1577
|
:param id: Identifier for the stored script or search template.
|
|
1466
1578
|
:param master_timeout: Period to wait for a connection to the master node. If
|
|
@@ -1528,7 +1640,7 @@ class Elasticsearch(BaseClient):
|
|
|
1528
1640
|
"""
|
|
1529
1641
|
Check a document. Checks if a specified document exists.
|
|
1530
1642
|
|
|
1531
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
1643
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/docs-get.html>`_
|
|
1532
1644
|
|
|
1533
1645
|
:param index: Comma-separated list of data streams, indices, and aliases. Supports
|
|
1534
1646
|
wildcards (`*`).
|
|
@@ -1629,7 +1741,7 @@ class Elasticsearch(BaseClient):
|
|
|
1629
1741
|
"""
|
|
1630
1742
|
Check for a document source. Checks if a document's `_source` is stored.
|
|
1631
1743
|
|
|
1632
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
1744
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/docs-get.html>`_
|
|
1633
1745
|
|
|
1634
1746
|
:param index: Comma-separated list of data streams, indices, and aliases. Supports
|
|
1635
1747
|
wildcards (`*`).
|
|
@@ -1730,7 +1842,7 @@ class Elasticsearch(BaseClient):
|
|
|
1730
1842
|
Explain a document match result. Returns information about why a specific document
|
|
1731
1843
|
matches, or doesn’t match, a query.
|
|
1732
1844
|
|
|
1733
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
1845
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/search-explain.html>`_
|
|
1734
1846
|
|
|
1735
1847
|
:param index: Index names used to limit the request. Only a single index name
|
|
1736
1848
|
can be provided to this parameter.
|
|
@@ -1853,7 +1965,7 @@ class Elasticsearch(BaseClient):
|
|
|
1853
1965
|
field. For example, a runtime field with a type of keyword is returned the same
|
|
1854
1966
|
as any other field that belongs to the `keyword` family.
|
|
1855
1967
|
|
|
1856
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
1968
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/search-field-caps.html>`_
|
|
1857
1969
|
|
|
1858
1970
|
:param index: Comma-separated list of data streams, indices, and aliases used
|
|
1859
1971
|
to limit the request. Supports wildcards (*). To target all data streams
|
|
@@ -1970,7 +2082,7 @@ class Elasticsearch(BaseClient):
|
|
|
1970
2082
|
Get a document by its ID. Retrieves the document with the specified ID from an
|
|
1971
2083
|
index.
|
|
1972
2084
|
|
|
1973
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
2085
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/docs-get.html>`_
|
|
1974
2086
|
|
|
1975
2087
|
:param index: Name of the index that contains the document.
|
|
1976
2088
|
:param id: Unique identifier of the document.
|
|
@@ -2059,7 +2171,7 @@ class Elasticsearch(BaseClient):
|
|
|
2059
2171
|
"""
|
|
2060
2172
|
Get a script or search template. Retrieves a stored script or search template.
|
|
2061
2173
|
|
|
2062
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
2174
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/modules-scripting.html>`_
|
|
2063
2175
|
|
|
2064
2176
|
:param id: Identifier for the stored script or search template.
|
|
2065
2177
|
:param master_timeout: Specify timeout for connection to master
|
|
@@ -2101,7 +2213,7 @@ class Elasticsearch(BaseClient):
|
|
|
2101
2213
|
"""
|
|
2102
2214
|
Get script contexts. Get a list of supported script contexts and their methods.
|
|
2103
2215
|
|
|
2104
|
-
`<https://www.elastic.co/guide/en/elasticsearch/painless/8.
|
|
2216
|
+
`<https://www.elastic.co/guide/en/elasticsearch/painless/8.17/painless-contexts.html>`_
|
|
2105
2217
|
"""
|
|
2106
2218
|
__path_parts: t.Dict[str, str] = {}
|
|
2107
2219
|
__path = "/_script_context"
|
|
@@ -2136,7 +2248,7 @@ class Elasticsearch(BaseClient):
|
|
|
2136
2248
|
"""
|
|
2137
2249
|
Get script languages. Get a list of available script types, languages, and contexts.
|
|
2138
2250
|
|
|
2139
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
2251
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/modules-scripting.html>`_
|
|
2140
2252
|
"""
|
|
2141
2253
|
__path_parts: t.Dict[str, str] = {}
|
|
2142
2254
|
__path = "/_script_language"
|
|
@@ -2191,7 +2303,7 @@ class Elasticsearch(BaseClient):
|
|
|
2191
2303
|
"""
|
|
2192
2304
|
Get a document's source. Returns the source of a document.
|
|
2193
2305
|
|
|
2194
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
2306
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/docs-get.html>`_
|
|
2195
2307
|
|
|
2196
2308
|
:param index: Name of the index that contains the document.
|
|
2197
2309
|
:param id: Unique identifier of the document.
|
|
@@ -2272,9 +2384,28 @@ class Elasticsearch(BaseClient):
|
|
|
2272
2384
|
verbose: t.Optional[bool] = None,
|
|
2273
2385
|
) -> ObjectApiResponse[t.Any]:
|
|
2274
2386
|
"""
|
|
2275
|
-
|
|
2276
|
-
|
|
2277
|
-
|
|
2387
|
+
Get the cluster health. Get a report with the health status of an Elasticsearch
|
|
2388
|
+
cluster. The report contains a list of indicators that compose Elasticsearch
|
|
2389
|
+
functionality. Each indicator has a health status of: green, unknown, yellow
|
|
2390
|
+
or red. The indicator will provide an explanation and metadata describing the
|
|
2391
|
+
reason for its current health status. The cluster’s status is controlled by the
|
|
2392
|
+
worst indicator status. In the event that an indicator’s status is non-green,
|
|
2393
|
+
a list of impacts may be present in the indicator result which detail the functionalities
|
|
2394
|
+
that are negatively affected by the health issue. Each impact carries with it
|
|
2395
|
+
a severity level, an area of the system that is affected, and a simple description
|
|
2396
|
+
of the impact on the system. Some health indicators can determine the root cause
|
|
2397
|
+
of a health problem and prescribe a set of steps that can be performed in order
|
|
2398
|
+
to improve the health of the system. The root cause and remediation steps are
|
|
2399
|
+
encapsulated in a diagnosis. A diagnosis contains a cause detailing a root cause
|
|
2400
|
+
analysis, an action containing a brief description of the steps to take to fix
|
|
2401
|
+
the problem, the list of affected resources (if applicable), and a detailed step-by-step
|
|
2402
|
+
troubleshooting guide to fix the diagnosed problem. NOTE: The health indicators
|
|
2403
|
+
perform root cause analysis of non-green health statuses. This can be computationally
|
|
2404
|
+
expensive when called frequently. When setting up automated polling of the API
|
|
2405
|
+
for health status, set verbose to false to disable the more expensive analysis
|
|
2406
|
+
logic.
|
|
2407
|
+
|
|
2408
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/health-api.html>`_
|
|
2278
2409
|
|
|
2279
2410
|
:param feature: A feature of the cluster, as returned by the top-level health
|
|
2280
2411
|
report API.
|
|
@@ -2351,7 +2482,7 @@ class Elasticsearch(BaseClient):
|
|
|
2351
2482
|
and makes it searchable. If the target is an index and the document already exists,
|
|
2352
2483
|
the request updates the document and increments its version.
|
|
2353
2484
|
|
|
2354
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
2485
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/docs-index_.html>`_
|
|
2355
2486
|
|
|
2356
2487
|
:param index: Name of the data stream or index to target.
|
|
2357
2488
|
:param document:
|
|
@@ -2458,9 +2589,9 @@ class Elasticsearch(BaseClient):
|
|
|
2458
2589
|
pretty: t.Optional[bool] = None,
|
|
2459
2590
|
) -> ObjectApiResponse[t.Any]:
|
|
2460
2591
|
"""
|
|
2461
|
-
Get cluster info.
|
|
2592
|
+
Get cluster info. Get basic build, version, and cluster information.
|
|
2462
2593
|
|
|
2463
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
2594
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/rest-api-root.html>`_
|
|
2464
2595
|
"""
|
|
2465
2596
|
__path_parts: t.Dict[str, str] = {}
|
|
2466
2597
|
__path = "/"
|
|
@@ -2525,7 +2656,7 @@ class Elasticsearch(BaseClient):
|
|
|
2525
2656
|
The kNN search API supports restricting the search using a filter. The search
|
|
2526
2657
|
will return the top k documents that also match the filter query.
|
|
2527
2658
|
|
|
2528
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
2659
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/search-search.html>`_
|
|
2529
2660
|
|
|
2530
2661
|
:param index: A comma-separated list of index names to search; use `_all` or
|
|
2531
2662
|
to perform the operation on all indices
|
|
@@ -2629,7 +2760,7 @@ class Elasticsearch(BaseClient):
|
|
|
2629
2760
|
IDs in the request body. To ensure fast responses, this multi get (mget) API
|
|
2630
2761
|
responds with partial results if one or more shards fail.
|
|
2631
2762
|
|
|
2632
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
2763
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/docs-multi-get.html>`_
|
|
2633
2764
|
|
|
2634
2765
|
:param index: Name of the index to retrieve documents from when `ids` are specified,
|
|
2635
2766
|
or when a document in the `docs` array does not specify an index.
|
|
@@ -2756,7 +2887,7 @@ class Elasticsearch(BaseClient):
|
|
|
2756
2887
|
Each newline character may be preceded by a carriage return `\\r`. When sending
|
|
2757
2888
|
requests to this endpoint the `Content-Type` header should be set to `application/x-ndjson`.
|
|
2758
2889
|
|
|
2759
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
2890
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/search-multi-search.html>`_
|
|
2760
2891
|
|
|
2761
2892
|
:param searches:
|
|
2762
2893
|
:param index: Comma-separated list of data streams, indices, and index aliases
|
|
@@ -2888,7 +3019,7 @@ class Elasticsearch(BaseClient):
|
|
|
2888
3019
|
"""
|
|
2889
3020
|
Run multiple templated searches.
|
|
2890
3021
|
|
|
2891
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
3022
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/search-multi-search.html>`_
|
|
2892
3023
|
|
|
2893
3024
|
:param search_templates:
|
|
2894
3025
|
:param index: Comma-separated list of data streams, indices, and aliases to search.
|
|
@@ -2987,7 +3118,7 @@ class Elasticsearch(BaseClient):
|
|
|
2987
3118
|
with all the fetched termvectors. Each element has the structure provided by
|
|
2988
3119
|
the termvectors API.
|
|
2989
3120
|
|
|
2990
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
3121
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/docs-multi-termvectors.html>`_
|
|
2991
3122
|
|
|
2992
3123
|
:param index: Name of the index that contains the documents.
|
|
2993
3124
|
:param docs: Array of existing or artificial documents.
|
|
@@ -3077,6 +3208,7 @@ class Elasticsearch(BaseClient):
|
|
|
3077
3208
|
*,
|
|
3078
3209
|
index: t.Union[str, t.Sequence[str]],
|
|
3079
3210
|
keep_alive: t.Union[str, t.Literal[-1], t.Literal[0]],
|
|
3211
|
+
allow_partial_search_results: t.Optional[bool] = None,
|
|
3080
3212
|
error_trace: t.Optional[bool] = None,
|
|
3081
3213
|
expand_wildcards: t.Optional[
|
|
3082
3214
|
t.Union[
|
|
@@ -3106,11 +3238,15 @@ class Elasticsearch(BaseClient):
|
|
|
3106
3238
|
A point in time must be opened explicitly before being used in search requests.
|
|
3107
3239
|
The `keep_alive` parameter tells Elasticsearch how long it should persist.
|
|
3108
3240
|
|
|
3109
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
3241
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/point-in-time-api.html>`_
|
|
3110
3242
|
|
|
3111
3243
|
:param index: A comma-separated list of index names to open point in time; use
|
|
3112
3244
|
`_all` or empty string to perform the operation on all indices
|
|
3113
3245
|
:param keep_alive: Extends the time to live of the corresponding point in time.
|
|
3246
|
+
:param allow_partial_search_results: If `false`, creating a point in time request
|
|
3247
|
+
when a shard is missing or unavailable will throw an exception. If `true`,
|
|
3248
|
+
the point in time will contain all the shards that are available at the time
|
|
3249
|
+
of the request.
|
|
3114
3250
|
:param expand_wildcards: Type of index that wildcard patterns can match. If the
|
|
3115
3251
|
request can target data streams, this argument determines whether wildcard
|
|
3116
3252
|
expressions match hidden data streams. Supports comma-separated values, such
|
|
@@ -3133,6 +3269,8 @@ class Elasticsearch(BaseClient):
|
|
|
3133
3269
|
__body: t.Dict[str, t.Any] = body if body is not None else {}
|
|
3134
3270
|
if keep_alive is not None:
|
|
3135
3271
|
__query["keep_alive"] = keep_alive
|
|
3272
|
+
if allow_partial_search_results is not None:
|
|
3273
|
+
__query["allow_partial_search_results"] = allow_partial_search_results
|
|
3136
3274
|
if error_trace is not None:
|
|
3137
3275
|
__query["error_trace"] = error_trace
|
|
3138
3276
|
if expand_wildcards is not None:
|
|
@@ -3188,7 +3326,7 @@ class Elasticsearch(BaseClient):
|
|
|
3188
3326
|
Create or update a script or search template. Creates or updates a stored script
|
|
3189
3327
|
or search template.
|
|
3190
3328
|
|
|
3191
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
3329
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/modules-scripting.html>`_
|
|
3192
3330
|
|
|
3193
3331
|
:param id: Identifier for the stored script or search template. Must be unique
|
|
3194
3332
|
within the cluster.
|
|
@@ -3274,7 +3412,7 @@ class Elasticsearch(BaseClient):
|
|
|
3274
3412
|
Evaluate ranked search results. Evaluate the quality of ranked search results
|
|
3275
3413
|
over a set of typical search queries.
|
|
3276
3414
|
|
|
3277
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
3415
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/search-rank-eval.html>`_
|
|
3278
3416
|
|
|
3279
3417
|
:param requests: A set of typical search requests, together with their provided
|
|
3280
3418
|
ratings.
|
|
@@ -3370,7 +3508,7 @@ class Elasticsearch(BaseClient):
|
|
|
3370
3508
|
can be any existing index, alias, or data stream. The destination must differ
|
|
3371
3509
|
from the source. For example, you cannot reindex a data stream into itself.
|
|
3372
3510
|
|
|
3373
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
3511
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/docs-reindex.html>`_
|
|
3374
3512
|
|
|
3375
3513
|
:param dest: The destination you are copying to.
|
|
3376
3514
|
:param source: The source you are copying from.
|
|
@@ -3467,7 +3605,7 @@ class Elasticsearch(BaseClient):
|
|
|
3467
3605
|
Throttle a reindex operation. Change the number of requests per second for a
|
|
3468
3606
|
particular reindex operation.
|
|
3469
3607
|
|
|
3470
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
3608
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/docs-reindex.html>`_
|
|
3471
3609
|
|
|
3472
3610
|
:param task_id: Identifier for the task.
|
|
3473
3611
|
:param requests_per_second: The throttle for this request in sub-requests per
|
|
@@ -3518,7 +3656,7 @@ class Elasticsearch(BaseClient):
|
|
|
3518
3656
|
"""
|
|
3519
3657
|
Render a search template. Render a search template as a search request body.
|
|
3520
3658
|
|
|
3521
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
3659
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/render-search-template-api.html>`_
|
|
3522
3660
|
|
|
3523
3661
|
:param id: ID of the search template to render. If no `source` is specified,
|
|
3524
3662
|
this or the `id` request body parameter is required.
|
|
@@ -3587,7 +3725,7 @@ class Elasticsearch(BaseClient):
|
|
|
3587
3725
|
"""
|
|
3588
3726
|
Run a script. Runs a script and returns a result.
|
|
3589
3727
|
|
|
3590
|
-
`<https://www.elastic.co/guide/en/elasticsearch/painless/8.
|
|
3728
|
+
`<https://www.elastic.co/guide/en/elasticsearch/painless/8.17/painless-execute-api.html>`_
|
|
3591
3729
|
|
|
3592
3730
|
:param context: The context that the script should run in.
|
|
3593
3731
|
:param context_setup: Additional parameters for the `context`.
|
|
@@ -3660,7 +3798,7 @@ class Elasticsearch(BaseClient):
|
|
|
3660
3798
|
of the index at the time of the initial search request. Subsequent indexing or
|
|
3661
3799
|
document changes only affect later search and scroll requests.
|
|
3662
3800
|
|
|
3663
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
3801
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/search-request-body.html#request-body-search-scroll>`_
|
|
3664
3802
|
|
|
3665
3803
|
:param scroll_id: Scroll ID of the search.
|
|
3666
3804
|
:param rest_total_hits_as_int: If true, the API response’s hit.total property
|
|
@@ -3852,7 +3990,7 @@ class Elasticsearch(BaseClient):
|
|
|
3852
3990
|
can provide search queries using the `q` query string parameter or the request
|
|
3853
3991
|
body. If both are specified, only the query parameter is used.
|
|
3854
3992
|
|
|
3855
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
3993
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/search-search.html>`_
|
|
3856
3994
|
|
|
3857
3995
|
:param index: Comma-separated list of data streams, indices, and aliases to search.
|
|
3858
3996
|
Supports wildcards (`*`). To search all data streams and indices, omit this
|
|
@@ -4282,7 +4420,7 @@ class Elasticsearch(BaseClient):
|
|
|
4282
4420
|
"""
|
|
4283
4421
|
Search a vector tile. Search a vector tile for geospatial values.
|
|
4284
4422
|
|
|
4285
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
4423
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/search-vector-tile-api.html>`_
|
|
4286
4424
|
|
|
4287
4425
|
:param index: Comma-separated list of data streams, indices, or aliases to search
|
|
4288
4426
|
:param field: Field containing geospatial data to return
|
|
@@ -4439,7 +4577,7 @@ class Elasticsearch(BaseClient):
|
|
|
4439
4577
|
optimizations with routing and shard preferences. When filtered aliases are used,
|
|
4440
4578
|
the filter is returned as part of the indices section.
|
|
4441
4579
|
|
|
4442
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
4580
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/search-shards.html>`_
|
|
4443
4581
|
|
|
4444
4582
|
:param index: Returns the indices and shards that a search request would be executed
|
|
4445
4583
|
against.
|
|
@@ -4540,7 +4678,7 @@ class Elasticsearch(BaseClient):
|
|
|
4540
4678
|
"""
|
|
4541
4679
|
Run a search with a search template.
|
|
4542
4680
|
|
|
4543
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
4681
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/search-template.html>`_
|
|
4544
4682
|
|
|
4545
4683
|
:param index: Comma-separated list of data streams, indices, and aliases to search.
|
|
4546
4684
|
Supports wildcards (*).
|
|
@@ -4680,7 +4818,7 @@ class Elasticsearch(BaseClient):
|
|
|
4680
4818
|
are actually deleted. Until that happens, the terms enum API will return terms
|
|
4681
4819
|
from these documents.
|
|
4682
4820
|
|
|
4683
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
4821
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/search-terms-enum.html>`_
|
|
4684
4822
|
|
|
4685
4823
|
:param index: Comma-separated list of data streams, indices, and index aliases
|
|
4686
4824
|
to search. Wildcard (*) expressions are supported.
|
|
@@ -4779,7 +4917,7 @@ class Elasticsearch(BaseClient):
|
|
|
4779
4917
|
Get term vector information. Get information and statistics about terms in the
|
|
4780
4918
|
fields of a particular document.
|
|
4781
4919
|
|
|
4782
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
4920
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/docs-termvectors.html>`_
|
|
4783
4921
|
|
|
4784
4922
|
:param index: Name of the index that contains the document.
|
|
4785
4923
|
:param id: Unique identifier of the document.
|
|
@@ -4922,7 +5060,7 @@ class Elasticsearch(BaseClient):
|
|
|
4922
5060
|
Update a document. Updates a document by running a script or passing a partial
|
|
4923
5061
|
document.
|
|
4924
5062
|
|
|
4925
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
5063
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/docs-update.html>`_
|
|
4926
5064
|
|
|
4927
5065
|
:param index: The name of the index
|
|
4928
5066
|
:param id: Document ID
|
|
@@ -5088,7 +5226,7 @@ class Elasticsearch(BaseClient):
|
|
|
5088
5226
|
is specified, performs an update on every document in the data stream or index
|
|
5089
5227
|
without modifying the source, which is useful for picking up mapping changes.
|
|
5090
5228
|
|
|
5091
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
5229
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/docs-update-by-query.html>`_
|
|
5092
5230
|
|
|
5093
5231
|
:param index: Comma-separated list of data streams, indices, and aliases to search.
|
|
5094
5232
|
Supports wildcards (`*`). To search all data streams or indices, omit this
|
|
@@ -5287,7 +5425,7 @@ class Elasticsearch(BaseClient):
|
|
|
5287
5425
|
takes effect immediately but rethrotting that slows down the query takes effect
|
|
5288
5426
|
after completing the current batch to prevent scroll timeouts.
|
|
5289
5427
|
|
|
5290
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
5428
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/docs-update-by-query.html>`_
|
|
5291
5429
|
|
|
5292
5430
|
:param task_id: The ID for the task.
|
|
5293
5431
|
:param requests_per_second: The throttle for this request in sub-requests per
|