elasticsearch API Reference

Full documentation for elasticsearch ((9, 4, 1))

elasticsearch.ApiError
Python Library Documentation: class ApiError in module elasticsearch

class ApiError(elastic_transport.ApiError)
 |  ApiError(message: str, meta: elastic_transport.ApiResponseMeta, body: Any, errors: Tuple[Exception, ...] = ())
 |
 |  Method resolution order:
 |      ApiError
 |      elastic_transport.ApiError
 |      builtins.Exception
 |      builtins.BaseException
 |      builtins.object
 |
 |  Methods defined here:
 |
 |  __str__(self) -> str
 |      Return str(self).
 |
 |  ----------------------------------------------------------------------
 |  Readonly properties defined here:
 |
 |  error
 |      Backwards-compatible way to access ``self.message``
 |
 |  info
 |      Backwards-compatible way to access ``self.body``
 |
 |  status_code
 |      Backwards-compatible way to access ``self.meta.status``
 |
 |  ----------------------------------------------------------------------
 |  Methods inherited from elastic_transport.ApiError:
 |
 |  __init__(self, message: str, meta: elastic_transport.ApiResponseMeta, body: Any, errors: Tuple[Exception, ...] = ())
 |      Initialize self.  See help(type(self)) for accurate signature.
 |
 |  __repr__(self) -> str
 |      Return repr(self).
 |
 |  ----------------------------------------------------------------------
 |  Data descriptors inherited from elastic_transport.ApiError:
 |
 |  __weakref__
 |      list of weak references to the object
 |
 |  ----------------------------------------------------------------------
 |  Static methods inherited from builtins.Exception:
 |
 |  __new__(*args, **kwargs) class method of builtins.Exception
 |      Create and return a new object.  See help(type) for accurate signature.
 |
 |  ----------------------------------------------------------------------
 |  Methods inherited from builtins.BaseException:
 |
 |  __getattribute__(self, name, /)
 |      Return getattr(self, name).
 |
 |  __reduce__(...)
 |      Helper for pickle.
 |
 |  __setstate__(...)
 |
 |  add_note(...)
 |      Exception.add_note(note) --
 |      add a note to the exception
 |
 |  with_traceback(...)
 |      Exception.with_traceback(tb) --
 |      set self.__traceback__ to tb and return self.
 |
 |  ----------------------------------------------------------------------
 |  Data descriptors inherited from builtins.BaseException:
 |
 |  __cause__
 |      exception cause
 |
 |  __context__
 |      exception context
 |
 |  __dict__
 |
 |  __suppress_context__
 |
 |  __traceback__
 |
 |  args
elasticsearch.AsyncElasticsearch
Python Library Documentation: class AsyncElasticsearch in module elasticsearch

class AsyncElasticsearch(elasticsearch._async.client._base.BaseClient)
 |  AsyncElasticsearch(hosts: Union[str, Sequence[Union[str, Mapping[str, Union[str, int]], elastic_transport.NodeConfig]], NoneType] = None, *, cloud_id: Optional[str] = None, api_key: Union[str, Tuple[str, str], NoneType] = None, basic_auth: Union[str, Tuple[str, str], NoneType] = None, bearer_auth: Optional[str] = None, opaque_id: Optional[str] = None, server_mode: str = 'stack', headers: Union[elastic_transport.client_utils.DefaultType, Mapping[str, str]] = <DEFAULT>, connections_per_node: Union[elastic_transport.client_utils.DefaultType, int] = <DEFAULT>, http_compress: Union[elastic_transport.client_utils.DefaultType, bool] = <DEFAULT>, verify_certs: Union[elastic_transport.client_utils.DefaultType, bool] = <DEFAULT>, ca_certs: Union[elastic_transport.client_utils.DefaultType, str] = <DEFAULT>, client_cert: Union[elastic_transport.client_utils.DefaultType, str] = <DEFAULT>, client_key: Union[elastic_transport.client_utils.DefaultType, str] = <DEFAULT>, ssl_assert_hostname: Union[elastic_transport.client_utils.DefaultType, str] = <DEFAULT>, ssl_assert_fingerprint: Union[elastic_transport.client_utils.DefaultType, str] = <DEFAULT>, ssl_version: Union[elastic_transport.client_utils.DefaultType, int] = <DEFAULT>, ssl_context: Union[elastic_transport.client_utils.DefaultType, Any] = <DEFAULT>, ssl_show_warn: Union[elastic_transport.client_utils.DefaultType, bool] = <DEFAULT>, transport_class: Type[elastic_transport.AsyncTransport] = <class 'elastic_transport.AsyncTransport'>, request_timeout: Union[elastic_transport.client_utils.DefaultType, NoneType, float] = <DEFAULT>, node_class: Union[elastic_transport.client_utils.DefaultType, Type[elastic_transport.BaseNode]] = <DEFAULT>, node_pool_class: Union[elastic_transport.client_utils.DefaultType, Type[elastic_transport.NodePool]] = <DEFAULT>, randomize_nodes_in_pool: Union[elastic_transport.client_utils.DefaultType, bool] = <DEFAULT>, node_selector_class: Union[elastic_transport.client_utils.DefaultType, Type[elastic_transport.NodeSelector]] = <DEFAULT>, dead_node_backoff_factor: Union[elastic_transport.client_utils.DefaultType, float] = <DEFAULT>, max_dead_node_backoff: Union[elastic_transport.client_utils.DefaultType, float] = <DEFAULT>, serializer: Optional[elastic_transport.Serializer] = None, serializers: Union[elastic_transport.client_utils.DefaultType, Mapping[str, elastic_transport.Serializer]] = <DEFAULT>, default_mimetype: str = 'application/json', max_retries: Union[elastic_transport.client_utils.DefaultType, int] = <DEFAULT>, retry_on_status: Union[elastic_transport.client_utils.DefaultType, int, Collection[int]] = <DEFAULT>, retry_on_timeout: Union[elastic_transport.client_utils.DefaultType, bool] = <DEFAULT>, retry_backoff_base: Union[elastic_transport.client_utils.DefaultType, float] = <DEFAULT>, retry_backoff_cap: Union[elastic_transport.client_utils.DefaultType, float] = <DEFAULT>, sniff_on_start: Union[elastic_transport.client_utils.DefaultType, bool] = <DEFAULT>, sniff_before_requests: Union[elastic_transport.client_utils.DefaultType, bool] = <DEFAULT>, sniff_on_node_failure: Union[elastic_transport.client_utils.DefaultType, bool] = <DEFAULT>, sniff_timeout: Union[elastic_transport.client_utils.DefaultType, NoneType, float] = <DEFAULT>, min_delay_between_sniffing: Union[elastic_transport.client_utils.DefaultType, NoneType, float] = <DEFAULT>, sniffed_node_callback: Optional[Callable[[Dict[str, Any], elastic_transport.NodeConfig], Optional[elastic_transport.NodeConfig]]] = None, meta_header: Union[elastic_transport.client_utils.DefaultType, bool] = <DEFAULT>, http_auth: Union[elastic_transport.client_utils.DefaultType, Any] = <DEFAULT>, _transport: Optional[elastic_transport.AsyncTransport] = None) -> None
 |
 |  Elasticsearch low-level client. Provides a straightforward mapping from
 |  Python to Elasticsearch REST APIs.
 |
 |  The client instance has additional attributes to update APIs in different
 |  namespaces such as ``async_search``, ``indices``, ``security``, and more:
 |
 |  .. code-block:: python
 |
 |      client = Elasticsearch("http://localhost:9200")
 |
 |      # Get Document API
 |      client.get(index="*", id="1")
 |
 |      # Get Index API
 |      client.indices.get(index="*")
 |
 |  Transport options can be set on the client constructor or using
 |  the :meth:`~elasticsearch.Elasticsearch.options` method:
 |
 |  .. code-block:: python
 |
 |      # Set 'api_key' on the constructor
 |      client = Elasticsearch(
 |          "http://localhost:9200",
 |          api_key="api_key",
 |      )
 |      client.search(...)
 |
 |      # Set 'api_key' per request
 |      client.options(api_key="api_key").search(...)
 |
 |  Method resolution order:
 |      AsyncElasticsearch
 |      elasticsearch._async.client._base.BaseClient
 |      builtins.object
 |
 |  Methods defined here:
 |
 |  async __aenter__(self) -> 'AsyncElasticsearch'
 |
 |  async __aexit__(self, *_: Any) -> None
 |
 |  __init__(self, hosts: Union[str, Sequence[Union[str, Mapping[str, Union[str, int]], elastic_transport.NodeConfig]], NoneType] = None, *, cloud_id: Optional[str] = None, api_key: Union[str, Tuple[str, str], NoneType] = None, basic_auth: Union[str, Tuple[str, str], NoneType] = None, bearer_auth: Optional[str] = None, opaque_id: Optional[str] = None, server_mode: str = 'stack', headers: Union[elastic_transport.client_utils.DefaultType, Mapping[str, str]] = <DEFAULT>, connections_per_node: Union[elastic_transport.client_utils.DefaultType, int] = <DEFAULT>, http_compress: Union[elastic_transport.client_utils.DefaultType, bool] = <DEFAULT>, verify_certs: Union[elastic_transport.client_utils.DefaultType, bool] = <DEFAULT>, ca_certs: Union[elastic_transport.client_utils.DefaultType, str] = <DEFAULT>, client_cert: Union[elastic_transport.client_utils.DefaultType, str] = <DEFAULT>, client_key: Union[elastic_transport.client_utils.DefaultType, str] = <DEFAULT>, ssl_assert_hostname: Union[elastic_transport.client_utils.DefaultType, str] = <DEFAULT>, ssl_assert_fingerprint: Union[elastic_transport.client_utils.DefaultType, str] = <DEFAULT>, ssl_version: Union[elastic_transport.client_utils.DefaultType, int] = <DEFAULT>, ssl_context: Union[elastic_transport.client_utils.DefaultType, Any] = <DEFAULT>, ssl_show_warn: Union[elastic_transport.client_utils.DefaultType, bool] = <DEFAULT>, transport_class: Type[elastic_transport.AsyncTransport] = <class 'elastic_transport.AsyncTransport'>, request_timeout: Union[elastic_transport.client_utils.DefaultType, NoneType, float] = <DEFAULT>, node_class: Union[elastic_transport.client_utils.DefaultType, Type[elastic_transport.BaseNode]] = <DEFAULT>, node_pool_class: Union[elastic_transport.client_utils.DefaultType, Type[elastic_transport.NodePool]] = <DEFAULT>, randomize_nodes_in_pool: Union[elastic_transport.client_utils.DefaultType, bool] = <DEFAULT>, node_selector_class: Union[elastic_transport.client_utils.DefaultType, Type[elastic_transport.NodeSelector]] = <DEFAULT>, dead_node_backoff_factor: Union[elastic_transport.client_utils.DefaultType, float] = <DEFAULT>, max_dead_node_backoff: Union[elastic_transport.client_utils.DefaultType, float] = <DEFAULT>, serializer: Optional[elastic_transport.Serializer] = None, serializers: Union[elastic_transport.client_utils.DefaultType, Mapping[str, elastic_transport.Serializer]] = <DEFAULT>, default_mimetype: str = 'application/json', max_retries: Union[elastic_transport.client_utils.DefaultType, int] = <DEFAULT>, retry_on_status: Union[elastic_transport.client_utils.DefaultType, int, Collection[int]] = <DEFAULT>, retry_on_timeout: Union[elastic_transport.client_utils.DefaultType, bool] = <DEFAULT>, retry_backoff_base: Union[elastic_transport.client_utils.DefaultType, float] = <DEFAULT>, retry_backoff_cap: Union[elastic_transport.client_utils.DefaultType, float] = <DEFAULT>, sniff_on_start: Union[elastic_transport.client_utils.DefaultType, bool] = <DEFAULT>, sniff_before_requests: Union[elastic_transport.client_utils.DefaultType, bool] = <DEFAULT>, sniff_on_node_failure: Union[elastic_transport.client_utils.DefaultType, bool] = <DEFAULT>, sniff_timeout: Union[elastic_transport.client_utils.DefaultType, NoneType, float] = <DEFAULT>, min_delay_between_sniffing: Union[elastic_transport.client_utils.DefaultType, NoneType, float] = <DEFAULT>, sniffed_node_callback: Optional[Callable[[Dict[str, Any], elastic_transport.NodeConfig], Optional[elastic_transport.NodeConfig]]] = None, meta_header: Union[elastic_transport.client_utils.DefaultType, bool] = <DEFAULT>, http_auth: Union[elastic_transport.client_utils.DefaultType, Any] = <DEFAULT>, _transport: Optional[elastic_transport.AsyncTransport] = None) -> None
 |      Initialize self.  See help(type(self)) for accurate signature.
 |
 |  __repr__(self) -> str
 |      Return repr(self).
 |
 |  bulk(self, *, operations: Optional[Sequence[Mapping[str, Any]]] = None, body: Optional[Sequence[Mapping[str, Any]]] = None, index: Optional[str] = None, error_trace: Optional[bool] = None, filter_path: Union[str, Sequence[str], NoneType] = None, human: Optional[bool] = None, include_source_on_error: Optional[bool] = None, list_executed_pipelines: Optional[bool] = None, pipeline: Optional[str] = None, pretty: Optional[bool] = None, refresh: Union[bool, str, Literal['false', 'true', 'wait_for'], NoneType] = None, require_alias: Optional[bool] = None, require_data_stream: Optional[bool] = None, routing: Union[str, Sequence[str], NoneType] = None, source: Union[bool, str, Sequence[str], NoneType] = None, source_excludes: Union[str, Sequence[str], NoneType] = None, source_includes: Union[str, Sequence[str], NoneType] = None, timeout: Union[str, Literal[-1], Literal[0], NoneType] = None, wait_for_active_shards: Union[int, str, Literal['all', 'index-setting'], NoneType] = None) -> elastic_transport.ObjectApiResponse[typing.Any]
 |      .. raw:: html
 |
 |        <p>Bulk index or delete documents.</p>
 |        <p>Perform multiple <code>index</code>, <code>create</code>, <code>delete</code>, and <code>update</code> actions in a single request.
 |        This reduces overhead and can greatly increase indexing speed.</p>
 |        <p>If the Elasticsearch security features are enabled, you must have the following index privileges for the target data stream, index, or index alias:</p>
 |        <ul>
 |        <li>To use the <code>create</code> action, you must have the <code>create_doc</code>, <code>create</code>, <code>index</code>, or <code>write</code> index privilege. Data streams support only the <code>create</code> action.</li>
 |        <li>To use the <code>index</code> action, you must have the <code>create</code>, <code>index</code>, or <code>write</code> index privilege.</li>
 |        <li>To use the <code>delete</code> action, you must have the <code>delete</code> or <code>write</code> index privilege.</li>
 |        <li>To use the <code>update</code> action, you must have the <code>index</code> or <code>write</code> index privilege.</li>
 |        <li>To automatically create a data stream or index with a bulk API request, you must have the <code>auto_configure</code>, <code>create_index</code>, or <code>manage</code> index privilege.</li>
 |        <li>To make the result of a bulk operation visible to search using the <code>refresh</code> parameter, you must have the <code>maintenance</code> or <code>manage</code> index privilege.</li>
 |        </ul>
 |        <p>Automatic data stream creation requires a matching index template with data stream enabled.</p>
 |        <p>The actions are specified in the request body using a newline delimited JSON (NDJSON) structure:</p>
 |        <pre><code>action_and_meta_data\n
 |        optional_source\n
 |        action_and_meta_data\n
 |        optional_source\n
 |        ....
 |        action_and_meta_data\n
 |        optional_source\n
 |        </code></pre>
 |        <p>The <code>index</code> and <code>create</code> actions expect a source on the next line and have the same semantics as the <code>op_type</code> parameter in the standard index API.
 |        A <code>create</code> action fails if a document with the same ID already exists in the target
 |        An <code>index</code> action adds or replaces a document as necessary.</p>
 |        <p>NOTE: Data streams support only the <code>create</code> action.
 |        To update or delete a document in a data stream, you must target the backing index containing the document.</p>
 |        <p>An <code>update</code> action expects that the partial doc, upsert, and script and its options are specified on the next line.</p>
 |        <p>A <code>delete</code> action does not expect a source on the next line and has the same semantics as the standard delete API.</p>
 |        <p>NOTE: The final line of data must end with a newline character (<code>\n</code>).
 |        Each newline character may be preceded by a carriage return (<code>\r</code>).
 |        When sending NDJSON data to the <code>_bulk</code> endpoint, use a <code>Content-Type</code> header of <code>application/json</code> or <code>application/x-ndjson</code>.
 |        Because this format uses literal newline characters (<code>\n</code>) as delimiters, make sure that the JSON actions and sources are not pretty printed.</p>
 |        <p>If you provide a target in the request path, it is used for any actions that don't explicitly specify an <code>_index</code> argument.</p>
 |        <p>A note on the format: the idea here is to make processing as fast as possible.
 |        As some of the actions are redirected to other shards on other nodes, only <code>action_meta_data</code> is parsed on the receiving node side.</p>
 |        <p>Client libraries using this protocol should try and strive to do something similar on the client side, and reduce buffering as much as possible.</p>
 |        <p>There is no &quot;correct&quot; number of actions to perform in a single bulk request.
 |        Experiment with different settings to find the optimal size for your particular workload.
 |        Note that Elasticsearch limits the maximum size of a HTTP request to 100mb by default so clients must ensure that no request exceeds this size.
 |        It is not possible to index a single document that exceeds the size limit, so you must pre-process any such documents into smaller pieces before sending them to Elasticsearch.
 |        For instance, split documents into pages or chapters before indexing them, or store raw binary data in a system outside Elasticsearch and replace the raw data with a link to the external system in the documents that you send to Elasticsearch.</p>
 |        <p><strong>Client suppport for bulk requests</strong></p>
 |        <p>Some of the officially supported clients provide helpers to assist with bulk requests and reindexing:</p>
 |        <ul>
 |        <li>Go: Check out <code>esutil.BulkIndexer</code></li>
 |        <li>Perl: Check out <code>Search::Elasticsearch::Client::5_0::Bulk</code> and <code>Search::Elasticsearch::Client::5_0::Scroll</code></li>
 |        <li>Python: Check out <code>elasticsearch.helpers.*</code></li>
 |        <li>JavaScript: Check out <code>client.helpers.*</code></li>
 |        <li>Java: Check out <code>co.elastic.clients.elasticsearch._helpers.bulk.BulkIngester</code></li>
 |        <li>.NET: Check out <code>BulkAllObservable</code></li>
 |        <li>PHP: Check out bulk indexing.</li>
 |        <li>Ruby: Check out <code>Elasticsearch::Helpers::BulkHelper</code></li>
 |        </ul>
 |        <p><strong>Submitting bulk requests with cURL</strong></p>
 |        <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>.
 |        The latter doesn't preserve newlines. For example:</p>
 |        <pre><code>$ cat requests
 |        { &quot;index&quot; : { &quot;_index&quot; : &quot;test&quot;, &quot;_id&quot; : &quot;1&quot; } }
 |        { &quot;field1&quot; : &quot;value1&quot; }
 |        $ curl -s -H &quot;Content-Type: application/x-ndjson&quot; -XPOST localhost:9200/_bulk --data-binary &quot;@requests&quot;; echo
 |        {&quot;took&quot;:7, &quot;errors&quot;: false, &quot;items&quot;:[{&quot;index&quot;:{&quot;_index&quot;:&quot;test&quot;,&quot;_id&quot;:&quot;1&quot;,&quot;_version&quot;:1,&quot;result&quot;:&quot;created&quot;,&quot;forced_refresh&quot;:false}}]}
 |        </code></pre>
 |        <p><strong>Optimistic concurrency control</strong></p>
 |        <p>Each <code>index</code> and <code>delete</code> action within a bulk API call may include the <code>if_seq_no</code> and <code>if_primary_term</code> parameters in their respective action and meta data lines.
 |        The <code>if_seq_no</code> and <code>if_primary_term</code> parameters control how operations are run, based on the last modification to existing documents. See Optimistic concurrency control for more details.</p>
 |        <p><strong>Versioning</strong></p>
 |        <p>Each bulk item can include the version value using the <code>version</code> field.
 |        It automatically follows the behavior of the index or delete operation based on the <code>_version</code> mapping.
 |        It also support the <code>version_type</code>.</p>
 |        <p><strong>Routing</strong></p>
 |        <p>Each bulk item can include the routing value using the <code>routing</code> field.
 |        It automatically follows the behavior of the index or delete operation based on the <code>_routing</code> mapping.</p>
 |        <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>
 |        <p><strong>Wait for active shards</strong></p>
 |        <p>When making bulk calls, you can set the <code>wait_for_active_shards</code> parameter to require a minimum number of shard copies to be active before starting to process the bulk request.</p>
 |        <p><strong>Refresh</strong></p>
 |        <p>Control when the changes made by this request are visible to search.</p>
 |        <p>NOTE: Only the shards that receive the bulk request will be affected by refresh.
 |        Imagine a <code>_bulk?refresh=wait_for</code> request with three documents in it that happen to be routed to different shards in an index with five shards.
 |        The request will only wait for those three shards to refresh.
 |        The other two shards that make up the index do not participate in the <code>_bulk</code> request at all.</p>
 |        <p>You might want to disable the refresh interval temporarily to improve indexing throughput for large bulk requests.
 |        Refer to the linked documentation for step-by-step instructions using the index settings API.</p>
 |
 |
 |      `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-bulk>`_
 |
 |      :param operations:
 |      :param index: The name of the data stream, index, or index alias to perform bulk
 |          actions on.
 |      :param include_source_on_error: True or false if to include the document source
 |          in the error message in case of parsing errors.
 |      :param list_executed_pipelines: If `true`, the response will include the ingest
 |          pipelines that were run for each index or create.
 |      :param pipeline: The pipeline identifier to use to preprocess incoming documents.
 |          If the index has a default ingest pipeline specified, setting the value to
 |          `_none` turns off the default ingest pipeline for this request. If a final
 |          pipeline is configured, it will always run regardless of the value of this
 |          parameter.
 |      :param refresh: If `true`, Elasticsearch refreshes the affected shards to make
 |          this operation visible to search. If `wait_for`, wait for a refresh to make
 |          this operation visible to search. If `false`, do nothing with refreshes.
 |          Valid values: `true`, `false`, `wait_for`.
 |      :param require_alias: If `true`, the request's actions must target an index alias.
 |      :param require_data_stream: If `true`, the request's actions must target a data
 |          stream (existing or to be created).
 |      :param routing: A custom value that is used to route operations to a specific
 |          shard.
 |      :param source: Indicates whether to return the `_source` field (`true` or `false`)
 |          or contains a list of fields to return.
 |      :param source_excludes: A comma-separated list of source fields to exclude from
 |          the response. You can also use this parameter to exclude fields from the
 |          subset specified in `_source_includes` query parameter. If the `_source`
 |          parameter is `false`, this parameter is ignored.
 |      :param source_includes: A comma-separated list of source fields to include in
 |          the response. If this parameter is specified, only these source fields are
 |          returned. You can exclude fields from this subset using the `_source_excludes`
 |          query parameter. If the `_source` parameter is `false`, this parameter is
 |          ignored.
 |      :param timeout: The period each action waits for the following operations: automatic
 |          index creation, dynamic mapping updates, and waiting for active shards. The
 |          default is `1m` (one minute), which guarantees Elasticsearch waits for at
 |          least the timeout before failing. The actual wait time could be longer, particularly
 |          when multiple waits occur.
 |      :param wait_for_active_shards: The number of shard copies that must be active
 |          before proceeding with the operation. Set to `all` or any positive integer
 |          up to the total number of shards in the index (`number_of_replicas+1`). The
 |          default is `1`, which waits for each primary shard to be active.
 |
 |  clear_scroll(self, *, error_trace: Optional[bool] = None, filter_path: Union[str, Sequence[str], NoneType] = None, human: Optional[bool] = None, pretty: Optional[bool] = None, scroll_id: Union[str, Sequence[str], NoneType] = None, body: Optional[Dict[str, Any]] = None) -> elastic_transport.ObjectApiResponse[typing.Any]
 |      .. raw:: html
 |
 |        <p>Clear a scrolling search.</p>
 |        <p>Clear the search context and results for a scrolling search.</p>
 |
 |
 |      `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation-clear-scroll>`_
 |
 |      :param scroll_id: The scroll IDs to clear. To clear all scroll IDs, use `_all`.
 |
 |  async close(self) -> None
 |      Closes the Transport and all internal connections
 |
 |  close_point_in_time(self, *, id: Optional[str] = None, error_trace: Optional[bool] = None, filter_path: Union[str, Sequence[str], NoneType] = None, human: Optional[bool] = None, pretty: Optional[bool] = None, body: Optional[Dict[str, Any]] = None) -> elastic_transport.ObjectApiResponse[typing.Any]
 |      .. raw:: html
 |
 |        <p>Close a point in time.</p>
 |        <p>A point in time must be opened explicitly before being used in search requests.
 |        The <code>keep_alive</code> parameter tells Elasticsearch how long it should persist.
 |        A point in time is automatically closed when the <code>keep_alive</code> period has elapsed.
 |        However, keeping points in time has a cost; close them as soon as they are no longer required for search requests.</p>
 |
 |
 |      `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation-open-point-in-time>`_
 |
 |      :param id: The ID of the point-in-time.
 |
 |  count(self, *, index: Union[str, Sequence[str], NoneType] = None, allow_no_indices: Optional[bool] = None, analyze_wildcard: Optional[bool] = None, analyzer: Optional[str] = None, default_operator: Union[str, Literal['and', 'or'], NoneType] = None, df: Optional[str] = None, error_trace: Optional[bool] = None, expand_wildcards: Union[Sequence[Union[str, Literal['all', 'closed', 'hidden', 'none', 'open']]], str, Literal['all', 'closed', 'hidden', 'none', 'open'], NoneType] = None, filter_path: Union[str, Sequence[str], NoneType] = None, human: Optional[bool] = None, ignore_throttled: Optional[bool] = None, ignore_unavailable: Optional[bool] = None, lenient: Optional[bool] = None, min_score: Optional[float] = None, preference: Optional[str] = None, pretty: Optional[bool] = None, project_routing: Optional[str] = None, q: Optional[str] = None, query: Optional[Mapping[str, Any]] = None, routing: Union[str, Sequence[str], NoneType] = None, terminate_after: Optional[int] = None, body: Optional[Dict[str, Any]] = None) -> elastic_transport.ObjectApiResponse[typing.Any]
 |      .. raw:: html
 |
 |        <p>Count search results.</p>
 |        <p>Get the number of documents matching a query.</p>
 |        <p>The query can be provided either by using a simple query string as a parameter, or by defining Query DSL within the request body.
 |        The query is optional. When no query is provided, the API uses <code>match_all</code> to count all the documents.</p>
 |        <p>The count API supports multi-target syntax. You can run a single count API search across multiple data streams and indices.</p>
 |        <p>The operation is broadcast across all shards.
 |        For each shard ID group, a replica is chosen and the search is run against it.
 |        This means that replicas increase the scalability of the count.</p>
 |
 |
 |      `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation-count>`_
 |
 |      :param index: A comma-separated list of data streams, indices, and aliases to
 |          search. It supports wildcards (`*`). To search all data streams and indices,
 |          omit this parameter or use `*` or `_all`.
 |      :param allow_no_indices: A setting that does two separate checks on the index
 |          expression. If `false`, the request returns an error (1) if any wildcard
 |          expression (including `_all` and `*`) resolves to zero matching indices or
 |          (2) if the complete set of resolved indices, aliases or data streams is empty
 |          after all expressions are evaluated. If `true`, index expressions that resolve
 |          to no indices are allowed and the request returns an empty result.
 |      :param analyze_wildcard: If `true`, wildcard and prefix queries are analyzed.
 |          This parameter can be used only when the `q` query string parameter is specified.
 |      :param analyzer: The analyzer to use for the query string. This parameter can
 |          be used only when the `q` query string parameter is specified.
 |      :param default_operator: The default operator for query string query: `and` or
 |          `or`. This parameter can be used only when the `q` query string parameter
 |          is specified.
 |      :param df: The field to use as a default when no field prefix is given in the
 |          query string. This parameter can be used only when the `q` query string parameter
 |          is specified.
 |      :param expand_wildcards: The type of index that wildcard patterns can match.
 |          If the request can target data streams, this argument determines whether
 |          wildcard expressions match hidden data streams. It supports comma-separated
 |          values, such as `open,hidden`.
 |      :param ignore_throttled: If `true`, concrete, expanded, or aliased indices are
 |          ignored when frozen.
 |      :param ignore_unavailable: If `false`, the request returns an error if it targets
 |          a concrete (non-wildcarded) index, alias, or data stream that is missing,
 |          closed, or otherwise unavailable. If `true`, unavailable concrete targets
 |          are silently ignored.
 |      :param lenient: If `true`, format-based query failures (such as providing text
 |          to a numeric field) in the query string will be ignored. This parameter can
 |          be used only when the `q` query string parameter is specified.
 |      :param min_score: The minimum `_score` value that documents must have to be included
 |          in the result.
 |      :param preference: The node or shard the operation should be performed on. By
 |          default, it is random.
 |      :param project_routing: Specifies a subset of projects to target using project
 |          metadata tags in a subset of Lucene query syntax. Allowed Lucene queries:
 |          the _alias tag and a single value (possibly wildcarded). Examples: _alias:my-project
 |          _alias:_origin _alias:*pr* Supported in serverless only.
 |      :param q: The query in Lucene query string syntax. This parameter cannot be used
 |          with a request body.
 |      :param query: Defines the search query using Query DSL. A request body query
 |          cannot be used with the `q` query string parameter.
 |      :param routing: A custom value used to route operations to a specific shard.
 |      :param terminate_after: The maximum number of documents to collect for each shard.
 |          If a query reaches this limit, Elasticsearch terminates the query early.
 |          Elasticsearch collects documents before sorting. IMPORTANT: Use with caution.
 |          Elasticsearch applies this parameter to each shard handling the request.
 |          When possible, let Elasticsearch perform early termination automatically.
 |          Avoid specifying this parameter for requests that target data streams with
 |          backing indices across multiple data tiers.
 |
 |  create(self, *, index: str, id: str, document: Optional[Mapping[str, Any]] = None, body: Optional[Mapping[str, Any]] = None, error_trace: Optional[bool] = None, filter_path: Union[str, Sequence[str], NoneType] = None, human: Optional[bool] = None, include_source_on_error: Optional[bool] = None, pipeline: Optional[str] = None, pretty: Optional[bool] = None, refresh: Union[bool, str, Literal['false', 'true', 'wait_for'], NoneType] = None, require_alias: Optional[bool] = None, require_data_stream: Optional[bool] = None, routing: Union[str, Sequence[str], NoneType] = None, timeout: Union[str, Literal[-1], Literal[0], NoneType] = None, version: Optional[int] = None, version_type: Union[str, Literal['external', 'external_gte', 'internal'], NoneType] = None, wait_for_active_shards: Union[int, str, Literal['all', 'index-setting'], NoneType] = None) -> elastic_transport.ObjectApiResponse[typing.Any]
 |      .. raw:: html
 |
 |        <p>Create a new document in the index.</p>
 |        <p>You can index a new JSON document with the <code>/&lt;target&gt;/_doc/</code> or <code>/&lt;target&gt;/_create/&lt;_id&gt;</code> APIs
 |        Using <code>_create</code> guarantees that the document is indexed only if it does not already exist.
 |        It returns a 409 response when a document with a same ID already exists in the index.
 |        To update an existing document, you must use the <code>/&lt;target&gt;/_doc/</code> API.</p>
 |        <p>If the Elasticsearch security features are enabled, you must have the following index privileges for the target data stream, index, or index alias:</p>
 |        <ul>
 |        <li>To add a document using the <code>PUT /&lt;target&gt;/_create/&lt;_id&gt;</code> or <code>POST /&lt;target&gt;/_create/&lt;_id&gt;</code> request formats, you must have the <code>create_doc</code>, <code>create</code>, <code>index</code>, or <code>write</code> index privilege.</li>
 |        <li>To automatically create a data stream or index with this API request, you must have the <code>auto_configure</code>, <code>create_index</code>, or <code>manage</code> index privilege.</li>
 |        </ul>
 |        <p>Automatic data stream creation requires a matching index template with data stream enabled.</p>
 |        <p><strong>Automatically create data streams and indices</strong></p>
 |        <p>If the request's target doesn't exist and matches an index template with a <code>data_stream</code> definition, the index operation automatically creates the data stream.</p>
 |        <p>If the target doesn't exist and doesn't match a data stream template, the operation automatically creates the index and applies any matching index templates.</p>
 |        <p>NOTE: Elasticsearch includes several built-in index templates. To avoid naming collisions with these templates, refer to index pattern documentation.</p>
 |        <p>If no mapping exists, the index operation creates a dynamic mapping.
 |        By default, new fields and objects are automatically added to the mapping if needed.</p>
 |        <p>Automatic index creation is controlled by the <code>action.auto_create_index</code> setting.
 |        If it is <code>true</code>, any index can be created automatically.
 |        You can modify this setting to explicitly allow or block automatic creation of indices that match specified patterns or set it to <code>false</code> to turn off automatic index creation entirely.
 |        Specify a comma-separated list of patterns you want to allow or prefix each pattern with <code>+</code> or <code>-</code> to indicate whether it should be allowed or blocked.
 |        When a list is specified, the default behaviour is to disallow.</p>
 |        <p>NOTE: The <code>action.auto_create_index</code> setting affects the automatic creation of indices only.
 |        It does not affect the creation of data streams.</p>
 |        <p><strong>Routing</strong></p>
 |        <p>By default, shard placement — or routing — is controlled by using a hash of the document's ID value.
 |        For more explicit control, the value fed into the hash function used by the router can be directly specified on a per-operation basis using the <code>routing</code> parameter.</p>
 |        <p>When setting up explicit mapping, you can also use the <code>_routing</code> field to direct the index operation to extract the routing value from the document itself.
 |        This does come at the (very minimal) cost of an additional document parsing pass.
 |        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>
 |        <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>
 |        <p><strong>Distributed</strong></p>
 |        <p>The index operation is directed to the primary shard based on its route and performed on the actual node containing this shard.
 |        After the primary shard completes the operation, if needed, the update is distributed to applicable replicas.</p>
 |        <p><strong>Active shards</strong></p>
 |        <p>To improve the resiliency of writes to the system, indexing operations can be configured to wait for a certain number of active shard copies before proceeding with the operation.
 |        If the requisite number of active shard copies are not available, then the write operation must wait and retry, until either the requisite shard copies have started or a timeout occurs.
 |        By default, write operations only wait for the primary shards to be active before proceeding (that is to say <code>wait_for_active_shards</code> is <code>1</code>).
 |        This default can be overridden in the index settings dynamically by setting <code>index.write.wait_for_active_shards</code>.
 |        To alter this behavior per operation, use the <code>wait_for_active_shards request</code> parameter.</p>
 |        <p>Valid values are all or any positive integer up to the total number of configured copies per shard in the index (which is <code>number_of_replicas</code>+1).
 |        Specifying a negative value or a number greater than the number of shard copies will throw an error.</p>
 |        <p>For example, suppose you have a cluster of three nodes, A, B, and C and you create an index index with the number of replicas set to 3 (resulting in 4 shard copies, one more copy than there are nodes).
 |        If you attempt an indexing operation, by default the operation will only ensure the primary copy of each shard is available before proceeding.
 |        This means that even if B and C went down and A hosted the primary shard copies, the indexing operation would still proceed with only one copy of the data.
 |        If <code>wait_for_active_shards</code> is set on the request to <code>3</code> (and all three nodes are up), the indexing operation will require 3 active shard copies before proceeding.
 |        This requirement should be met because there are 3 active nodes in the cluster, each one holding a copy of the shard.
 |        However, if you set <code>wait_for_active_shards</code> to <code>all</code> (or to <code>4</code>, which is the same in this situation), the indexing operation will not proceed as you do not have all 4 copies of each shard active in the index.
 |        The operation will timeout unless a new node is brought up in the cluster to host the fourth copy of the shard.</p>
 |        <p>It is important to note that this setting greatly reduces the chances of the write operation not writing to the requisite number of shard copies, but it does not completely eliminate the possibility, because this check occurs before the write operation starts.
 |        After the write operation is underway, it is still possible for replication to fail on any number of shard copies but still succeed on the primary.
 |        The <code>_shards</code> section of the API response reveals the number of shard copies on which replication succeeded and failed.</p>
 |
 |
 |      `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-create>`_
 |
 |      :param index: The name of the data stream or index to target. If the target doesn't
 |          exist and matches the name or wildcard (`*`) pattern of an index template
 |          with a `data_stream` definition, this request creates the data stream. If
 |          the target doesn't exist and doesn’t match a data stream template, this request
 |          creates the index.
 |      :param id: A unique identifier for the document. To automatically generate a
 |          document ID, use the `POST /<target>/_doc/` request format.
 |      :param document:
 |      :param include_source_on_error: True or false if to include the document source
 |          in the error message in case of parsing errors.
 |      :param pipeline: The ID of the pipeline to use to preprocess incoming documents.
 |          If the index has a default ingest pipeline specified, setting the value to
 |          `_none` turns off the default ingest pipeline for this request. If a final
 |          pipeline is configured, it will always run regardless of the value of this
 |          parameter.
 |      :param refresh: If `true`, Elasticsearch refreshes the affected shards to make
 |          this operation visible to search. If `wait_for`, it waits for a refresh to
 |          make this operation visible to search. If `false`, it does nothing with refreshes.
 |      :param require_alias: If `true`, the destination must be an index alias.
 |      :param require_data_stream: If `true`, the request's actions must target a data
 |          stream (existing or to be created).
 |      :param routing: A custom value that is used to route operations to a specific
 |          shard.
 |      :param timeout: The period the request waits for the following operations: automatic
 |          index creation, dynamic mapping updates, waiting for active shards. Elasticsearch
 |          waits for at least the specified timeout period before failing. The actual
 |          wait time could be longer, particularly when multiple waits occur. This parameter
 |          is useful for situations where the primary shard assigned to perform the
 |          operation might not be available when the operation runs. Some reasons for
 |          this might be that the primary shard is currently recovering from a gateway
 |          or undergoing relocation. By default, the operation will wait on the primary
 |          shard to become available for at least 1 minute before failing and responding
 |          with an error. The actual wait time could be longer, particularly when multiple
 |          waits occur.
 |      :param version: The explicit version number for concurrency control. It must
 |          be a non-negative long number.
 |      :param version_type: The version type.
 |      :param wait_for_active_shards: The number of shard copies that must be active
 |          before proceeding with the operation. You can set it to `all` or any positive
 |          integer up to the total number of shards in the index (`number_of_replicas+1`).
 |          The default value of `1` means it waits for each primary shard to be active.
 |
 |  delete(self, *, index: str, id: str, error_trace: Optional[bool] = None, filter_path: Union[str, Sequence[str], NoneType] = None, human: Optional[bool] = None, if_primary_term: Optional[int] = None, if_seq_no: Optional[int] = None, pretty: Optional[bool] = None, refresh: Union[bool, str, Literal['false', 'true', 'wait_for'], NoneType] = None, routing: Union[str, Sequence[str], NoneType] = None, timeout: Union[str, Literal[-1], Literal[0], NoneType] = None, version: Optional[int] = None, version_type: Union[str, Literal['external', 'external_gte', 'internal'], NoneType] = None, wait_for_active_shards: Union[int, str, Literal['all', 'index-setting'], NoneType] = None) -> elastic_transport.ObjectApiResponse[typing.Any]
 |      .. raw:: html
 |
 |        <p>Delete a document.</p>
 |        <p>Remove a JSON document from the specified index.</p>
 |        <p>NOTE: You cannot send deletion requests directly to a data stream.
 |        To delete a document in a data stream, you must target the backing index containing the document.</p>
 |        <p><strong>Optimistic concurrency control</strong></p>
 |        <p>Delete operations can be made conditional and only be performed if the last modification to the document was assigned the sequence number and primary term specified by the <code>if_seq_no</code> and <code>if_primary_term</code> parameters.
 |        If a mismatch is detected, the operation will result in a <code>VersionConflictException</code> and a status code of <code>409</code>.</p>
 |        <p><strong>Versioning</strong></p>
 |        <p>Each document indexed is versioned.
 |        When deleting a document, the version can be specified to make sure the relevant document you are trying to delete is actually being deleted and it has not changed in the meantime.
 |        Every write operation run on a document, deletes included, causes its version to be incremented.
 |        The version number of a deleted document remains available for a short time after deletion to allow for control of concurrent operations.
 |        The length of time for which a deleted document's version remains available is determined by the <code>index.gc_deletes</code> index setting.</p>
 |        <p><strong>Routing</strong></p>
 |        <p>If routing is used during indexing, the routing value also needs to be specified to delete a document.</p>
 |        <p>If the <code>_routing</code> mapping is set to <code>required</code> and no routing value is specified, the delete API throws a <code>RoutingMissingException</code> and rejects the request.</p>
 |        <p>For example:</p>
 |        <pre><code>DELETE /my-index-000001/_doc/1?routing=shard-1
 |        </code></pre>
 |        <p>This request deletes the document with ID 1, but it is routed based on the user.
 |        The document is not deleted if the correct routing is not specified.</p>
 |        <p><strong>Distributed</strong></p>
 |        <p>The delete operation gets hashed into a specific shard ID.
 |        It then gets redirected into the primary shard within that ID group and replicated (if needed) to shard replicas within that ID group.</p>
 |
 |
 |      `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-delete>`_
 |
 |      :param index: The name of the target index.
 |      :param id: A unique identifier for the document.
 |      :param if_primary_term: Only perform the operation if the document has this primary
 |          term.
 |      :param if_seq_no: Only perform the operation if the document has this sequence
 |          number.
 |      :param refresh: If `true`, Elasticsearch refreshes the affected shards to make
 |          this operation visible to search. If `wait_for`, it waits for a refresh to
 |          make this operation visible to search. If `false`, it does nothing with refreshes.
 |      :param routing: A custom value used to route operations to a specific shard.
 |      :param timeout: The period to wait for active shards. This parameter is useful
 |          for situations where the primary shard assigned to perform the delete operation
 |          might not be available when the delete operation runs. Some reasons for this
 |          might be that the primary shard is currently recovering from a store or undergoing
 |          relocation. By default, the delete operation will wait on the primary shard
 |          to become available for up to 1 minute before failing and responding with
 |          an error.
 |      :param version: An explicit version number for concurrency control. It must match
 |          the current version of the document for the request to succeed.
 |      :param version_type: The version type.
 |      :param wait_for_active_shards: The minimum number of shard copies that must be
 |          active before proceeding with the operation. You can set it to `all` or any
 |          positive integer up to the total number of shards in the index (`number_of_replicas+1`).
 |          The default value of `1` means it waits for each primary shard to be active.
 |
 |  delete_by_query(self, *, index: Union[str, Sequence[str]], allow_no_indices: Optional[bool] = None, analyze_wildcard: Optional[bool] = None, analyzer: Optional[str] = None, conflicts: Union[str, Literal['abort', 'proceed'], NoneType] = None, default_operator: Union[str, Literal['and', 'or'], NoneType] = None, df: Optional[str] = None, error_trace: Optional[bool] = None, expand_wildcards: Union[Sequence[Union[str, Literal['all', 'closed', 'hidden', 'none', 'open']]], str, Literal['all', 'closed', 'hidden', 'none', 'open'], NoneType] = None, filter_path: Union[str, Sequence[str], NoneType] = None, from_: Optional[int] = None, human: Optional[bool] = None, ignore_unavailable: Optional[bool] = None, lenient: Optional[bool] = None, max_docs: Optional[int] = None, preference: Optional[str] = None, pretty: Optional[bool] = None, q: Optional[str] = None, query: Optional[Mapping[str, Any]] = None, refresh: Optional[bool] = None, request_cache: Optional[bool] = None, requests_per_second: Optional[float] = None, routing: Union[str, Sequence[str], NoneType] = None, scroll: Union[str, Literal[-1], Literal[0], NoneType] = None, scroll_size: Optional[int] = None, search_timeout: Union[str, Literal[-1], Literal[0], NoneType] = None, search_type: Union[str, Literal['dfs_query_then_fetch', 'query_then_fetch'], NoneType] = None, slice: Optional[Mapping[str, Any]] = None, slices: Union[int, str, Literal['auto'], NoneType] = None, sort: Union[Sequence[Union[str, Mapping[str, Any]]], str, Mapping[str, Any], NoneType] = None, stats: Optional[Sequence[str]] = None, terminate_after: Optional[int] = None, timeout: Union[str, Literal[-1], Literal[0], NoneType] = None, version: Optional[bool] = None, wait_for_active_shards: Union[int, str, Literal['all', 'index-setting'], NoneType] = None, wait_for_completion: Optional[bool] = None, body: Optional[Dict[str, Any]] = None) -> elastic_transport.ObjectApiResponse[typing.Any]
 |      .. raw:: html
 |
 |        <p>Delete documents.</p>
 |        <p>Deletes documents that match the specified query.</p>
 |        <p>If the Elasticsearch security features are enabled, you must have the following index privileges for the target data stream, index, or alias:</p>
 |        <ul>
 |        <li><code>read</code></li>
 |        <li><code>delete</code> or <code>write</code></li>
 |        </ul>
 |        <p>You can specify the query criteria in the request URI or the request body using the same syntax as the search API.
 |        When you submit a delete by query request, Elasticsearch gets a snapshot of the data stream or index when it begins processing the request and deletes matching documents using internal versioning.
 |        If a document changes between the time that the snapshot is taken and the delete operation is processed, it results in a version conflict and the delete operation fails.</p>
 |        <p>NOTE: Documents with a version equal to 0 cannot be deleted using delete by query because internal versioning does not support 0 as a valid version number.</p>
 |        <p>While processing a delete by query request, Elasticsearch performs multiple search requests sequentially to find all of the matching documents to delete.
 |        A bulk delete request is performed for each batch of matching documents.
 |        If a search or bulk request is rejected, the requests are retried up to 10 times, with exponential back off.
 |        If the maximum retry limit is reached, processing halts and all failed requests are returned in the response.
 |        Any delete requests that completed successfully still stick, they are not rolled back.</p>
 |        <p>You can opt to count version conflicts instead of halting and returning by setting <code>conflicts</code> to <code>proceed</code>.
 |        Note that if you opt to count version conflicts the operation could attempt to delete more documents from the source than <code>max_docs</code> until it has successfully deleted <code>max_docs documents</code>, or it has gone through every document in the source query.</p>
 |        <p><strong>Throttling delete requests</strong></p>
 |        <p>To control the rate at which delete by query issues batches of delete operations, you can set <code>requests_per_second</code> to any positive decimal number.
 |        This pads each batch with a wait time to throttle the rate.
 |        Set <code>requests_per_second</code> to <code>-1</code> to disable throttling.</p>
 |        <p>Throttling uses a wait time between batches so that the internal scroll requests can be given a timeout that takes the request padding into account.
 |        The padding time is the difference between the batch size divided by the <code>requests_per_second</code> and the time spent writing.
 |        By default the batch size is <code>1000</code>, so if <code>requests_per_second</code> is set to <code>500</code>:</p>
 |        <pre><code>target_time = 1000 / 500 per second = 2 seconds
 |        wait_time = target_time - write_time = 2 seconds - .5 seconds = 1.5 seconds
 |        </code></pre>
 |        <p>Since the batch is issued as a single <code>_bulk</code> request, large batch sizes cause Elasticsearch to create many requests and wait before starting the next set.
 |        This is &quot;bursty&quot; instead of &quot;smooth&quot;.</p>
 |        <p><strong>Slicing</strong></p>
 |        <p>Delete by query supports sliced scroll to parallelize the delete process.
 |        This can improve efficiency and provide a convenient way to break the request down into smaller parts.</p>
 |        <p>Setting <code>slices</code> to <code>auto</code> lets Elasticsearch choose the number of slices to use.
 |        This setting will use one slice per shard, up to a certain limit.
 |        If there are multiple source data streams or indices, it will choose the number of slices based on the index or backing index with the smallest number of shards.
 |        Adding slices to the delete by query operation creates sub-requests which means it has some quirks:</p>
 |        <ul>
 |        <li>You can see these requests in the tasks APIs. These sub-requests are &quot;child&quot; tasks of the task for the request with slices.</li>
 |        <li>Fetching the status of the task for the request with slices only contains the status of completed slices.</li>
 |        <li>These sub-requests are individually addressable for things like cancellation and rethrottling.</li>
 |        <li>Rethrottling the request with <code>slices</code> will rethrottle the unfinished sub-request proportionally.</li>
 |        <li>Canceling the request with <code>slices</code> will cancel each sub-request.</li>
 |        <li>Due to the nature of <code>slices</code> each sub-request won't get a perfectly even portion of the documents. All documents will be addressed, but some slices may be larger than others. Expect larger slices to have a more even distribution.</li>
 |        <li>Parameters like <code>requests_per_second</code> and <code>max_docs</code> on a request with <code>slices</code> are distributed proportionally to each sub-request. Combine that with the earlier point about distribution being uneven and you should conclude that using <code>max_docs</code> with <code>slices</code> might not result in exactly <code>max_docs</code> documents being deleted.</li>
 |        <li>Each sub-request gets a slightly different snapshot of the source data stream or index though these are all taken at approximately the same time.</li>
 |        </ul>
 |        <p>If you're slicing manually or otherwise tuning automatic slicing, keep in mind that:</p>
 |        <ul>
 |        <li>Query performance is most efficient when the number of slices is equal to the number of shards in the index or backing index. If that number is large (for example, 500), choose a lower number as too many <code>slices</code> hurts performance. Setting <code>slices</code> higher than the number of shards generally does not improve efficiency and adds overhead.</li>
 |        <li>Delete performance scales linearly across available resources with the number of slices.</li>
 |        </ul>
 |        <p>Whether query or delete performance dominates the runtime depends on the documents being reindexed and cluster resources.</p>
 |        <p><strong>Cancel a delete by query operation</strong></p>
 |        <p>Any delete by query can be canceled using the task cancel API. For example:</p>
 |        <pre><code>POST _tasks/r1A2WoRbTwKZ516z6NEs5A:36619/_cancel
 |        </code></pre>
 |        <p>The task ID can be found by using the get tasks API.</p>
 |        <p>Cancellation should happen quickly but might take a few seconds.
 |        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>
 |
 |
 |      `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-delete-by-query>`_
 |
 |      :param index: A comma-separated list of data streams, indices, and aliases to
 |          search. It supports wildcards (`*`). To search all data streams or indices,
 |          omit this parameter or use `*` or `_all`.
 |      :param allow_no_indices: A setting that does two separate checks on the index
 |          expression. If `false`, the request returns an error (1) if any wildcard
 |          expression (including `_all` and `*`) resolves to zero matching indices or
 |          (2) if the complete set of resolved indices, aliases or data streams is empty
 |          after all expressions are evaluated. If `true`, index expressions that resolve
 |          to no indices are allowed and the request returns an empty result.
 |      :param analyze_wildcard: If `true`, wildcard and prefix queries are analyzed.
 |          This parameter can be used only when the `q` query string parameter is specified.
 |      :param analyzer: Analyzer to use for the query string. This parameter can be
 |          used only when the `q` query string parameter is specified.
 |      :param conflicts: What to do if delete by query hits version conflicts: `abort`
 |          or `proceed`.
 |      :param default_operator: The default operator for query string query: `and` or
 |          `or`. This parameter can be used only when the `q` query string parameter
 |          is specified.
 |      :param df: The field to use as default where no field prefix is given in the
 |          query string. This parameter can be used only when the `q` query string parameter
 |          is specified.
 |      :param expand_wildcards: The type of index that wildcard patterns can match.
 |          If the request can target data streams, this argument determines whether
 |          wildcard expressions match hidden data streams. It supports comma-separated
 |          values, such as `open,hidden`.
 |      :param from_: Skips the specified number of documents.
 |      :param ignore_unavailable: If `false`, the request returns an error if it targets
 |          a concrete (non-wildcarded) index, alias, or data stream that is missing,
 |          closed, or otherwise unavailable. If `true`, unavailable concrete targets
 |          are silently ignored.
 |      :param lenient: If `true`, format-based query failures (such as providing text
 |          to a numeric field) in the query string will be ignored. This parameter can
 |          be used only when the `q` query string parameter is specified.
 |      :param max_docs: The maximum number of documents to delete.
 |      :param preference: The node or shard the operation should be performed on. It
 |          is random by default.
 |      :param q: A query in the Lucene query string syntax.
 |      :param query: The documents to delete specified with Query DSL.
 |      :param refresh: If `true`, Elasticsearch refreshes all shards involved in the
 |          delete by query after the request completes. This is different than the delete
 |          API's `refresh` parameter, which causes just the shard that received the
 |          delete request to be refreshed. Unlike the delete API, it does not support
 |          `wait_for`.
 |      :param request_cache: If `true`, the request cache is used for this request.
 |          Defaults to the index-level setting.
 |      :param requests_per_second: The throttle for this request in sub-requests per
 |          second.
 |      :param routing: A custom value used to route operations to a specific shard.
 |      :param scroll: The period to retain the search context for scrolling.
 |      :param scroll_size: The size of the scroll request that powers the operation.
 |      :param search_timeout: The explicit timeout for each search request. It defaults
 |          to no timeout.
 |      :param search_type: The type of the search operation. Available options include
 |          `query_then_fetch` and `dfs_query_then_fetch`.
 |      :param slice: Slice the request manually using the provided slice ID and total
 |          number of slices.
 |      :param slices: The number of slices this task should be divided into.
 |      :param sort: A sort object that specifies the order of deleted documents.
 |      :param stats: The specific `tag` of the request for logging and statistical purposes.
 |      :param terminate_after: The maximum number of documents to collect for each shard.
 |          If a query reaches this limit, Elasticsearch terminates the query early.
 |          Elasticsearch collects documents before sorting. Use with caution. Elasticsearch
 |          applies this parameter to each shard handling the request. When possible,
 |          let Elasticsearch perform early termination automatically. Avoid specifying
 |          this parameter for requests that target data streams with backing indices
 |          across multiple data tiers.
 |      :param timeout: The period each deletion request waits for active shards.
 |      :param version: If `true`, returns the document version as part of a hit.
 |      :param wait_for_active_shards: The number of shard copies that must be active
 |          before proceeding with the operation. Set to `all` or any positive integer
 |          up to the total number of shards in the index (`number_of_replicas+1`). The
 |          `timeout` value controls how long each write request waits for unavailable
 |          shards to become available.
 |      :param wait_for_completion: If `true`, the request blocks until the operation
 |          is complete. If `false`, Elasticsearch performs some preflight checks, launches
 |          the request, and returns a task you can use to cancel or get the status of
 |          the task. Elasticsearch creates a record of this task as a document at `.tasks/task/${taskId}`.
 |          When you are done with a task, you should delete the task document so Elasticsearch
 |          can reclaim the space.
 |
 |  delete_by_query_rethrottle(self, *, task_id: str, requests_per_second: float, error_trace: Optional[bool] = None, filter_path: Union[str, Sequence[str], NoneType] = None, human: Optional[bool] = None, pretty: Optional[bool] = None) -> elastic_transport.ObjectApiResponse[typing.Any]
 |      .. raw:: html
 |
 |        <p>Throttle a delete by query operation.</p>
 |        <p>Change the number of requests per second for a particular delete by query operation.
 |        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>
 |
 |
 |      `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-delete-by-query-rethrottle>`_
 |
 |      :param task_id: The ID for the task.
 |      :param requests_per_second: The throttle for this request in sub-requests per
 |          second. To disable throttling, set it to `-1`.
 |
 |  delete_script(self, *, id: str, error_trace: Optional[bool] = None, filter_path: Union[str, Sequence[str], NoneType] = None, human: Optional[bool] = None, master_timeout: Union[str, Literal[-1], Literal[0], NoneType] = None, pretty: Optional[bool] = None, timeout: Union[str, Literal[-1], Literal[0], NoneType] = None) -> elastic_transport.ObjectApiResponse[typing.Any]
 |      .. raw:: html
 |
 |        <p>Delete a script or search template.</p>
 |        <p>Deletes a stored script or search template.</p>
 |
 |
 |      `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation-delete-script>`_
 |
 |      :param id: The identifier for the stored script or search template.
 |      :param master_timeout: The period to wait for a connection to the master node.
 |          If no response is received before the timeout expires, the request fails
 |          and returns an error. It can also be set to `-1` to indicate that the request
 |          should never timeout.
 |      :param timeout: The period to wait for a response. If no response is received
 |          before the timeout expires, the request fails and returns an error. It can
 |          also be set to `-1` to indicate that the request should never timeout.
 |
 |  exists(self, *, index: str, id: str, error_trace: Optional[bool] = None, filter_path: Union[str, Sequence[str], NoneType] = None, human: Optional[bool] = None, preference: Optional[str] = None, pretty: Optional[bool] = None, realtime: Optional[bool] = None, refresh: Optional[bool] = None, routing: Union[str, Sequence[str], NoneType] = None, source: Union[bool, str, Sequence[str], NoneType] = None, source_excludes: Union[str, Sequence[str], NoneType] = None, source_includes: Union[str, Sequence[str], NoneType] = None, stored_fields: Union[str, Sequence[str], NoneType] = None, version: Optional[int] = None, version_type: Union[str, Literal['external', 'external_gte', 'internal'], NoneType] = None) -> elastic_transport.HeadApiResponse
 |      .. raw:: html
 |
 |        <p>Check a document.</p>
 |        <p>Verify that a document exists.
 |        For example, check to see if a document with the <code>_id</code> 0 exists:</p>
 |        <pre><code>HEAD my-index-000001/_doc/0
 |        </code></pre>
 |        <p>If the document exists, the API returns a status code of <code>200 - OK</code>.
 |        If the document doesn’t exist, the API returns <code>404 - Not Found</code>.</p>
 |        <p><strong>Versioning support</strong></p>
 |        <p>You can use the <code>version</code> parameter to check the document only if its current version is equal to the specified one.</p>
 |        <p>Internally, Elasticsearch has marked the old document as deleted and added an entirely new document.
 |        The old version of the document doesn't disappear immediately, although you won't be able to access it.
 |        Elasticsearch cleans up deleted documents in the background as you continue to index more data.</p>
 |
 |
 |      `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-get>`_
 |
 |      :param index: A comma-separated list of data streams, indices, and aliases. It
 |          supports wildcards (`*`).
 |      :param id: A unique document identifier.
 |      :param preference: The node or shard the operation should be performed on. By
 |          default, the operation is randomized between the shard replicas. If it is
 |          set to `_local`, the operation will prefer to be run on a local allocated
 |          shard when possible. If it is set to a custom value, the value is used to
 |          guarantee that the same shards will be used for the same custom value. This
 |          can help with "jumping values" when hitting different shards in different
 |          refresh states. A sample value can be something like the web session ID or
 |          the user name.
 |      :param realtime: If `true`, the request is real-time as opposed to near-real-time.
 |      :param refresh: If `true`, the request refreshes the relevant shards before retrieving
 |          the document. Setting it to `true` should be done after careful thought and
 |          verification that this does not cause a heavy load on the system (and slow
 |          down indexing).
 |      :param routing: A custom value used to route operations to a specific shard.
 |      :param source: Indicates whether to return the `_source` field (`true` or `false`)
 |          or lists the fields to return.
 |      :param source_excludes: A comma-separated list of source fields to exclude from
 |          the response. You can also use this parameter to exclude fields from the
 |          subset specified in `_source_includes` query parameter. If the `_source`
 |          parameter is `false`, this parameter is ignored.
 |      :param source_includes: A comma-separated list of source fields to include in
 |          the response. If this parameter is specified, only these source fields are
 |          returned. You can exclude fields from this subset using the `_source_excludes`
 |          query parameter. If the `_source` parameter is `false`, this parameter is
 |          ignored.
 |      :param stored_fields: A comma-separated list of stored fields to return as part
 |          of a hit. If no fields are specified, no stored fields are included in the
 |          response. If this field is specified, the `_source` parameter defaults to
 |          `false`.
 |      :param version: Explicit version number for concurrency control. The specified
 |          version must match the current version of the document for the request to
 |          succeed.
 |      :param version_type: The version type.
 |
 |  exists_source(self, *, index: str, id: str, error_trace: Optional[bool] = None, filter_path: Union[str, Sequence[str], NoneType] = None, human: Optional[bool] = None, preference: Optional[str] = None, pretty: Optional[bool] = None, realtime: Optional[bool] = None, refresh: Optional[bool] = None, routing: Union[str, Sequence[str], NoneType] = None, source: Union[bool, str, Sequence[str], NoneType] = None, source_excludes: Union[str, Sequence[str], NoneType] = None, source_includes: Union[str, Sequence[str], NoneType] = None, version: Optional[int] = None, version_type: Union[str, Literal['external', 'external_gte', 'internal'], NoneType] = None) -> elastic_transport.HeadApiResponse
 |      .. raw:: html
 |
 |        <p>Check for a document source.</p>
 |        <p>Check whether a document source exists in an index.
 |        For example:</p>
 |        <pre><code>HEAD my-index-000001/_source/1
 |        </code></pre>
 |        <p>A document's source is not available if it is disabled in the mapping.</p>
 |
 |
 |      `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-get>`_
 |
 |      :param index: A comma-separated list of data streams, indices, and aliases. It
 |          supports wildcards (`*`).
 |      :param id: A unique identifier for the document.
 |      :param preference: The node or shard the operation should be performed on. By
 |          default, the operation is randomized between the shard replicas.
 |      :param realtime: If `true`, the request is real-time as opposed to near-real-time.
 |      :param refresh: If `true`, the request refreshes the relevant shards before retrieving
 |          the document. Setting it to `true` should be done after careful thought and
 |          verification that this does not cause a heavy load on the system (and slow
 |          down indexing).
 |      :param routing: A custom value used to route operations to a specific shard.
 |      :param source: Indicates whether to return the `_source` field (`true` or `false`)
 |          or lists the fields to return.
 |      :param source_excludes: A comma-separated list of source fields to exclude in
 |          the response.
 |      :param source_includes: A comma-separated list of source fields to include in
 |          the response.
 |      :param version: The version number for concurrency control. It must match the
 |          current version of the document for the request to succeed.
 |      :param version_type: The version type.
 |
 |  explain(self, *, index: str, id: str, analyze_wildcard: Optional[bool] = None, analyzer: Optional[str] = None, default_operator: Union[str, Literal['and', 'or'], NoneType] = None, df: Optional[str] = None, error_trace: Optional[bool] = None, filter_path: Union[str, Sequence[str], NoneType] = None, human: Optional[bool] = None, lenient: Optional[bool] = None, preference: Optional[str] = None, pretty: Optional[bool] = None, q: Optional[str] = None, query: Optional[Mapping[str, Any]] = None, routing: Union[str, Sequence[str], NoneType] = None, source: Union[bool, str, Sequence[str], NoneType] = None, source_excludes: Union[str, Sequence[str], NoneType] = None, source_includes: Union[str, Sequence[str], NoneType] = None, stored_fields: Union[str, Sequence[str], NoneType] = None, body: Optional[Dict[str, Any]] = None) -> elastic_transport.ObjectApiResponse[typing.Any]
 |      .. raw:: html
 |
 |        <p>Explain a document match result.</p>
 |        <p>Get information about why a specific document matches, or doesn't match, a query.
 |        It computes a score explanation for a query and a specific document.</p>
 |
 |
 |      `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation-explain>`_
 |
 |      :param index: Index names that are used to limit the request. Only a single index
 |          name can be provided to this parameter.
 |      :param id: The document identifier.
 |      :param analyze_wildcard: If `true`, wildcard and prefix queries are analyzed.
 |          This parameter can be used only when the `q` query string parameter is specified.
 |      :param analyzer: The analyzer to use for the query string. This parameter can
 |          be used only when the `q` query string parameter is specified.
 |      :param default_operator: The default operator for query string query: `and` or
 |          `or`. This parameter can be used only when the `q` query string parameter
 |          is specified.
 |      :param df: The field to use as default where no field prefix is given in the
 |          query string. This parameter can be used only when the `q` query string parameter
 |          is specified.
 |      :param lenient: If `true`, format-based query failures (such as providing text
 |          to a numeric field) in the query string will be ignored. This parameter can
 |          be used only when the `q` query string parameter is specified.
 |      :param preference: The node or shard the operation should be performed on. It
 |          is random by default.
 |      :param q: The query in the Lucene query string syntax.
 |      :param query: Defines the search definition using the Query DSL.
 |      :param routing: A custom value used to route operations to a specific shard.
 |      :param source: `True` or `false` to return the `_source` field or not or a list
 |          of fields to return.
 |      :param source_excludes: A comma-separated list of source fields to exclude from
 |          the response. You can also use this parameter to exclude fields from the
 |          subset specified in `_source_includes` query parameter. If the `_source`
 |          parameter is `false`, this parameter is ignored.
 |      :param source_includes: A comma-separated list of source fields to include in
 |          the response. If this parameter is specified, only these source fields are
 |          returned. You can exclude fields from this subset using the `_source_excludes`
 |          query parameter. If the `_source` parameter is `false`, this parameter is
 |          ignored.
 |      :param stored_fields: A comma-separated list of stored fields to return in the
 |          response.
 |
 |  field_caps(self, *, index: Union[str, Sequence[str], NoneType] = None, allow_no_indices: Optional[bool] = None, error_trace: Optional[bool] = None, expand_wildcards: Union[Sequence[Union[str, Literal['all', 'closed', 'hidden', 'none', 'open']]], str, Literal['all', 'closed', 'hidden', 'none', 'open'], NoneType] = None, fields: Union[str, Sequence[str], NoneType] = None, filter_path: Union[str, Sequence[str], NoneType] = None, filters: Union[str, Sequence[str], NoneType] = None, human: Optional[bool] = None, ignore_unavailable: Optional[bool] = None, include_empty_fields: Optional[bool] = None, include_unmapped: Optional[bool] = None, index_filter: Optional[Mapping[str, Any]] = None, pretty: Optional[bool] = None, project_routing: Optional[str] = None, runtime_mappings: Optional[Mapping[str, Mapping[str, Any]]] = None, types: Optional[Sequence[str]] = None, body: Optional[Dict[str, Any]] = None) -> elastic_transport.ObjectApiResponse[typing.Any]
 |      .. raw:: html
 |
 |        <p>Get the field capabilities.</p>
 |        <p>Get information about the capabilities of fields among multiple indices.</p>
 |        <p>For data streams, the API returns field capabilities among the stream’s backing indices.
 |        It returns runtime fields like any other field.
 |        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>
 |
 |
 |      `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation-field-caps>`_
 |
 |      :param index: A comma-separated list of data streams, indices, and aliases used
 |          to limit the request. Supports wildcards (*). To target all data streams
 |          and indices, omit this parameter or use * or _all.
 |      :param allow_no_indices: A setting that does two separate checks on the index
 |          expression. If `false`, the request returns an error (1) if any wildcard
 |          expression (including `_all` and `*`) resolves to zero matching indices or
 |          (2) if the complete set of resolved indices, aliases or data streams is empty
 |          after all expressions are evaluated. If `true`, index expressions that resolve
 |          to no indices are allowed and the request returns an empty result.
 |      :param expand_wildcards: The type of index that wildcard patterns can match.
 |          If the request can target data streams, this argument determines whether
 |          wildcard expressions match hidden data streams. Supports comma-separated
 |          values, such as `open,hidden`.
 |      :param fields: A list of fields to retrieve capabilities for. Wildcard (`*`)
 |          expressions are supported.
 |      :param filters: A comma-separated list of filters to apply to the response.
 |      :param ignore_unavailable: If `false`, the request returns an error if it targets
 |          a concrete (non-wildcarded) index, alias, or data stream that is missing,
 |          closed, or otherwise unavailable. If `true`, unavailable concrete targets
 |          are silently ignored.
 |      :param include_empty_fields: If false, empty fields are not included in the response.
 |      :param include_unmapped: If true, unmapped fields are included in the response.
 |      :param index_filter: Filter indices if the provided query rewrites to `match_none`
 |          on every shard. IMPORTANT: The filtering is done on a best-effort basis,
 |          it uses index statistics and mappings to rewrite queries to `match_none`
 |          instead of fully running the request. For instance a range query over a date
 |          field can rewrite to `match_none` if all documents within a shard (including
 |          deleted documents) are outside of the provided range. However, not all queries
 |          can rewrite to `match_none` so this API may return an index even if the provided
 |          filter matches no document.
 |      :param project_routing: Specifies a subset of projects to target for the field-caps
 |          query using project metadata tags in a subset of Lucene query syntax. Allowed
 |          Lucene queries: the _alias tag and a single value (possibly wildcarded).
 |          Examples: _alias:my-project _alias:_origin _alias:*pr* Supported in serverless
 |          only.
 |      :param runtime_mappings: Define ad-hoc runtime fields in the request similar
 |          to the way it is done in search requests. These fields exist only as part
 |          of the query and take precedence over fields defined with the same name in
 |          the index mappings.
 |      :param types: A comma-separated list of field types to include. Any fields that
 |          do not match one of these types will be excluded from the results. It defaults
 |          to empty, meaning that all field types are returned.
 |
 |  get(self, *, index: str, id: str, error_trace: Optional[bool] = None, filter_path: Union[str, Sequence[str], NoneType] = None, force_synthetic_source: Optional[bool] = None, human: Optional[bool] = None, preference: Optional[str] = None, pretty: Optional[bool] = None, realtime: Optional[bool] = None, refresh: Optional[bool] = None, routing: Union[str, Sequence[str], NoneType] = None, source: Union[bool, str, Sequence[str], NoneType] = None, source_exclude_vectors: Optional[bool] = None, source_excludes: Union[str, Sequence[str], NoneType] = None, source_includes: Union[str, Sequence[str], NoneType] = None, stored_fields: Union[str, Sequence[str], NoneType] = None, version: Optional[int] = None, version_type: Union[str, Literal['external', 'external_gte', 'internal'], NoneType] = None) -> elastic_transport.ObjectApiResponse[typing.Any]
 |      .. raw:: html
 |
 |        <p>Get a document by its ID.</p>
 |        <p>Get a document and its source or stored fields from an index.</p>
 |        <p>By default, this API is realtime and is not affected by the refresh rate of the index (when data will become visible for search).
 |        In the case where stored fields are requested with the <code>stored_fields</code> parameter and the document has been updated but is not yet refreshed, the API will have to parse and analyze the source to extract the stored fields.
 |        To turn off realtime behavior, set the <code>realtime</code> parameter to false.</p>
 |        <p><strong>Source filtering</strong></p>
 |        <p>By default, the API returns the contents of the <code>_source</code> field unless you have used the <code>stored_fields</code> parameter or the <code>_source</code> field is turned off.
 |        You can turn off <code>_source</code> retrieval by using the <code>_source</code> parameter:</p>
 |        <pre><code>GET my-index-000001/_doc/0?_source=false
 |        </code></pre>
 |        <p>If you only need one or two fields from the <code>_source</code>, use the <code>_source_includes</code> or <code>_source_excludes</code> parameters to include or filter out particular fields.
 |        This can be helpful with large documents where partial retrieval can save on network overhead
 |        Both parameters take a comma separated list of fields or wildcard expressions.
 |        For example:</p>
 |        <pre><code>GET my-index-000001/_doc/0?_source_includes=*.id&amp;_source_excludes=entities
 |        </code></pre>
 |        <p>If you only want to specify includes, you can use a shorter notation:</p>
 |        <pre><code>GET my-index-000001/_doc/0?_source=*.id
 |        </code></pre>
 |        <p><strong>Routing</strong></p>
 |        <p>If routing is used during indexing, the routing value also needs to be specified to retrieve a document.
 |        For example:</p>
 |        <pre><code>GET my-index-000001/_doc/2?routing=user1
 |        </code></pre>
 |        <p>This request gets the document with ID 2, but it is routed based on the user.
 |        The document is not fetched if the correct routing is not specified.</p>
 |        <p><strong>Distributed</strong></p>
 |        <p>The GET operation is hashed into a specific shard ID.
 |        It is then redirected to one of the replicas within that shard ID and returns the result.
 |        The replicas are the primary shard and its replicas within that shard ID group.
 |        This means that the more replicas you have, the better your GET scaling will be.</p>
 |        <p><strong>Versioning support</strong></p>
 |        <p>You can use the <code>version</code> parameter to retrieve the document only if its current version is equal to the specified one.</p>
 |        <p>Internally, Elasticsearch has marked the old document as deleted and added an entirely new document.
 |        The old version of the document doesn't disappear immediately, although you won't be able to access it.
 |        Elasticsearch cleans up deleted documents in the background as you continue to index more data.</p>
 |
 |
 |      `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-get>`_
 |
 |      :param index: The name of the index that contains the document.
 |      :param id: A unique document identifier.
 |      :param force_synthetic_source: Indicates whether the request forces synthetic
 |          `_source`. Use this parameter to test if the mapping supports synthetic `_source`
 |          and to get a sense of the worst case performance. Fetches with this parameter
 |          enabled will be slower than enabling synthetic source natively in the index.
 |      :param preference: The node or shard the operation should be performed on. By
 |          default, the operation is randomized between the shard replicas. If it is
 |          set to `_local`, the operation will prefer to be run on a local allocated
 |          shard when possible. If it is set to a custom value, the value is used to
 |          guarantee that the same shards will be used for the same custom value. This
 |          can help with "jumping values" when hitting different shards in different
 |          refresh states. A sample value can be something like the web session ID or
 |          the user name.
 |      :param realtime: If `true`, the request is real-time as opposed to near-real-time.
 |      :param refresh: If `true`, the request refreshes the relevant shards before retrieving
 |          the document. Setting it to `true` should be done after careful thought and
 |          verification that this does not cause a heavy load on the system (and slow
 |          down indexing).
 |      :param routing: A custom value used to route operations to a specific shard.
 |      :param source: Indicates whether to return the `_source` field (`true` or `false`)
 |          or lists the fields to return.
 |      :param source_exclude_vectors: Whether vectors should be excluded from _source
 |      :param source_excludes: A comma-separated list of source fields to exclude from
 |          the response. You can also use this parameter to exclude fields from the
 |          subset specified in `_source_includes` query parameter. If the `_source`
 |          parameter is `false`, this parameter is ignored.
 |      :param source_includes: A comma-separated list of source fields to include in
 |          the response. If this parameter is specified, only these source fields are
 |          returned. You can exclude fields from this subset using the `_source_excludes`
 |          query parameter. If the `_source` parameter is `false`, this parameter is
 |          ignored.
 |      :param stored_fields: A comma-separated list of stored fields to return as part
 |          of a hit. If no fields are specified, no stored fields are included in the
 |          response. If this field is specified, the `_source` parameter defaults to
 |          `false`. Only leaf fields can be retrieved with the `stored_fields` option.
 |          Object fields can't be returned; if specified, the request fails.
 |      :param version: The version number for concurrency control. It must match the
 |          current version of the document for the request to succeed.
 |      :param version_type: The version type.
 |
 |  get_script(self, *, id: str, error_trace: Optional[bool] = None, filter_path: Union[str, Sequence[str], NoneType] = None, human: Optional[bool] = None, master_timeout: Union[str, Literal[-1], Literal[0], NoneType] = None, pretty: Optional[bool] = None) -> elastic_transport.ObjectApiResponse[typing.Any]
 |      .. raw:: html
 |
 |        <p>Get a script or search template.</p>
 |        <p>Retrieves a stored script or search template.</p>
 |
 |
 |      `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation-get-script>`_
 |
 |      :param id: The identifier for the stored script or search template.
 |      :param master_timeout: The period to wait for the master node. If the master
 |          node is not available before the timeout expires, the request fails and returns
 |          an error. It can also be set to `-1` to indicate that the request should
 |          never timeout.
 |
 |  get_script_context(self, *, error_trace: Optional[bool] = None, filter_path: Union[str, Sequence[str], NoneType] = None, human: Optional[bool] = None, pretty: Optional[bool] = None) -> elastic_transport.ObjectApiResponse[typing.Any]
 |      .. raw:: html
 |
 |        <p>Get script contexts.</p>
 |        <p>Get a list of supported script contexts and their methods.</p>
 |
 |
 |      `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation-get-script-context>`_
 |
 |  get_script_languages(self, *, error_trace: Optional[bool] = None, filter_path: Union[str, Sequence[str], NoneType] = None, human: Optional[bool] = None, pretty: Optional[bool] = None) -> elastic_transport.ObjectApiResponse[typing.Any]
 |      .. raw:: html
 |
 |        <p>Get script languages.</p>
 |        <p>Get a list of available script types, languages, and contexts.</p>
 |
 |
 |      `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation-get-script-languages>`_
 |
 |  get_source(self, *, index: str, id: str, error_trace: Optional[bool] = None, filter_path: Union[str, Sequence[str], NoneType] = None, human: Optional[bool] = None, preference: Optional[str] = None, pretty: Optional[bool] = None, realtime: Optional[bool] = None, refresh: Optional[bool] = None, routing: Union[str, Sequence[str], NoneType] = None, source: Union[bool, str, Sequence[str], NoneType] = None, source_excludes: Union[str, Sequence[str], NoneType] = None, source_includes: Union[str, Sequence[str], NoneType] = None, version: Optional[int] = None, version_type: Union[str, Literal['external', 'external_gte', 'internal'], NoneType] = None) -> elastic_transport.ObjectApiResponse[typing.Any]
 |      .. raw:: html
 |
 |        <p>Get a document's source.</p>
 |        <p>Get the source of a document.
 |        For example:</p>
 |        <pre><code>GET my-index-000001/_source/1
 |        </code></pre>
 |        <p>You can use the source filtering parameters to control which parts of the <code>_source</code> are returned:</p>
 |        <pre><code>GET my-index-000001/_source/1/?_source_includes=*.id&amp;_source_excludes=entities
 |        </code></pre>
 |
 |
 |      `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-get>`_
 |
 |      :param index: The name of the index that contains the document.
 |      :param id: A unique document identifier.
 |      :param preference: The node or shard the operation should be performed on. By
 |          default, the operation is randomized between the shard replicas.
 |      :param realtime: If `true`, the request is real-time as opposed to near-real-time.
 |      :param refresh: If `true`, the request refreshes the relevant shards before retrieving
 |          the document. Setting it to `true` should be done after careful thought and
 |          verification that this does not cause a heavy load on the system (and slow
 |          down indexing).
 |      :param routing: A custom value used to route operations to a specific shard.
 |      :param source: Indicates whether to return the `_source` field (`true` or `false`)
 |          or lists the fields to return.
 |      :param source_excludes: A comma-separated list of source fields to exclude in
 |          the response.
 |      :param source_includes: A comma-separated list of source fields to include in
 |          the response.
 |      :param version: The version number for concurrency control. It must match the
 |          current version of the document for the request to succeed.
 |      :param version_type: The version type.
 |
 |  health_report(self, *, feature: Union[str, Sequence[str], NoneType] = None, error_trace: Optional[bool] = None, filter_path: Union[str, Sequence[str], NoneType] = None, human: Optional[bool] = None, pretty: Optional[bool] = None, size: Optional[int] = None, timeout: Union[str, Literal[-1], Literal[0], NoneType] = None, verbose: Optional[bool] = None) -> elastic_transport.ObjectApiResponse[typing.Any]
 |      .. raw:: html
 |
 |        <p>Get the cluster health.</p>
 |        <p>Get a report with the health status of an Elasticsearch cluster.
 |        The report contains a list of indicators that compose Elasticsearch functionality.</p>
 |        <p>Each indicator has a health status of: green, unknown, yellow or red.
 |        The indicator will provide an explanation and metadata describing the reason for its current health status.</p>
 |        <p>The cluster’s status is controlled by the worst indicator status.</p>
 |        <p>In the event that an indicator’s status is non-green, a list of impacts may be present in the indicator result which detail the functionalities that are negatively affected by the health issue.
 |        Each impact carries with it a severity level, an area of the system that is affected, and a simple description of the impact on the system.</p>
 |        <p>Some health indicators can determine the root cause of a health problem and prescribe a set of steps that can be performed in order to improve the health of the system.
 |        The root cause and remediation steps are encapsulated in a diagnosis.
 |        A diagnosis contains a cause detailing a root cause analysis, an action containing a brief description of the steps to take to fix the problem, the list of affected resources (if applicable), and a detailed step-by-step troubleshooting guide to fix the diagnosed problem.</p>
 |        <p>NOTE: The health indicators perform root cause analysis of non-green health statuses. This can be computationally expensive when called frequently.
 |        When setting up automated polling of the API for health status, set verbose to false to disable the more expensive analysis logic.</p>
 |
 |
 |      `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation-health-report>`_
 |
 |      :param feature: A feature of the cluster, as returned by the top-level health
 |          report API.
 |      :param size: Limit the number of affected resources the health report API returns.
 |      :param timeout: Explicit operation timeout.
 |      :param verbose: Opt-in for more information about the health of the system.
 |
 |  index(self, *, index: str, document: Optional[Mapping[str, Any]] = None, body: Optional[Mapping[str, Any]] = None, id: Optional[str] = None, error_trace: Optional[bool] = None, filter_path: Union[str, Sequence[str], NoneType] = None, human: Optional[bool] = None, if_primary_term: Optional[int] = None, if_seq_no: Optional[int] = None, include_source_on_error: Optional[bool] = None, op_type: Union[str, Literal['create', 'index'], NoneType] = None, pipeline: Optional[str] = None, pretty: Optional[bool] = None, refresh: Union[bool, str, Literal['false', 'true', 'wait_for'], NoneType] = None, require_alias: Optional[bool] = None, require_data_stream: Optional[bool] = None, routing: Union[str, Sequence[str], NoneType] = None, timeout: Union[str, Literal[-1], Literal[0], NoneType] = None, version: Optional[int] = None, version_type: Union[str, Literal['external', 'external_gte', 'internal'], NoneType] = None, wait_for_active_shards: Union[int, str, Literal['all', 'index-setting'], NoneType] = None) -> elastic_transport.ObjectApiResponse[typing.Any]
 |      .. raw:: html
 |
 |        <p>Create or update a document in an index.</p>
 |        <p>Add a JSON document to the specified data stream or index and make it searchable.
 |        If the target is an index and the document already exists, the request updates the document and increments its version.</p>
 |        <p>NOTE: You cannot use this API to send update requests for existing documents in a data stream.</p>
 |        <p>If the Elasticsearch security features are enabled, you must have the following index privileges for the target data stream, index, or index alias:</p>
 |        <ul>
 |        <li>To add or overwrite a document using the <code>PUT /&lt;target&gt;/_doc/&lt;_id&gt;</code> request format, you must have the <code>create</code>, <code>index</code>, or <code>write</code> index privilege.</li>
 |        <li>To add a document using the <code>POST /&lt;target&gt;/_doc/</code> request format, you must have the <code>create_doc</code>, <code>create</code>, <code>index</code>, or <code>write</code> index privilege.</li>
 |        <li>To automatically create a data stream or index with this API request, you must have the <code>auto_configure</code>, <code>create_index</code>, or <code>manage</code> index privilege.</li>
 |        </ul>
 |        <p>Automatic data stream creation requires a matching index template with data stream enabled.</p>
 |        <p>NOTE: Replica shards might not all be started when an indexing operation returns successfully.
 |        By default, only the primary is required. Set <code>wait_for_active_shards</code> to change this default behavior.</p>
 |        <p><strong>Automatically create data streams and indices</strong></p>
 |        <p>If the request's target doesn't exist and matches an index template with a <code>data_stream</code> definition, the index operation automatically creates the data stream.</p>
 |        <p>If the target doesn't exist and doesn't match a data stream template, the operation automatically creates the index and applies any matching index templates.</p>
 |        <p>NOTE: Elasticsearch includes several built-in index templates. To avoid naming collisions with these templates, refer to index pattern documentation.</p>
 |        <p>If no mapping exists, the index operation creates a dynamic mapping.
 |        By default, new fields and objects are automatically added to the mapping if needed.</p>
 |        <p>Automatic index creation is controlled by the <code>action.auto_create_index</code> setting.
 |        If it is <code>true</code>, any index can be created automatically.
 |        You can modify this setting to explicitly allow or block automatic creation of indices that match specified patterns or set it to <code>false</code> to turn off automatic index creation entirely.
 |        Specify a comma-separated list of patterns you want to allow or prefix each pattern with <code>+</code> or <code>-</code> to indicate whether it should be allowed or blocked.
 |        When a list is specified, the default behaviour is to disallow.</p>
 |        <p>NOTE: The <code>action.auto_create_index</code> setting affects the automatic creation of indices only.
 |        It does not affect the creation of data streams.</p>
 |        <p><strong>Optimistic concurrency control</strong></p>
 |        <p>Index operations can be made conditional and only be performed if the last modification to the document was assigned the sequence number and primary term specified by the <code>if_seq_no</code> and <code>if_primary_term</code> parameters.
 |        If a mismatch is detected, the operation will result in a <code>VersionConflictException</code> and a status code of <code>409</code>.</p>
 |        <p><strong>Routing</strong></p>
 |        <p>By default, shard placement — or routing — is controlled by using a hash of the document's ID value.
 |        For more explicit control, the value fed into the hash function used by the router can be directly specified on a per-operation basis using the <code>routing</code> parameter.</p>
 |        <p>When setting up explicit mapping, you can also use the <code>_routing</code> field to direct the index operation to extract the routing value from the document itself.
 |        This does come at the (very minimal) cost of an additional document parsing pass.
 |        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>
 |        <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>
 |        <p><strong>Distributed</strong></p>
 |        <p>The index operation is directed to the primary shard based on its route and performed on the actual node containing this shard.
 |        After the primary shard completes the operation, if needed, the update is distributed to applicable replicas.</p>
 |        <p><strong>Active shards</strong></p>
 |        <p>To improve the resiliency of writes to the system, indexing operations can be configured to wait for a certain number of active shard copies before proceeding with the operation.
 |        If the requisite number of active shard copies are not available, then the write operation must wait and retry, until either the requisite shard copies have started or a timeout occurs.
 |        By default, write operations only wait for the primary shards to be active before proceeding (that is to say <code>wait_for_active_shards</code> is <code>1</code>).
 |        This default can be overridden in the index settings dynamically by setting <code>index.write.wait_for_active_shards</code>.
 |        To alter this behavior per operation, use the <code>wait_for_active_shards request</code> parameter.</p>
 |        <p>Valid values are all or any positive integer up to the total number of configured copies per shard in the index (which is <code>number_of_replicas</code>+1).
 |        Specifying a negative value or a number greater than the number of shard copies will throw an error.</p>
 |        <p>For example, suppose you have a cluster of three nodes, A, B, and C and you create an index index with the number of replicas set to 3 (resulting in 4 shard copies, one more copy than there are nodes).
 |        If you attempt an indexing operation, by default the operation will only ensure the primary copy of each shard is available before proceeding.
 |        This means that even if B and C went down and A hosted the primary shard copies, the indexing operation would still proceed with only one copy of the data.
 |        If <code>wait_for_active_shards</code> is set on the request to <code>3</code> (and all three nodes are up), the indexing operation will require 3 active shard copies before proceeding.
 |        This requirement should be met because there are 3 active nodes in the cluster, each one holding a copy of the shard.
 |        However, if you set <code>wait_for_active_shards</code> to <code>all</code> (or to <code>4</code>, which is the same in this situation), the indexing operation will not proceed as you do not have all 4 copies of each shard active in the index.
 |        The operation will timeout unless a new node is brought up in the cluster to host the fourth copy of the shard.</p>
 |        <p>It is important to note that this setting greatly reduces the chances of the write operation not writing to the requisite number of shard copies, but it does not completely eliminate the possibility, because this check occurs before the write operation starts.
 |        After the write operation is underway, it is still possible for replication to fail on any number of shard copies but still succeed on the primary.
 |        The <code>_shards</code> section of the API response reveals the number of shard copies on which replication succeeded and failed.</p>
 |        <p><strong>No operation (noop) updates</strong></p>
 |        <p>When updating a document by using this API, a new version of the document is always created even if the document hasn't changed.
 |        If this isn't acceptable use the <code>_update</code> API with <code>detect_noop</code> set to <code>true</code>.
 |        The <code>detect_noop</code> option isn't available on this API because it doesn’t fetch the old source and isn't able to compare it against the new source.</p>
 |        <p>There isn't a definitive rule for when noop updates aren't acceptable.
 |        It's a combination of lots of factors like how frequently your data source sends updates that are actually noops and how many queries per second Elasticsearch runs on the shard receiving the updates.</p>
 |        <p><strong>Versioning</strong></p>
 |        <p>Each indexed document is given a version number.
 |        By default, internal versioning is used that starts at 1 and increments with each update, deletes included.
 |        Optionally, the version number can be set to an external value (for example, if maintained in a database).
 |        To enable this functionality, <code>version_type</code> should be set to <code>external</code>.
 |        The value provided must be a numeric, long value greater than or equal to 0, and less than around <code>9.2e+18</code>.</p>
 |        <p>NOTE: Versioning is completely real time, and is not affected by the near real time aspects of search operations.
 |        If no version is provided, the operation runs without any version checks.</p>
 |        <p>When using the external version type, the system checks to see if the version number passed to the index request is greater than the version of the currently stored document.
 |        If true, the document will be indexed and the new version number used.
 |        If the value provided is less than or equal to the stored document's version number, a version conflict will occur and the index operation will fail. For example:</p>
 |        <pre><code>PUT my-index-000001/_doc/1?version=2&amp;version_type=external
 |        {
 |          &quot;user&quot;: {
 |            &quot;id&quot;: &quot;elkbee&quot;
 |          }
 |        }
 |        </code></pre>
 |        <p>In this example, the operation will succeed since the supplied version of 2 is higher than the current document version of 1.
 |        If the document was already updated and its version was set to 2 or higher, the indexing command will fail and result in a conflict (409 HTTP status code).</p>
 |        <p>A nice side effect is that there is no need to maintain strict ordering of async indexing operations run as a result of changes to a source database, as long as version numbers from the source database are used.
 |        Even the simple case of updating the Elasticsearch index using data from a database is simplified if external versioning is used, as only the latest version will be used if the index operations arrive out of order.</p>
 |
 |
 |      `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-create>`_
 |
 |      :param index: The name of the data stream or index to target. If the target doesn't
 |          exist and matches the name or wildcard (`*`) pattern of an index template
 |          with a `data_stream` definition, this request creates the data stream. If
 |          the target doesn't exist and doesn't match a data stream template, this request
 |          creates the index. You can check for existing targets with the resolve index
 |          API.
 |      :param document:
 |      :param id: A unique identifier for the document. To automatically generate a
 |          document ID, use the `POST /<target>/_doc/` request format and omit this
 |          parameter.
 |      :param if_primary_term: Only perform the operation if the document has this primary
 |          term.
 |      :param if_seq_no: Only perform the operation if the document has this sequence
 |          number.
 |      :param include_source_on_error: True or false if to include the document source
 |          in the error message in case of parsing errors.
 |      :param op_type: Set to `create` to only index the document if it does not already
 |          exist (put if absent). If a document with the specified `_id` already exists,
 |          the indexing operation will fail. The behavior is the same as using the `<index>/_create`
 |          endpoint. If a document ID is specified, this paramater defaults to `index`.
 |          Otherwise, it defaults to `create`. If the request targets a data stream,
 |          an `op_type` of `create` is required.
 |      :param pipeline: The ID of the pipeline to use to preprocess incoming documents.
 |          If the index has a default ingest pipeline specified, then setting the value
 |          to `_none` disables the default ingest pipeline for this request. If a final
 |          pipeline is configured it will always run, regardless of the value of this
 |          parameter.
 |      :param refresh: If `true`, Elasticsearch refreshes the affected shards to make
 |          this operation visible to search. If `wait_for`, it waits for a refresh to
 |          make this operation visible to search. If `false`, it does nothing with refreshes.
 |      :param require_alias: If `true`, the destination must be an index alias.
 |      :param require_data_stream: If `true`, the request's actions must target a data
 |          stream (existing or to be created).
 |      :param routing: A custom value that is used to route operations to a specific
 |          shard.
 |      :param timeout: The period the request waits for the following operations: automatic
 |          index creation, dynamic mapping updates, waiting for active shards. This
 |          parameter is useful for situations where the primary shard assigned to perform
 |          the operation might not be available when the operation runs. Some reasons
 |          for this might be that the primary shard is currently recovering from a gateway
 |          or undergoing relocation. By default, the operation will wait on the primary
 |          shard to become available for at least 1 minute before failing and responding
 |          with an error. The actual wait time could be longer, particularly when multiple
 |          waits occur.
 |      :param version: An explicit version number for concurrency control. It must be
 |          a non-negative long number.
 |      :param version_type: The version type.
 |      :param wait_for_active_shards: The number of shard copies that must be active
 |          before proceeding with the operation. You can set it to `all` or any positive
 |          integer up to the total number of shards in the index (`number_of_replicas+1`).
 |          The default value of `1` means it waits for each primary shard to be active.
 |
 |  info(self, *, error_trace: Optional[bool] = None, filter_path: Union[str, Sequence[str], NoneType] = None, human: Optional[bool] = None, pretty: Optional[bool] = None) -> elastic_transport.ObjectApiResponse[typing.Any]
 |      .. raw:: html
 |
 |        <p>Get cluster info.</p>
 |        <p>Get basic build, version, and cluster information.
 |        ::: In Serverless, this API is retained for backward compatibility only. Some response fields, such as the version number, should be ignored.</p>
 |
 |
 |      `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/group/endpoint-info>`_
 |
 |  mget(self, *, index: Optional[str] = None, docs: Optional[Sequence[Mapping[str, Any]]] = None, error_trace: Optional[bool] = None, filter_path: Union[str, Sequence[str], NoneType] = None, force_synthetic_source: Optional[bool] = None, human: Optional[bool] = None, ids: Union[str, Sequence[str], NoneType] = None, preference: Optional[str] = None, pretty: Optional[bool] = None, realtime: Optional[bool] = None, refresh: Optional[bool] = None, routing: Union[str, Sequence[str], NoneType] = None, source: Union[bool, str, Sequence[str], NoneType] = None, source_excludes: Union[str, Sequence[str], NoneType] = None, source_includes: Union[str, Sequence[str], NoneType] = None, stored_fields: Union[str, Sequence[str], NoneType] = None, body: Optional[Dict[str, Any]] = None) -> elastic_transport.ObjectApiResponse[typing.Any]
 |      .. raw:: html
 |
 |        <p>Get multiple documents.</p>
 |        <p>Get multiple JSON documents by ID from one or more indices.
 |        If you specify an index in the request URI, you only need to specify the document IDs in the request body.
 |        To ensure fast responses, this multi get (mget) API responds with partial results if one or more shards fail.</p>
 |        <p><strong>Filter source fields</strong></p>
 |        <p>By default, the <code>_source</code> field is returned for every document (if stored).
 |        Use the <code>_source</code> and <code>_source_include</code> or <code>source_exclude</code> attributes to filter what fields are returned for a particular document.
 |        You can include the <code>_source</code>, <code>_source_includes</code>, and <code>_source_excludes</code> query parameters in the request URI to specify the defaults to use when there are no per-document instructions.</p>
 |        <p><strong>Get stored fields</strong></p>
 |        <p>Use the <code>stored_fields</code> attribute to specify the set of stored fields you want to retrieve.
 |        Any requested fields that are not stored are ignored.
 |        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>
 |
 |
 |      `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-mget>`_
 |
 |      :param index: Name of the index to retrieve documents from when `ids` are specified,
 |          or when a document in the `docs` array does not specify an index.
 |      :param docs: The documents you want to retrieve. Required if no index is specified
 |          in the request URI.
 |      :param force_synthetic_source: Should this request force synthetic _source? Use
 |          this to test if the mapping supports synthetic _source and to get a sense
 |          of the worst case performance. Fetches with this enabled will be slower the
 |          enabling synthetic source natively in the index.
 |      :param ids: The IDs of the documents you want to retrieve. Allowed when the index
 |          is specified in the request URI.
 |      :param preference: Specifies the node or shard the operation should be performed
 |          on. Random by default.
 |      :param realtime: If `true`, the request is real-time as opposed to near-real-time.
 |      :param refresh: If `true`, the request refreshes relevant shards before retrieving
 |          documents.
 |      :param routing: Custom value used to route operations to a specific shard.
 |      :param source: True or false to return the `_source` field or not, or a list
 |          of fields to return.
 |      :param source_excludes: A comma-separated list of source fields to exclude from
 |          the response. You can also use this parameter to exclude fields from the
 |          subset specified in `_source_includes` query parameter.
 |      :param source_includes: A comma-separated list of source fields to include in
 |          the response. If this parameter is specified, only these source fields are
 |          returned. You can exclude fields from this subset using the `_source_excludes`
 |          query parameter. If the `_source` parameter is `false`, this parameter is
 |          ignored.
 |      :param stored_fields: If `true`, retrieves the document fields stored in the
 |          index rather than the document `_source`.
 |
 |  msearch(self, *, searches: Optional[Sequence[Mapping[str, Any]]] = None, body: Optional[Sequence[Mapping[str, Any]]] = None, index: Union[str, Sequence[str], NoneType] = None, allow_no_indices: Optional[bool] = None, ccs_minimize_roundtrips: Optional[bool] = None, error_trace: Optional[bool] = None, expand_wildcards: Union[Sequence[Union[str, Literal['all', 'closed', 'hidden', 'none', 'open']]], str, Literal['all', 'closed', 'hidden', 'none', 'open'], NoneType] = None, filter_path: Union[str, Sequence[str], NoneType] = None, human: Optional[bool] = None, ignore_throttled: Optional[bool] = None, ignore_unavailable: Optional[bool] = None, include_named_queries_score: Optional[bool] = None, max_concurrent_searches: Optional[int] = None, max_concurrent_shard_requests: Optional[int] = None, pre_filter_shard_size: Optional[int] = None, pretty: Optional[bool] = None, project_routing: Optional[str] = None, rest_total_hits_as_int: Optional[bool] = None, routing: Union[str, Sequence[str], NoneType] = None, search_type: Union[str, Literal['dfs_query_then_fetch', 'query_then_fetch'], NoneType] = None, typed_keys: Optional[bool] = None) -> elastic_transport.ObjectApiResponse[typing.Any]
 |      .. raw:: html
 |
 |        <p>Run multiple searches.</p>
 |        <p>The format of the request is similar to the bulk API format and makes use of the newline delimited JSON (NDJSON) format.
 |        The structure is as follows:</p>
 |        <pre><code>header\n
 |        body\n
 |        header\n
 |        body\n
 |        </code></pre>
 |        <p>This structure is specifically optimized to reduce parsing if a specific search ends up redirected to another node.</p>
 |        <p>IMPORTANT: The final line of data must end with a newline character <code>\n</code>.
 |        Each newline character may be preceded by a carriage return <code>\r</code>.
 |        When sending requests to this endpoint the <code>Content-Type</code> header should be set to <code>application/x-ndjson</code>.</p>
 |
 |
 |      `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation-msearch>`_
 |
 |      :param searches:
 |      :param index: Comma-separated list of data streams, indices, and index aliases
 |          to search.
 |      :param allow_no_indices: A setting that does two separate checks on the index
 |          expression. If `false`, the request returns an error (1) if any wildcard
 |          expression (including `_all` and `*`) resolves to zero matching indices or
 |          (2) if the complete set of resolved indices, aliases or data streams is empty
 |          after all expressions are evaluated. If `true`, index expressions that resolve
 |          to no indices are allowed and the request returns an empty result.
 |      :param ccs_minimize_roundtrips: If true, network roundtrips between the coordinating
 |          node and remote clusters are minimized for cross-cluster search requests.
 |      :param expand_wildcards: Type of index that wildcard expressions can match. If
 |          the request can target data streams, this argument determines whether wildcard
 |          expressions match hidden data streams.
 |      :param ignore_throttled: If true, concrete, expanded or aliased indices are ignored
 |          when frozen.
 |      :param ignore_unavailable: If `false`, the request returns an error if it targets
 |          a concrete (non-wildcarded) index, alias, or data stream that is missing,
 |          closed, or otherwise unavailable. If `true`, unavailable concrete targets
 |          are silently ignored.
 |      :param include_named_queries_score: Indicates whether hit.matched_queries should
 |          be rendered as a map that includes the name of the matched query associated
 |          with its score (true) or as an array containing the name of the matched queries
 |          (false) This functionality reruns each named query on every hit in a search
 |          response. Typically, this adds a small overhead to a request. However, using
 |          computationally expensive named queries on a large number of hits may add
 |          significant overhead.
 |      :param max_concurrent_searches: Maximum number of concurrent searches the multi
 |          search API can execute. Defaults to `max(1, (# of data nodes * min(search
 |          thread pool size, 10)))`.
 |      :param max_concurrent_shard_requests: Maximum number of concurrent shard requests
 |          that each sub-search request executes per node.
 |      :param pre_filter_shard_size: Defines a threshold that enforces a pre-filter
 |          roundtrip to prefilter search shards based on query rewriting if the number
 |          of shards the search request expands to exceeds the threshold. This filter
 |          roundtrip can limit the number of shards significantly if for instance a
 |          shard can not match any documents based on its rewrite method i.e., if date
 |          filters are mandatory to match but the shard bounds and the query are disjoint.
 |      :param project_routing: Specifies a subset of projects to target for a search
 |          using project metadata tags in a subset Lucene syntax. Allowed Lucene queries:
 |          the _alias tag and a single value (possible wildcarded). Examples: _alias:my-project
 |          _alias:_origin _alias:*pr* Supported in serverless only.
 |      :param rest_total_hits_as_int: If true, hits.total are returned as an integer
 |          in the response. Defaults to false, which returns an object.
 |      :param routing: Custom routing value used to route search operations to a specific
 |          shard.
 |      :param search_type: Indicates whether global term and document frequencies should
 |          be used when scoring returned documents.
 |      :param typed_keys: Specifies whether aggregation and suggester names should be
 |          prefixed by their respective types in the response.
 |
 |  msearch_template(self, *, search_templates: Optional[Sequence[Mapping[str, Any]]] = None, body: Optional[Sequence[Mapping[str, Any]]] = None, index: Union[str, Sequence[str], NoneType] = None, ccs_minimize_roundtrips: Optional[bool] = None, error_trace: Optional[bool] = None, filter_path: Union[str, Sequence[str], NoneType] = None, human: Optional[bool] = None, max_concurrent_searches: Optional[int] = None, pretty: Optional[bool] = None, project_routing: Optional[str] = None, rest_total_hits_as_int: Optional[bool] = None, search_type: Union[str, Literal['dfs_query_then_fetch', 'query_then_fetch'], NoneType] = None, typed_keys: Optional[bool] = None) -> elastic_transport.ObjectApiResponse[typing.Any]
 |      .. raw:: html
 |
 |        <p>Run multiple templated searches.</p>
 |        <p>Run multiple templated searches with a single request.
 |        If you are providing a text file or text input to <code>curl</code>, use the <code>--data-binary</code> flag instead of <code>-d</code> to preserve newlines.
 |        For example:</p>
 |        <pre><code>$ cat requests
 |        { &quot;index&quot;: &quot;my-index&quot; }
 |        { &quot;id&quot;: &quot;my-search-template&quot;, &quot;params&quot;: { &quot;query_string&quot;: &quot;hello world&quot;, &quot;from&quot;: 0, &quot;size&quot;: 10 }}
 |        { &quot;index&quot;: &quot;my-other-index&quot; }
 |        { &quot;id&quot;: &quot;my-other-search-template&quot;, &quot;params&quot;: { &quot;query_type&quot;: &quot;match_all&quot; }}
 |
 |        $ curl -H &quot;Content-Type: application/x-ndjson&quot; -XGET localhost:9200/_msearch/template --data-binary &quot;@requests&quot;; echo
 |        </code></pre>
 |
 |
 |      `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation-msearch-template>`_
 |
 |      :param search_templates:
 |      :param index: A comma-separated list of data streams, indices, and aliases to
 |          search. It supports wildcards (`*`). To search all data streams and indices,
 |          omit this parameter or use `*`.
 |      :param ccs_minimize_roundtrips: If `true`, network round-trips are minimized
 |          for cross-cluster search requests.
 |      :param max_concurrent_searches: The maximum number of concurrent searches the
 |          API can run.
 |      :param project_routing: Specifies a subset of projects to target for the search
 |          using project metadata tags in a subset of Lucene query syntax. Allowed Lucene
 |          queries: the _alias tag and a single value (possibly wildcarded). Examples:
 |          _alias:my-project _alias:_origin _alias:*pr* Supported in serverless only.
 |      :param rest_total_hits_as_int: If `true`, the response returns `hits.total` as
 |          an integer. If `false`, it returns `hits.total` as an object.
 |      :param search_type: The type of the search operation.
 |      :param typed_keys: If `true`, the response prefixes aggregation and suggester
 |          names with their respective types.
 |
 |  mtermvectors(self, *, index: Optional[str] = None, docs: Optional[Sequence[Mapping[str, Any]]] = None, error_trace: Optional[bool] = None, field_statistics: Optional[bool] = None, fields: Union[str, Sequence[str], NoneType] = None, filter_path: Union[str, Sequence[str], NoneType] = None, human: Optional[bool] = None, ids: Optional[Sequence[str]] = None, offsets: Optional[bool] = None, payloads: Optional[bool] = None, positions: Optional[bool] = None, preference: Optional[str] = None, pretty: Optional[bool] = None, realtime: Optional[bool] = None, routing: Union[str, Sequence[str], NoneType] = None, term_statistics: Optional[bool] = None, version: Optional[int] = None, version_type: Union[str, Literal['external', 'external_gte', 'internal'], NoneType] = None, body: Optional[Dict[str, Any]] = None) -> elastic_transport.ObjectApiResponse[typing.Any]
 |      .. raw:: html
 |
 |        <p>Get multiple term vectors.</p>
 |        <p>Get multiple term vectors with a single request.
 |        You can specify existing documents by index and ID or provide artificial documents in the body of the request.
 |        You can specify the index in the request body or request URI.
 |        The response contains a <code>docs</code> array with all the fetched termvectors.
 |        Each element has the structure provided by the termvectors API.</p>
 |        <p><strong>Artificial documents</strong></p>
 |        <p>You can also use <code>mtermvectors</code> to generate term vectors for artificial documents provided in the body of the request.
 |        The mapping used is determined by the specified <code>_index</code>.</p>
 |
 |
 |      `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-mtermvectors>`_
 |
 |      :param index: The name of the index that contains the documents.
 |      :param docs: An array of existing or artificial documents.
 |      :param field_statistics: If `true`, the response includes the document count,
 |          sum of document frequencies, and sum of total term frequencies.
 |      :param fields: A comma-separated list or wildcard expressions of fields to include
 |          in the statistics. It is used as the default list unless a specific field
 |          list is provided in the `completion_fields` or `fielddata_fields` parameters.
 |      :param ids: A simplified syntax to specify documents by their ID if they're in
 |          the same index.
 |      :param offsets: If `true`, the response includes term offsets.
 |      :param payloads: If `true`, the response includes term payloads.
 |      :param positions: If `true`, the response includes term positions.
 |      :param preference: The node or shard the operation should be performed on. It
 |          is random by default.
 |      :param realtime: If true, the request is real-time as opposed to near-real-time.
 |      :param routing: A custom value used to route operations to a specific shard.
 |      :param term_statistics: If true, the response includes term frequency and document
 |          frequency.
 |      :param version: If `true`, returns the document version as part of a hit.
 |      :param version_type: The version type.
 |
 |  open_point_in_time(self, *, index: Union[str, Sequence[str]], keep_alive: Union[str, Literal[-1], Literal[0]], allow_partial_search_results: Optional[bool] = None, error_trace: Optional[bool] = None, expand_wildcards: Union[Sequence[Union[str, Literal['all', 'closed', 'hidden', 'none', 'open']]], str, Literal['all', 'closed', 'hidden', 'none', 'open'], NoneType] = None, filter_path: Union[str, Sequence[str], NoneType] = None, human: Optional[bool] = None, ignore_unavailable: Optional[bool] = None, index_filter: Optional[Mapping[str, Any]] = None, max_concurrent_shard_requests: Optional[int] = None, preference: Optional[str] = None, pretty: Optional[bool] = None, project_routing: Optional[str] = None, routing: Union[str, Sequence[str], NoneType] = None, body: Optional[Dict[str, Any]] = None) -> elastic_transport.ObjectApiResponse[typing.Any]
 |      .. raw:: html
 |
 |        <p>Open a point in time.</p>
 |        <p>A search request by default runs against the most recent visible data of the target indices,
 |        which is called point in time. Elasticsearch pit (point in time) is a lightweight view into the
 |        state of the data as it existed when initiated. In some cases, it’s preferred to perform multiple
 |        search requests using the same point in time. For example, if refreshes happen between
 |        <code>search_after</code> requests, then the results of those requests might not be consistent as changes happening
 |        between searches are only visible to the more recent point in time.</p>
 |        <p>A point in time must be opened explicitly before being used in search requests.</p>
 |        <p>A subsequent search request with the <code>pit</code> parameter must not specify <code>index</code>, <code>routing</code>, or <code>preference</code> values as these parameters are copied from the point in time.</p>
 |        <p>Just like regular searches, you can use <code>from</code> and <code>size</code> to page through point in time search results, up to the first 10,000 hits.
 |        If you want to retrieve more hits, use PIT with <code>search_after</code>.</p>
 |        <p>IMPORTANT: The open point in time request and each subsequent search request can return different identifiers; always use the most recently received ID for the next search request.</p>
 |        <p>When a PIT that contains shard failures is used in a search request, the missing are always reported in the search response as a <code>NoShardAvailableActionException</code> exception.
 |        To get rid of these exceptions, a new PIT needs to be created so that shards missing from the previous PIT can be handled, assuming they become available in the meantime.</p>
 |        <p><strong>Keeping point in time alive</strong></p>
 |        <p>The <code>keep_alive</code> parameter, which is passed to a open point in time request and search request, extends the time to live of the corresponding point in time.
 |        The value does not need to be long enough to process all data — it just needs to be long enough for the next request.</p>
 |        <p>Normally, the background merge process optimizes the index by merging together smaller segments to create new, bigger segments.
 |        Once the smaller segments are no longer needed they are deleted.
 |        However, open point-in-times prevent the old segments from being deleted since they are still in use.</p>
 |        <p>TIP: Keeping older segments alive means that more disk space and file handles are needed.
 |        Ensure that you have configured your nodes to have ample free file handles.</p>
 |        <p>Additionally, if a segment contains deleted or updated documents then the point in time must keep track of whether each document in the segment was live at the time of the initial search request.
 |        Ensure that your nodes have sufficient heap space if you have many open point-in-times on an index that is subject to ongoing deletes or updates.
 |        Note that a point-in-time doesn't prevent its associated indices from being deleted.
 |        You can check how many point-in-times (that is, search contexts) are open with the nodes stats API.</p>
 |
 |
 |      `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation-open-point-in-time>`_
 |
 |      :param index: A comma-separated list of index names to open point in time; use
 |          `_all` or empty string to perform the operation on all indices
 |      :param keep_alive: Extend the length of time that the point in time persists.
 |      :param allow_partial_search_results: Indicates whether the point in time tolerates
 |          unavailable shards or shard failures when initially creating the PIT. If
 |          `false`, creating a point in time request when a shard is missing or unavailable
 |          will throw an exception. If `true`, the point in time will contain all the
 |          shards that are available at the time of the request.
 |      :param expand_wildcards: The type of index that wildcard patterns can match.
 |          If the request can target data streams, this argument determines whether
 |          wildcard expressions match hidden data streams. It supports comma-separated
 |          values, such as `open,hidden`.
 |      :param ignore_unavailable: If `false`, the request returns an error if it targets
 |          a concrete (non-wildcarded) index, alias, or data stream that is missing,
 |          closed, or otherwise unavailable. If `true`, unavailable concrete targets
 |          are silently ignored.
 |      :param index_filter: Filter indices if the provided query rewrites to `match_none`
 |          on every shard.
 |      :param max_concurrent_shard_requests: Maximum number of concurrent shard requests
 |          that each sub-search request executes per node.
 |      :param preference: The node or shard the operation should be performed on. By
 |          default, it is random.
 |      :param project_routing: Specifies a subset of projects to target for the PIT
 |          request using project metadata tags in a subset of Lucene query syntax. Allowed
 |          Lucene queries: the _alias tag and a single value (possibly wildcarded).
 |          Examples: _alias:my-project _alias:_origin _alias:*pr* Supported in serverless
 |          only.
 |      :param routing: A custom value that is used to route operations to a specific
 |          shard.
 |
 |  options(self: ~SelfType, *, opaque_id: Union[elastic_transport.client_utils.DefaultType, str] = <DEFAULT>, api_key: Union[elastic_transport.client_utils.DefaultType, str, Tuple[str, str]] = <DEFAULT>, basic_auth: Union[elastic_transport.client_utils.DefaultType, str, Tuple[str, str]] = <DEFAULT>, bearer_auth: Union[elastic_transport.client_utils.DefaultType, str] = <DEFAULT>, headers: Union[elastic_transport.client_utils.DefaultType, Mapping[str, str]] = <DEFAULT>, request_timeout: Union[elastic_transport.client_utils.DefaultType, float, NoneType] = <DEFAULT>, ignore_status: Union[elastic_transport.client_utils.DefaultType, int, Collection[int]] = <DEFAULT>, max_retries: Union[elastic_transport.client_utils.DefaultType, int] = <DEFAULT>, retry_on_status: Union[elastic_transport.client_utils.DefaultType, int, Collection[int]] = <DEFAULT>, retry_on_timeout: Union[elastic_transport.client_utils.DefaultType, bool] = <DEFAULT>, retry_backoff_base: Union[elastic_transport.client_utils.DefaultType, float] = <DEFAULT>, retry_backoff_cap: Union[elastic_transport.client_utils.DefaultType, float] = <DEFAULT>) -> ~SelfType
 |
 |  ping(self, *, error_trace: Optional[bool] = None, filter_path: Union[List[str], str, NoneType] = None, human: Optional[bool] = None, pretty: Optional[bool] = None) -> bool
 |      Returns True if a successful response returns from the info() API,
 |      otherwise returns False. This API call can fail either at the transport
 |      layer (due to connection errors or timeouts) or from a non-2XX HTTP response
 |      (due to authentication or authorization issues).
 |
 |      If you want to discover why the request failed you should use the ``info()`` API.
 |
 |      `<https://www.elastic.co/guide/en/elasticsearch/reference/current/index.html>`_
 |
 |  put_script(self, *, id: str, script: Optional[Mapping[str, Any]] = None, context: Optional[str] = None, error_trace: Optional[bool] = None, filter_path: Union[str, Sequence[str], NoneType] = None, human: Optional[bool] = None, master_timeout: Union[str, Literal[-1], Literal[0], NoneType] = None, pretty: Optional[bool] = None, timeout: Union[str, Literal[-1], Literal[0], NoneType] = None, body: Optional[Dict[str, Any]] = None) -> elastic_transport.ObjectApiResponse[typing.Any]
 |      .. raw:: html
 |
 |        <p>Create or update a script or search template.</p>
 |        <p>Creates or updates a stored script or search template.</p>
 |
 |
 |      `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation-put-script>`_
 |
 |      :param id: The identifier for the stored script or search template. It must be
 |          unique within the cluster.
 |      :param script: The script or search template, its parameters, and its language.
 |      :param context: The context in which the script or search template should run.
 |          To prevent errors, the API immediately compiles the script or template in
 |          this context.
 |      :param master_timeout: The period to wait for a connection to the master node.
 |          If no response is received before the timeout expires, the request fails
 |          and returns an error. It can also be set to `-1` to indicate that the request
 |          should never timeout.
 |      :param timeout: The period to wait for a response. If no response is received
 |          before the timeout expires, the request fails and returns an error. It can
 |          also be set to `-1` to indicate that the request should never timeout.
 |
 |  rank_eval(self, *, requests: Optional[Sequence[Mapping[str, Any]]] = None, index: Union[str, Sequence[str], NoneType] = None, allow_no_indices: Optional[bool] = None, error_trace: Optional[bool] = None, expand_wildcards: Union[Sequence[Union[str, Literal['all', 'closed', 'hidden', 'none', 'open']]], str, Literal['all', 'closed', 'hidden', 'none', 'open'], NoneType] = None, filter_path: Union[str, Sequence[str], NoneType] = None, human: Optional[bool] = None, ignore_unavailable: Optional[bool] = None, metric: Optional[Mapping[str, Any]] = None, pretty: Optional[bool] = None, search_type: Union[str, Literal['dfs_query_then_fetch', 'query_then_fetch'], NoneType] = None, body: Optional[Dict[str, Any]] = None) -> elastic_transport.ObjectApiResponse[typing.Any]
 |      .. raw:: html
 |
 |        <p>Evaluate ranked search results.</p>
 |        <p>Evaluate the quality of ranked search results over a set of typical search queries.</p>
 |
 |
 |      `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation-rank-eval>`_
 |
 |      :param requests: A set of typical search requests, together with their provided
 |          ratings.
 |      :param index: A comma-separated list of data streams, indices, and index aliases
 |          used to limit the request. Wildcard (`*`) expressions are supported. To target
 |          all data streams and indices in a cluster, omit this parameter or use `_all`
 |          or `*`.
 |      :param allow_no_indices: A setting that does two separate checks on the index
 |          expression. If `false`, the request returns an error (1) if any wildcard
 |          expression (including `_all` and `*`) resolves to zero matching indices or
 |          (2) if the complete set of resolved indices, aliases or data streams is empty
 |          after all expressions are evaluated. If `true`, index expressions that resolve
 |          to no indices are allowed and the request returns an empty result.
 |      :param expand_wildcards: Whether to expand wildcard expression to concrete indices
 |          that are open, closed or both.
 |      :param ignore_unavailable: If `false`, the request returns an error if it targets
 |          a concrete (non-wildcarded) index, alias, or data stream that is missing,
 |          closed, or otherwise unavailable. If `true`, unavailable concrete targets
 |          are silently ignored.
 |      :param metric: Definition of the evaluation metric to calculate.
 |      :param search_type: Search operation type
 |
 |  reindex(self, *, dest: Optional[Mapping[str, Any]] = None, source: Optional[Mapping[str, Any]] = None, conflicts: Union[str, Literal['abort', 'proceed'], NoneType] = None, error_trace: Optional[bool] = None, filter_path: Union[str, Sequence[str], NoneType] = None, human: Optional[bool] = None, max_docs: Optional[int] = None, pretty: Optional[bool] = None, refresh: Optional[bool] = None, requests_per_second: Optional[float] = None, require_alias: Optional[bool] = None, script: Optional[Mapping[str, Any]] = None, scroll: Union[str, Literal[-1], Literal[0], NoneType] = None, slices: Union[int, str, Literal['auto'], NoneType] = None, timeout: Union[str, Literal[-1], Literal[0], NoneType] = None, wait_for_active_shards: Union[int, str, Literal['all', 'index-setting'], NoneType] = None, wait_for_completion: Optional[bool] = None, body: Optional[Dict[str, Any]] = None) -> elastic_transport.ObjectApiResponse[typing.Any]
 |      .. raw:: html
 |
 |        <p>Reindex documents.</p>
 |        <p>Copy documents from a source to a destination.
 |        You can copy all documents to the destination index or reindex a subset of the documents.
 |        The source can be any existing index, alias, or data stream.
 |        The destination must differ from the source.
 |        For example, you cannot reindex a data stream into itself.</p>
 |        <p>IMPORTANT: Reindex requires <code>_source</code> to be enabled for all documents in the source.
 |        The destination should be configured as wanted before calling the reindex API.
 |        Reindex does not copy the settings from the source or its associated template.
 |        Mappings, shard counts, and replicas, for example, must be configured ahead of time.</p>
 |        <p>If the Elasticsearch security features are enabled, you must have the following security privileges:</p>
 |        <ul>
 |        <li>The <code>read</code> index privilege for the source data stream, index, or alias.</li>
 |        <li>The <code>write</code> index privilege for the destination data stream, index, or index alias.</li>
 |        <li>To automatically create a data stream or index with a reindex API request, you must have the <code>auto_configure</code>, <code>create_index</code>, or <code>manage</code> index privilege for the destination data stream, index, or alias.</li>
 |        <li>If reindexing from a remote cluster, the <code>source.remote.user</code> must have the <code>monitor</code> cluster privilege and the <code>read</code> index privilege for the source data stream, index, or alias.</li>
 |        </ul>
 |        <p>If reindexing from a remote cluster into a cluster using Elastic Stack, you must explicitly allow the remote host using the <code>reindex.remote.whitelist</code> node setting on the destination cluster.
 |        If reindexing from a remote cluster into an Elastic Cloud Serverless project, only remote hosts from Elastic Cloud Hosted are allowed.
 |        Automatic data stream creation requires a matching index template with data stream enabled.</p>
 |        <p>The <code>dest</code> element can be configured like the index API to control optimistic concurrency control.
 |        Omitting <code>version_type</code> or setting it to <code>internal</code> causes Elasticsearch to blindly dump documents into the destination, overwriting any that happen to have the same ID.</p>
 |        <p>Setting <code>version_type</code> to <code>external</code> causes Elasticsearch to preserve the <code>version</code> from the source, create any documents that are missing, and update any documents that have an older version in the destination than they do in the source.</p>
 |        <p>Setting <code>op_type</code> to <code>create</code> causes the reindex API to create only missing documents in the destination.
 |        All existing documents will cause a version conflict.</p>
 |        <p>IMPORTANT: Because data streams are append-only, any reindex request to a destination data stream must have an <code>op_type</code> of <code>create</code>.
 |        A reindex can only add new documents to a destination data stream.
 |        It cannot update existing documents in a destination data stream.</p>
 |        <p>By default, version conflicts abort the reindex process.
 |        To continue reindexing if there are conflicts, set the <code>conflicts</code> request body property to <code>proceed</code>.
 |        In this case, the response includes a count of the version conflicts that were encountered.
 |        Note that the handling of other error types is unaffected by the <code>conflicts</code> property.
 |        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>
 |        <p>It's recommended to reindex on indices with a green status. Reindexing can fail when a node shuts down or crashes.</p>
 |        <ul>
 |        <li>When requested with <code>wait_for_completion=true</code> (default), the request fails if the node shuts down.</li>
 |        <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.
 |        When retrying a failed reindex operation, it might be necessary to set <code>conflicts=proceed</code> or to first delete the partial destination index.
 |        Additionally, dry runs, checking disk space, and fetching index recovery information can help address the root cause.</li>
 |        </ul>
 |        <p>Refer to the linked documentation for examples of how to reindex documents.</p>
 |
 |
 |      `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-reindex>`_
 |
 |      :param dest: The destination you are copying to.
 |      :param source: The source you are copying from.
 |      :param conflicts: Indicates whether to continue reindexing even when there are
 |          conflicts.
 |      :param max_docs: The maximum number of documents to reindex. By default, all
 |          documents are reindexed. If it is a value less then or equal to `scroll_size`,
 |          a scroll will not be used to retrieve the results for the operation. If `conflicts`
 |          is set to `proceed`, the reindex operation could attempt to reindex more
 |          documents from the source than `max_docs` until it has successfully indexed
 |          `max_docs` documents into the target or it has gone through every document
 |          in the source query.
 |      :param refresh: If `true`, the request refreshes affected shards to make this
 |          operation visible to search.
 |      :param requests_per_second: The throttle for this request in sub-requests per
 |          second. By default, there is no throttle.
 |      :param require_alias: If `true`, the destination must be an index alias.
 |      :param script: The script to run to update the document source or metadata when
 |          reindexing.
 |      :param scroll: The period of time that a consistent view of the index should
 |          be maintained for scrolled search.
 |      :param slices: The number of slices this task should be divided into. It defaults
 |          to one slice, which means the task isn't sliced into subtasks. Reindex supports
 |          sliced scroll to parallelize the reindexing process. This parallelization
 |          can improve efficiency and provide a convenient way to break the request
 |          down into smaller parts. NOTE: Reindexing from remote clusters does not support
 |          manual or automatic slicing. If set to `auto`, Elasticsearch chooses the
 |          number of slices to use. This setting will use one slice per shard, up to
 |          a certain limit. If there are multiple sources, it will choose the number
 |          of slices based on the index or backing index with the smallest number of
 |          shards.
 |      :param timeout: The period each indexing waits for automatic index creation,
 |          dynamic mapping updates, and waiting for active shards. By default, Elasticsearch
 |          waits for at least one minute before failing. The actual wait time could
 |          be longer, particularly when multiple waits occur.
 |      :param wait_for_active_shards: The number of shard copies that must be active
 |          before proceeding with the operation. Set it to `all` or any positive integer
 |          up to the total number of shards in the index (`number_of_replicas+1`). The
 |          default value is one, which means it waits for each primary shard to be active.
 |      :param wait_for_completion: If `true`, the request blocks until the operation
 |          is complete.
 |
 |  reindex_rethrottle(self, *, task_id: str, requests_per_second: float, error_trace: Optional[bool] = None, filter_path: Union[str, Sequence[str], NoneType] = None, group_by: Union[str, Literal['nodes', 'none', 'parents'], NoneType] = None, human: Optional[bool] = None, pretty: Optional[bool] = None) -> elastic_transport.ObjectApiResponse[typing.Any]
 |      .. raw:: html
 |
 |        <p>Throttle a reindex operation.</p>
 |        <p>Change the number of requests per second for a particular reindex operation.
 |        For example:</p>
 |        <pre><code>POST _reindex/r1A2WoRbTwKZ516z6NEs5A:36619/_rethrottle?requests_per_second=-1
 |        </code></pre>
 |        <p>Rethrottling that speeds up the query takes effect immediately.
 |        Rethrottling that slows down the query will take effect after completing the current batch.
 |        This behavior prevents scroll timeouts.</p>
 |
 |
 |      `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-reindex>`_
 |
 |      :param task_id: The task identifier, which can be found by using the tasks API.
 |      :param requests_per_second: The throttle for this request in sub-requests per
 |          second. It can be either `-1` to turn off throttling or any decimal number
 |          like `1.7` or `12` to throttle to that level.
 |      :param group_by:
 |
 |  render_search_template(self, *, id: Optional[str] = None, error_trace: Optional[bool] = None, file: Optional[str] = None, filter_path: Union[str, Sequence[str], NoneType] = None, human: Optional[bool] = None, params: Optional[Mapping[str, Any]] = None, pretty: Optional[bool] = None, source: Union[str, Mapping[str, Any], NoneType] = None, body: Optional[Dict[str, Any]] = None) -> elastic_transport.ObjectApiResponse[typing.Any]
 |      .. raw:: html
 |
 |        <p>Render a search template.</p>
 |        <p>Render a search template as a search request body.</p>
 |
 |
 |      `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation-render-search-template>`_
 |
 |      :param id: The ID of the search template to render. If no `source` is specified,
 |          this or the `id` request body parameter is required.
 |      :param file:
 |      :param params: Key-value pairs used to replace Mustache variables in the template.
 |          The key is the variable name. The value is the variable value.
 |      :param source: An inline search template. It supports the same parameters as
 |          the search API's request body. These parameters also support Mustache variables.
 |          If no `id` or `<templated-id>` is specified, this parameter is required.
 |
 |  scripts_painless_execute(self, *, context: Union[str, Literal['boolean_field', 'composite_field', 'date_field', 'double_field', 'filter', 'geo_point_field', 'ip_field', 'keyword_field', 'long_field', 'painless_test', 'score'], NoneType] = None, context_setup: Optional[Mapping[str, Any]] = None, error_trace: Optional[bool] = None, filter_path: Union[str, Sequence[str], NoneType] = None, human: Optional[bool] = None, pretty: Optional[bool] = None, script: Optional[Mapping[str, Any]] = None, body: Optional[Dict[str, Any]] = None) -> elastic_transport.ObjectApiResponse[typing.Any]
 |      .. raw:: html
 |
 |        <p>Run a script.</p>
 |        <p>Runs a script and returns a result.
 |        Use this API to build and test scripts, such as when defining a script for a runtime field.
 |        This API requires very few dependencies and is especially useful if you don't have permissions to write documents on a cluster.</p>
 |        <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>
 |        <p>Each context requires a script, but additional parameters depend on the context you're using for that script.</p>
 |
 |
 |      `<https://www.elastic.co/docs/reference/scripting-languages/painless/painless-api-examples>`_
 |
 |      :param context: The context that the script should run in. NOTE: Result ordering
 |          in the field contexts is not guaranteed.
 |      :param context_setup: Additional parameters for the `context`. NOTE: This parameter
 |          is required for all contexts except `painless_test`, which is the default
 |          if no value is provided for `context`.
 |      :param script: The Painless script to run.
 |
 |  scroll(self, *, scroll_id: Optional[str] = None, error_trace: Optional[bool] = None, filter_path: Union[str, Sequence[str], NoneType] = None, human: Optional[bool] = None, pretty: Optional[bool] = None, rest_total_hits_as_int: Optional[bool] = None, scroll: Union[str, Literal[-1], Literal[0], NoneType] = None, body: Optional[Dict[str, Any]] = None) -> elastic_transport.ObjectApiResponse[typing.Any]
 |      .. raw:: html
 |
 |        <p>Run a scrolling search.</p>
 |        <p>IMPORTANT: The scroll API is no longer recommend for deep pagination. If you need to preserve the index state while paging through more than 10,000 hits, use the <code>search_after</code> parameter with a point in time (PIT).</p>
 |        <p>The scroll API gets large sets of results from a single scrolling search request.
 |        To get the necessary scroll ID, submit a search API request that includes an argument for the <code>scroll</code> query parameter.
 |        The <code>scroll</code> parameter indicates how long Elasticsearch should retain the search context for the request.
 |        The search response returns a scroll ID in the <code>_scroll_id</code> response body parameter.
 |        You can then use the scroll ID with the scroll API to retrieve the next batch of results for the request.
 |        If the Elasticsearch security features are enabled, the access to the results of a specific scroll ID is restricted to the user or API key that submitted the search.</p>
 |        <p>You can also use the scroll API to specify a new scroll parameter that extends or shortens the retention period for the search context.</p>
 |        <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>
 |
 |
 |      `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation-scroll>`_
 |
 |      :param scroll_id: The scroll ID of the search.
 |      :param rest_total_hits_as_int: If true, the API response’s hit.total property
 |          is returned as an integer. If false, the API response’s hit.total property
 |          is returned as an object.
 |      :param scroll: The period to retain the search context for scrolling.
 |
 |  search(self, *, index: Union[str, Sequence[str], NoneType] = None, aggregations: Optional[Mapping[str, Mapping[str, Any]]] = None, aggs: Optional[Mapping[str, Mapping[str, Any]]] = None, allow_no_indices: Optional[bool] = None, allow_partial_search_results: Optional[bool] = None, analyze_wildcard: Optional[bool] = None, analyzer: Optional[str] = None, batched_reduce_size: Optional[int] = None, ccs_minimize_roundtrips: Optional[bool] = None, collapse: Optional[Mapping[str, Any]] = None, default_operator: Union[str, Literal['and', 'or'], NoneType] = None, df: Optional[str] = None, docvalue_fields: Optional[Sequence[Mapping[str, Any]]] = None, error_trace: Optional[bool] = None, expand_wildcards: Union[Sequence[Union[str, Literal['all', 'closed', 'hidden', 'none', 'open']]], str, Literal['all', 'closed', 'hidden', 'none', 'open'], NoneType] = None, explain: Optional[bool] = None, ext: Optional[Mapping[str, Any]] = None, fields: Optional[Sequence[Mapping[str, Any]]] = None, filter_path: Union[str, Sequence[str], NoneType] = None, force_synthetic_source: Optional[bool] = None, from_: Optional[int] = None, highlight: Optional[Mapping[str, Any]] = None, human: Optional[bool] = None, ignore_throttled: Optional[bool] = None, ignore_unavailable: Optional[bool] = None, include_named_queries_score: Optional[bool] = None, indices_boost: Optional[Sequence[Mapping[str, float]]] = None, knn: Union[Mapping[str, Any], Sequence[Mapping[str, Any]], NoneType] = None, lenient: Optional[bool] = None, max_concurrent_shard_requests: Optional[int] = None, min_score: Optional[float] = None, pit: Optional[Mapping[str, Any]] = None, post_filter: Optional[Mapping[str, Any]] = None, pre_filter_shard_size: Optional[int] = None, preference: Optional[str] = None, pretty: Optional[bool] = None, profile: Optional[bool] = None, project_routing: Optional[str] = None, q: Optional[str] = None, query: Optional[Mapping[str, Any]] = None, rank: Optional[Mapping[str, Any]] = None, request_cache: Optional[bool] = None, rescore: Union[Mapping[str, Any], Sequence[Mapping[str, Any]], NoneType] = None, rest_total_hits_as_int: Optional[bool] = None, retriever: Optional[Mapping[str, Any]] = None, routing: Union[str, Sequence[str], NoneType] = None, runtime_mappings: Optional[Mapping[str, Mapping[str, Any]]] = None, script_fields: Optional[Mapping[str, Mapping[str, Any]]] = None, scroll: Union[str, Literal[-1], Literal[0], NoneType] = None, search_after: Optional[Sequence[Union[NoneType, bool, float, int, str]]] = None, search_type: Union[str, Literal['dfs_query_then_fetch', 'query_then_fetch'], NoneType] = None, seq_no_primary_term: Optional[bool] = None, size: Optional[int] = None, slice: Optional[Mapping[str, Any]] = None, sort: Union[Sequence[Union[str, Mapping[str, Any]]], str, Mapping[str, Any], NoneType] = None, source: Union[bool, Mapping[str, Any], NoneType] = None, source_exclude_vectors: Optional[bool] = None, source_excludes: Union[str, Sequence[str], NoneType] = None, source_includes: Union[str, Sequence[str], NoneType] = None, stats: Optional[Sequence[str]] = None, stored_fields: Union[str, Sequence[str], NoneType] = None, suggest: Optional[Mapping[str, Any]] = None, suggest_field: Optional[str] = None, suggest_mode: Union[str, Literal['always', 'missing', 'popular'], NoneType] = None, suggest_size: Optional[int] = None, suggest_text: Optional[str] = None, terminate_after: Optional[int] = None, timeout: Optional[str] = None, track_scores: Optional[bool] = None, track_total_hits: Union[bool, int, NoneType] = None, typed_keys: Optional[bool] = None, version: Optional[bool] = None, body: Optional[Dict[str, Any]] = None) -> elastic_transport.ObjectApiResponse[typing.Any]
 |      .. raw:: html
 |
 |        <p>Run a search.</p>
 |        <p>Get search hits that match the query defined in the request.
 |        You can provide search queries using the <code>q</code> query string parameter or the request body.
 |        If both are specified, only the query parameter is used.</p>
 |        <p>If the Elasticsearch security features are enabled, you must have the read index privilege for the target data stream, index, or alias. For cross-cluster search, refer to the documentation about configuring CCS privileges.
 |        To search a point in time (PIT) for an alias, you must have the <code>read</code> index privilege for the alias's data streams or indices.</p>
 |        <p><strong>Search slicing</strong></p>
 |        <p>When paging through a large number of documents, it can be helpful to split the search into multiple slices to consume them independently with the <code>slice</code> and <code>pit</code> properties.
 |        By default the splitting is done first on the shards, then locally on each shard.</p>
 |        <p>For instance if the number of shards is equal to 2 and you request 4 slices, the slices 0 and 2 are assigned to the first shard and the slices 1 and 3 are assigned to the second shard.</p>
 |        <p>IMPORTANT: The same point-in-time ID should be used for all slices.
 |        If different PIT IDs are used, slices can overlap and miss documents.
 |        This situation can occur because, by default, the splitting criterion is based on Lucene document IDs, which are not stable across changes to the index.</p>
 |
 |
 |      `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation-search>`_
 |
 |      :param index: A comma-separated list of data streams, indices, and aliases to
 |          search. It supports wildcards (`*`). To search all data streams and indices,
 |          omit this parameter or use `*` or `_all`.
 |      :param aggregations: Defines the aggregations that are run as part of the search
 |          request.
 |      :param aggs: Defines the aggregations that are run as part of the search request.
 |      :param allow_no_indices: A setting that does two separate checks on the index
 |          expression. If `false`, the request returns an error (1) if any wildcard
 |          expression (including `_all` and `*`) resolves to zero matching indices or
 |          (2) if the complete set of resolved indices, aliases or data streams is empty
 |          after all expressions are evaluated. If `true`, index expressions that resolve
 |          to no indices are allowed and the request returns an empty result.
 |      :param allow_partial_search_results: If `true` and there are shard request timeouts
 |          or shard failures, the request returns partial results. If `false`, it returns
 |          an error with no partial results. To override the default behavior, you can
 |          set the `search.default_allow_partial_results` cluster setting to `false`.
 |      :param analyze_wildcard: If `true`, wildcard and prefix queries are analyzed.
 |          This parameter can be used only when the `q` query string parameter is specified.
 |      :param analyzer: The analyzer to use for the query string. This parameter can
 |          be used only when the `q` query string parameter is specified.
 |      :param batched_reduce_size: The number of shard results that should be reduced
 |          at once on the coordinating node. If the potential number of shards in the
 |          request can be large, this value should be used as a protection mechanism
 |          to reduce the memory overhead per search request.
 |      :param ccs_minimize_roundtrips: If `true`, network round-trips between the coordinating
 |          node and the remote clusters are minimized when running cross-cluster search
 |          (CCS) requests.
 |      :param collapse: Collapses search results the values of the specified field.
 |      :param default_operator: The default operator for the query string query: `and`
 |          or `or`. This parameter can be used only when the `q` query string parameter
 |          is specified.
 |      :param df: The field to use as a default when no field prefix is given in the
 |          query string. This parameter can be used only when the `q` query string parameter
 |          is specified.
 |      :param docvalue_fields: An array of wildcard (`*`) field patterns. The request
 |          returns doc values for field names matching these patterns in the `hits.fields`
 |          property of the response.
 |      :param expand_wildcards: The type of index that wildcard patterns can match.
 |          If the request can target data streams, this argument determines whether
 |          wildcard expressions match hidden data streams. It supports comma-separated
 |          values such as `open,hidden`.
 |      :param explain: If `true`, the request returns detailed information about score
 |          computation as part of a hit.
 |      :param ext: Configuration of search extensions defined by Elasticsearch plugins.
 |      :param fields: An array of wildcard (`*`) field patterns. The request returns
 |          values for field names matching these patterns in the `hits.fields` property
 |          of the response.
 |      :param force_synthetic_source: Should this request force synthetic _source? Use
 |          this to test if the mapping supports synthetic _source and to get a sense
 |          of the worst case performance. Fetches with this enabled will be slower the
 |          enabling synthetic source natively in the index.
 |      :param from_: The starting document offset, which must be non-negative. By default,
 |          you cannot page through more than 10,000 hits using the `from` and `size`
 |          parameters. To page through more hits, use the `search_after` parameter.
 |      :param highlight: Specifies the highlighter to use for retrieving highlighted
 |          snippets from one or more fields in your search results.
 |      :param ignore_throttled: If `true`, concrete, expanded or aliased indices will
 |          be ignored when frozen.
 |      :param ignore_unavailable: If `false`, the request returns an error if it targets
 |          a concrete (non-wildcarded) index, alias, or data stream that is missing,
 |          closed, or otherwise unavailable. If `true`, unavailable concrete targets
 |          are silently ignored.
 |      :param include_named_queries_score: If `true`, the response includes the score
 |          contribution from any named queries. This functionality reruns each named
 |          query on every hit in a search response. Typically, this adds a small overhead
 |          to a request. However, using computationally expensive named queries on a
 |          large number of hits may add significant overhead.
 |      :param indices_boost: Boost the `_score` of documents from specified indices.
 |          The boost value is the factor by which scores are multiplied. A boost value
 |          greater than `1.0` increases the score. A boost value between `0` and `1.0`
 |          decreases the score.
 |      :param knn: The approximate kNN search to run.
 |      :param lenient: If `true`, format-based query failures (such as providing text
 |          to a numeric field) in the query string will be ignored. This parameter can
 |          be used only when the `q` query string parameter is specified.
 |      :param max_concurrent_shard_requests: The number of concurrent shard requests
 |          per node that the search runs concurrently. This value should be used to
 |          limit the impact of the search on the cluster in order to limit the number
 |          of concurrent shard requests.
 |      :param min_score: The minimum `_score` for matching documents. Documents with
 |          a lower `_score` are not included in search results and results collected
 |          by aggregations.
 |      :param pit: Limit the search to a point in time (PIT). If you provide a PIT,
 |          you cannot specify an `<index>` in the request path.
 |      :param post_filter: Use the `post_filter` parameter to filter search results.
 |          The search hits are filtered after the aggregations are calculated. A post
 |          filter has no impact on the aggregation results.
 |      :param pre_filter_shard_size: A threshold that enforces a pre-filter roundtrip
 |          to prefilter search shards based on query rewriting if the number of shards
 |          the search request expands to exceeds the threshold. This filter roundtrip
 |          can limit the number of shards significantly if for instance a shard can
 |          not match any documents based on its rewrite method (if date filters are
 |          mandatory to match but the shard bounds and the query are disjoint). When
 |          unspecified, the pre-filter phase is executed if any of these conditions
 |          is met: * The request targets more than 128 shards. * The request targets
 |          one or more read-only index. * The primary sort of the query targets an indexed
 |          field.
 |      :param preference: The nodes and shards used for the search. By default, Elasticsearch
 |          selects from eligible nodes and shards using adaptive replica selection,
 |          accounting for allocation awareness. Valid values are: * `_only_local` to
 |          run the search only on shards on the local node. * `_local` to, if possible,
 |          run the search on shards on the local node, or if not, select shards using
 |          the default method. * `_only_nodes:<node-id>,<node-id>` to run the search
 |          on only the specified nodes IDs. If suitable shards exist on more than one
 |          selected node, use shards on those nodes using the default method. If none
 |          of the specified nodes are available, select shards from any available node
 |          using the default method. * `_prefer_nodes:<node-id>,<node-id>` to if possible,
 |          run the search on the specified nodes IDs. If not, select shards using the
 |          default method. * `_shards:<shard>,<shard>` to run the search only on the
 |          specified shards. You can combine this value with other `preference` values.
 |          However, the `_shards` value must come first. For example: `_shards:2,3|_local`.
 |          * `<custom-string>` (any string that does not start with `_`) to route searches
 |          with the same `<custom-string>` to the same shards in the same order.
 |      :param profile: Set to `true` to return detailed timing information about the
 |          execution of individual components in a search request. NOTE: This is a debugging
 |          tool and adds significant overhead to search execution.
 |      :param project_routing: Specifies a subset of projects to target for the search
 |          using project metadata tags in a subset of Lucene query syntax. Allowed Lucene
 |          queries: the _alias tag and a single value (possibly wildcarded). Examples:
 |          _alias:my-project _alias:_origin _alias:*pr* Supported in serverless only.
 |      :param q: A query in the Lucene query string syntax. Query parameter searches
 |          do not support the full Elasticsearch Query DSL but are handy for testing.
 |          IMPORTANT: This parameter overrides the query parameter in the request body.
 |          If both parameters are specified, documents matching the query request body
 |          parameter are not returned.
 |      :param query: The search definition using the Query DSL.
 |      :param rank: The Reciprocal Rank Fusion (RRF) to use.
 |      :param request_cache: If `true`, the caching of search results is enabled for
 |          requests where `size` is `0`. It defaults to index level settings.
 |      :param rescore: Can be used to improve precision by reordering just the top (for
 |          example 100 - 500) documents returned by the `query` and `post_filter` phases.
 |      :param rest_total_hits_as_int: Indicates whether `hits.total` should be rendered
 |          as an integer or an object in the rest search response.
 |      :param retriever: A retriever is a specification to describe top documents returned
 |          from a search. A retriever replaces other elements of the search API that
 |          also return top documents such as `query` and `knn`.
 |      :param routing: A custom value that is used to route operations to a specific
 |          shard.
 |      :param runtime_mappings: One or more runtime fields in the search request. These
 |          fields take precedence over mapped fields with the same name.
 |      :param script_fields: Retrieve a script evaluation (based on different fields)
 |          for each hit.
 |      :param scroll: The period to retain the search context for scrolling. By default,
 |          this value cannot exceed `1d` (24 hours). You can change this limit by using
 |          the `search.max_keep_alive` cluster-level setting.
 |      :param search_after: Used to retrieve the next page of hits using a set of sort
 |          values from the previous page.
 |      :param search_type: Indicates how distributed term frequencies are calculated
 |          for relevance scoring.
 |      :param seq_no_primary_term: If `true`, the request returns sequence number and
 |          primary term of the last modification of each hit.
 |      :param size: The number of hits to return, which must not be negative. By default,
 |          you cannot page through more than 10,000 hits using the `from` and `size`
 |          parameters. To page through more hits, use the `search_after` property.
 |      :param slice: Split a scrolled search into multiple slices that can be consumed
 |          independently.
 |      :param sort: A comma-separated list of <field>:<direction> pairs.
 |      :param source: The source fields that are returned for matching documents. These
 |          fields are returned in the `hits._source` property of the search response.
 |          If the `stored_fields` property is specified, the `_source` property defaults
 |          to `false`. Otherwise, it defaults to `true`.
 |      :param source_exclude_vectors: Whether vectors should be excluded from _source
 |      :param source_excludes: A comma-separated list of source fields to exclude from
 |          the response. You can also use this parameter to exclude fields from the
 |          subset specified in `_source_includes` query parameter. If the `_source`
 |          parameter is `false`, this parameter is ignored.
 |      :param source_includes: A comma-separated list of source fields to include in
 |          the response. If this parameter is specified, only these source fields are
 |          returned. You can exclude fields from this subset using the `_source_excludes`
 |          query parameter. If the `_source` parameter is `false`, this parameter is
 |          ignored.
 |      :param stats: The stats groups to associate with the search. Each group maintains
 |          a statistics aggregation for its associated searches. You can retrieve these
 |          stats using the indices stats API.
 |      :param stored_fields: A comma-separated list of stored fields to return as part
 |          of a hit. If no fields are specified, no stored fields are included in the
 |          response. If this field is specified, the `_source` property defaults to
 |          `false`. You can pass `_source: true` to return both source fields and stored
 |          fields in the search response.
 |      :param suggest: Defines a suggester that provides similar looking terms based
 |          on a provided text.
 |      :param suggest_field: The field to use for suggestions.
 |      :param suggest_mode: The suggest mode. This parameter can be used only when the
 |          `suggest_field` and `suggest_text` query string parameters are specified.
 |      :param suggest_size: The number of suggestions to return. This parameter can
 |          be used only when the `suggest_field` and `suggest_text` query string parameters
 |          are specified.
 |      :param suggest_text: The source text for which the suggestions should be returned.
 |          This parameter can be used only when the `suggest_field` and `suggest_text`
 |          query string parameters are specified.
 |      :param terminate_after: The maximum number of documents to collect for each shard.
 |          If a query reaches this limit, Elasticsearch terminates the query early.
 |          Elasticsearch collects documents before sorting. IMPORTANT: Use with caution.
 |          Elasticsearch applies this property to each shard handling the request. When
 |          possible, let Elasticsearch perform early termination automatically. Avoid
 |          specifying this property for requests that target data streams with backing
 |          indices across multiple data tiers. If set to `0` (default), the query does
 |          not terminate early.
 |      :param timeout: The period of time to wait for a response from each shard. If
 |          no response is received before the timeout expires, the request fails and
 |          returns an error. Defaults to no timeout.
 |      :param track_scores: If `true`, calculate and return document scores, even if
 |          the scores are not used for sorting.
 |      :param track_total_hits: Number of hits matching the query to count accurately.
 |          If `true`, the exact number of hits is returned at the cost of some performance.
 |          If `false`, the response does not include the total number of hits matching
 |          the query.
 |      :param typed_keys: If `true`, aggregation and suggester names are be prefixed
 |          by their respective types in the response.
 |      :param version: If `true`, the request returns the document version as part of
 |          a hit.
 |
 |  search_mvt(self, *, index: Union[str, Sequence[str]], field: str, zoom: int, x: int, y: int, aggs: Optional[Mapping[str, Mapping[str, Any]]] = None, buffer: Optional[int] = None, error_trace: Optional[bool] = None, exact_bounds: Optional[bool] = None, extent: Optional[int] = None, fields: Union[str, Sequence[str], NoneType] = None, filter_path: Union[str, Sequence[str], NoneType] = None, grid_agg: Union[str, Literal['geohex', 'geotile'], NoneType] = None, grid_precision: Optional[int] = None, grid_type: Union[str, Literal['centroid', 'grid', 'point'], NoneType] = None, human: Optional[bool] = None, pretty: Optional[bool] = None, project_routing: Optional[str] = None, query: Optional[Mapping[str, Any]] = None, runtime_mappings: Optional[Mapping[str, Mapping[str, Any]]] = None, size: Optional[int] = None, sort: Union[Sequence[Union[str, Mapping[str, Any]]], str, Mapping[str, Any], NoneType] = None, track_total_hits: Union[bool, int, NoneType] = None, with_labels: Optional[bool] = None, body: Optional[Dict[str, Any]] = None) -> elastic_transport.BinaryApiResponse
 |      .. raw:: html
 |
 |        <p>Search a vector tile.</p>
 |        <p>Search a vector tile for geospatial values.
 |        Before using this API, you should be familiar with the Mapbox vector tile specification.
 |        The API returns results as a binary mapbox vector tile.</p>
 |        <p>Internally, Elasticsearch translates a vector tile search API request into a search containing:</p>
 |        <ul>
 |        <li>A <code>geo_bounding_box</code> query on the <code>&lt;field&gt;</code>. The query uses the <code>&lt;zoom&gt;/&lt;x&gt;/&lt;y&gt;</code> tile as a bounding box.</li>
 |        <li>A <code>geotile_grid</code> or <code>geohex_grid</code> aggregation on the <code>&lt;field&gt;</code>. The <code>grid_agg</code> parameter determines the aggregation type. The aggregation uses the <code>&lt;zoom&gt;/&lt;x&gt;/&lt;y&gt;</code> tile as a bounding box.</li>
 |        <li>Optionally, a <code>geo_bounds</code> aggregation on the <code>&lt;field&gt;</code>. The search only includes this aggregation if the <code>exact_bounds</code> parameter is <code>true</code>.</li>
 |        <li>If the optional parameter <code>with_labels</code> is <code>true</code>, the internal search will include a dynamic runtime field that calls the <code>getLabelPosition</code> function of the geometry doc value. This enables the generation of new point features containing suggested geometry labels, so that, for example, multi-polygons will have only one label.</li>
 |        </ul>
 |        <p>The API returns results as a binary Mapbox vector tile.
 |        Mapbox vector tiles are encoded as Google Protobufs (PBF). By default, the tile contains three layers:</p>
 |        <ul>
 |        <li>A <code>hits</code> layer containing a feature for each <code>&lt;field&gt;</code> value matching the <code>geo_bounding_box</code> query.</li>
 |        <li>An <code>aggs</code> layer containing a feature for each cell of the <code>geotile_grid</code> or <code>geohex_grid</code>. The layer only contains features for cells with matching data.</li>
 |        <li>A meta layer containing:
 |        <ul>
 |        <li>A feature containing a bounding box. By default, this is the bounding box of the tile.</li>
 |        <li>Value ranges for any sub-aggregations on the <code>geotile_grid</code> or <code>geohex_grid</code>.</li>
 |        <li>Metadata for the search.</li>
 |        </ul>
 |        </li>
 |        </ul>
 |        <p>The API only returns features that can display at its zoom level.
 |        For example, if a polygon feature has no area at its zoom level, the API omits it.
 |        The API returns errors as UTF-8 encoded JSON.</p>
 |        <p>IMPORTANT: You can specify several options for this API as either a query parameter or request body parameter.
 |        If you specify both parameters, the query parameter takes precedence.</p>
 |        <p><strong>Grid precision for geotile</strong></p>
 |        <p>For a <code>grid_agg</code> of <code>geotile</code>, you can use cells in the <code>aggs</code> layer as tiles for lower zoom levels.
 |        <code>grid_precision</code> represents the additional zoom levels available through these cells. The final precision is computed by as follows: <code>&lt;zoom&gt; + grid_precision</code>.
 |        For example, if <code>&lt;zoom&gt;</code> is 7 and <code>grid_precision</code> is 8, then the <code>geotile_grid</code> aggregation will use a precision of 15.
 |        The maximum final precision is 29.
 |        The <code>grid_precision</code> also determines the number of cells for the grid as follows: <code>(2^grid_precision) x (2^grid_precision)</code>.
 |        For example, a value of 8 divides the tile into a grid of 256 x 256 cells.
 |        The <code>aggs</code> layer only contains features for cells with matching data.</p>
 |        <p><strong>Grid precision for geohex</strong></p>
 |        <p>For a <code>grid_agg</code> of <code>geohex</code>, Elasticsearch uses <code>&lt;zoom&gt;</code> and <code>grid_precision</code> to calculate a final precision as follows: <code>&lt;zoom&gt; + grid_precision</code>.</p>
 |        <p>This precision determines the H3 resolution of the hexagonal cells produced by the <code>geohex</code> aggregation.
 |        The following table maps the H3 resolution for each precision.
 |        For example, if <code>&lt;zoom&gt;</code> is 3 and <code>grid_precision</code> is 3, the precision is 6.
 |        At a precision of 6, hexagonal cells have an H3 resolution of 2.
 |        If <code>&lt;zoom&gt;</code> is 3 and <code>grid_precision</code> is 4, the precision is 7.
 |        At a precision of 7, hexagonal cells have an H3 resolution of 3.</p>
 |        <table>
 |        <thead>
 |        <tr>
 |        <th>Precision</th>
 |        <th>Unique tile bins</th>
 |        <th>H3 resolution</th>
 |        <th>Unique hex bins</th>
 |        <th>Ratio</th>
 |        </tr>
 |        </thead>
 |        <tbody>
 |        <tr>
 |        <td>1</td>
 |        <td>4</td>
 |        <td>0</td>
 |        <td>122</td>
 |        <td>30.5</td>
 |        </tr>
 |        <tr>
 |        <td>2</td>
 |        <td>16</td>
 |        <td>0</td>
 |        <td>122</td>
 |        <td>7.625</td>
 |        </tr>
 |        <tr>
 |        <td>3</td>
 |        <td>64</td>
 |        <td>1</td>
 |        <td>842</td>
 |        <td>13.15625</td>
 |        </tr>
 |        <tr>
 |        <td>4</td>
 |        <td>256</td>
 |        <td>1</td>
 |        <td>842</td>
 |        <td>3.2890625</td>
 |        </tr>
 |        <tr>
 |        <td>5</td>
 |        <td>1024</td>
 |        <td>2</td>
 |        <td>5882</td>
 |        <td>5.744140625</td>
 |        </tr>
 |        <tr>
 |        <td>6</td>
 |        <td>4096</td>
 |        <td>2</td>
 |        <td>5882</td>
 |        <td>1.436035156</td>
 |        </tr>
 |        <tr>
 |        <td>7</td>
 |        <td>16384</td>
 |        <td>3</td>
 |        <td>41162</td>
 |        <td>2.512329102</td>
 |        </tr>
 |        <tr>
 |        <td>8</td>
 |        <td>65536</td>
 |        <td>3</td>
 |        <td>41162</td>
 |        <td>0.6280822754</td>
 |        </tr>
 |        <tr>
 |        <td>9</td>
 |        <td>262144</td>
 |        <td>4</td>
 |        <td>288122</td>
 |        <td>1.099098206</td>
 |        </tr>
 |        <tr>
 |        <td>10</td>
 |        <td>1048576</td>
 |        <td>4</td>
 |        <td>288122</td>
 |        <td>0.2747745514</td>
 |        </tr>
 |        <tr>
 |        <td>11</td>
 |        <td>4194304</td>
 |        <td>5</td>
 |        <td>2016842</td>
 |        <td>0.4808526039</td>
 |        </tr>
 |        <tr>
 |        <td>12</td>
 |        <td>16777216</td>
 |        <td>6</td>
 |        <td>14117882</td>
 |        <td>0.8414913416</td>
 |        </tr>
 |        <tr>
 |        <td>13</td>
 |        <td>67108864</td>
 |        <td>6</td>
 |        <td>14117882</td>
 |        <td>0.2103728354</td>
 |        </tr>
 |        <tr>
 |        <td>14</td>
 |        <td>268435456</td>
 |        <td>7</td>
 |        <td>98825162</td>
 |        <td>0.3681524172</td>
 |        </tr>
 |        <tr>
 |        <td>15</td>
 |        <td>1073741824</td>
 |        <td>8</td>
 |        <td>691776122</td>
 |        <td>0.644266719</td>
 |        </tr>
 |        <tr>
 |        <td>16</td>
 |        <td>4294967296</td>
 |        <td>8</td>
 |        <td>691776122</td>
 |        <td>0.1610666797</td>
 |        </tr>
 |        <tr>
 |        <td>17</td>
 |        <td>17179869184</td>
 |        <td>9</td>
 |        <td>4842432842</td>
 |        <td>0.2818666889</td>
 |        </tr>
 |        <tr>
 |        <td>18</td>
 |        <td>68719476736</td>
 |        <td>10</td>
 |        <td>33897029882</td>
 |        <td>0.4932667053</td>
 |        </tr>
 |        <tr>
 |        <td>19</td>
 |        <td>274877906944</td>
 |        <td>11</td>
 |        <td>237279209162</td>
 |        <td>0.8632167343</td>
 |        </tr>
 |        <tr>
 |        <td>20</td>
 |        <td>1099511627776</td>
 |        <td>11</td>
 |        <td>237279209162</td>
 |        <td>0.2158041836</td>
 |        </tr>
 |        <tr>
 |        <td>21</td>
 |        <td>4398046511104</td>
 |        <td>12</td>
 |        <td>1660954464122</td>
 |        <td>0.3776573213</td>
 |        </tr>
 |        <tr>
 |        <td>22</td>
 |        <td>17592186044416</td>
 |        <td>13</td>
 |        <td>11626681248842</td>
 |        <td>0.6609003122</td>
 |        </tr>
 |        <tr>
 |        <td>23</td>
 |        <td>70368744177664</td>
 |        <td>13</td>
 |        <td>11626681248842</td>
 |        <td>0.165225078</td>
 |        </tr>
 |        <tr>
 |        <td>24</td>
 |        <td>281474976710656</td>
 |        <td>14</td>
 |        <td>81386768741882</td>
 |        <td>0.2891438866</td>
 |        </tr>
 |        <tr>
 |        <td>25</td>
 |        <td>1125899906842620</td>
 |        <td>15</td>
 |        <td>569707381193162</td>
 |        <td>0.5060018015</td>
 |        </tr>
 |        <tr>
 |        <td>26</td>
 |        <td>4503599627370500</td>
 |        <td>15</td>
 |        <td>569707381193162</td>
 |        <td>0.1265004504</td>
 |        </tr>
 |        <tr>
 |        <td>27</td>
 |        <td>18014398509482000</td>
 |        <td>15</td>
 |        <td>569707381193162</td>
 |        <td>0.03162511259</td>
 |        </tr>
 |        <tr>
 |        <td>28</td>
 |        <td>72057594037927900</td>
 |        <td>15</td>
 |        <td>569707381193162</td>
 |        <td>0.007906278149</td>
 |        </tr>
 |        <tr>
 |        <td>29</td>
 |        <td>288230376151712000</td>
 |        <td>15</td>
 |        <td>569707381193162</td>
 |        <td>0.001976569537</td>
 |        </tr>
 |        </tbody>
 |        </table>
 |        <p>Hexagonal cells don't align perfectly on a vector tile.
 |        Some cells may intersect more than one vector tile.
 |        To compute the H3 resolution for each precision, Elasticsearch compares the average density of hexagonal bins at each resolution with the average density of tile bins at each zoom level.
 |        Elasticsearch uses the H3 resolution that is closest to the corresponding geotile density.</p>
 |        <p>Learn how to use the vector tile search API with practical examples in the <a href="https://www.elastic.co/docs/reference/elasticsearch/rest-apis/vector-tile-search">Vector tile search examples</a> guide.</p>
 |
 |
 |      `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation-search-mvt>`_
 |
 |      :param index: A list of indices, data streams, or aliases to search. It supports
 |          wildcards (`*`). To search all data streams and indices, omit this parameter
 |          or use `*` or `_all`. To search a remote cluster, use the `<cluster>:<target>`
 |          syntax.
 |      :param field: A field that contains the geospatial data to return. It must be
 |          a `geo_point` or `geo_shape` field. The field must have doc values enabled.
 |          It cannot be a nested field. NOTE: Vector tiles do not natively support geometry
 |          collections. For `geometrycollection` values in a `geo_shape` field, the
 |          API returns a hits layer feature for each element of the collection. This
 |          behavior may change in a future release.
 |      :param zoom: The zoom level of the vector tile to search. It accepts `0` to `29`.
 |      :param x: The X coordinate for the vector tile to search.
 |      :param y: The Y coordinate for the vector tile to search.
 |      :param aggs: Sub-aggregations for the geotile_grid. It supports the following
 |          aggregation types: - `avg` - `boxplot` - `cardinality` - `extended stats`
 |          - `max` - `median absolute deviation` - `min` - `percentile` - `percentile-rank`
 |          - `stats` - `sum` - `value count` The aggregation names can't start with
 |          `_mvt_`. The `_mvt_` prefix is reserved for internal aggregations.
 |      :param buffer: The size, in pixels, of a clipping buffer outside the tile. This
 |          allows renderers to avoid outline artifacts from geometries that extend past
 |          the extent of the tile.
 |      :param exact_bounds: If `false`, the meta layer's feature is the bounding box
 |          of the tile. If `true`, the meta layer's feature is a bounding box resulting
 |          from a `geo_bounds` aggregation. The aggregation runs on <field> values that
 |          intersect the `<zoom>/<x>/<y>` tile with `wrap_longitude` set to `false`.
 |          The resulting bounding box may be larger than the vector tile.
 |      :param extent: The size, in pixels, of a side of the tile. Vector tiles are square
 |          with equal sides.
 |      :param fields: The fields to return in the `hits` layer. It supports wildcards
 |          (`*`). This parameter does not support fields with array values. Fields with
 |          array values may return inconsistent results.
 |      :param grid_agg: The aggregation used to create a grid for the `field`.
 |      :param grid_precision: Additional zoom levels available through the aggs layer.
 |          For example, if `<zoom>` is `7` and `grid_precision` is `8`, you can zoom
 |          in up to level 15. Accepts 0-8. If 0, results don't include the aggs layer.
 |      :param grid_type: Determines the geometry type for features in the aggs layer.
 |          In the aggs layer, each feature represents a `geotile_grid` cell. If `grid,
 |          each feature is a polygon of the cells bounding box. If `point`, each feature
 |          is a Point that is the centroid of the cell.
 |      :param project_routing: Specifies a subset of projects to target for the search
 |          using project metadata tags in a subset of Lucene query syntax. Allowed Lucene
 |          queries: the _alias tag and a single value (possibly wildcarded). Examples:
 |          _alias:my-project _alias:_origin _alias:*pr* Supported in serverless only.
 |      :param query: The query DSL used to filter documents for the search.
 |      :param runtime_mappings: Defines one or more runtime fields in the search request.
 |          These fields take precedence over mapped fields with the same name.
 |      :param size: The maximum number of features to return in the hits layer. Accepts
 |          0-10000. If 0, results don't include the hits layer.
 |      :param sort: Sort the features in the hits layer. By default, the API calculates
 |          a bounding box for each feature. It sorts features based on this box's diagonal
 |          length, from longest to shortest.
 |      :param track_total_hits: The number of hits matching the query to count accurately.
 |          If `true`, the exact number of hits is returned at the cost of some performance.
 |          If `false`, the response does not include the total number of hits matching
 |          the query.
 |      :param with_labels: If `true`, the hits and aggs layers will contain additional
 |          point features representing suggested label positions for the original features.
 |          * `Point` and `MultiPoint` features will have one of the points selected.
 |          * `Polygon` and `MultiPolygon` features will have a single point generated,
 |          either the centroid, if it is within the polygon, or another point within
 |          the polygon selected from the sorted triangle-tree. * `LineString` features
 |          will likewise provide a roughly central point selected from the triangle-tree.
 |          * The aggregation results will provide one central point for each aggregation
 |          bucket. All attributes from the original features will also be copied to
 |          the new label features. In addition, the new features will be distinguishable
 |          using the tag `_mvt_label_position`.
 |
 |  search_shards(self, *, index: Union[str, Sequence[str], NoneType] = None, allow_no_indices: Optional[bool] = None, error_trace: Optional[bool] = None, expand_wildcards: Union[Sequence[Union[str, Literal['all', 'closed', 'hidden', 'none', 'open']]], str, Literal['all', 'closed', 'hidden', 'none', 'open'], NoneType] = None, filter_path: Union[str, Sequence[str], NoneType] = None, human: Optional[bool] = None, ignore_unavailable: Optional[bool] = None, local: Optional[bool] = None, master_timeout: Union[str, Literal[-1], Literal[0], NoneType] = None, preference: Optional[str] = None, pretty: Optional[bool] = None, routing: Union[str, Sequence[str], NoneType] = None) -> elastic_transport.ObjectApiResponse[typing.Any]
 |      .. raw:: html
 |
 |        <p>Get the search shards.</p>
 |        <p>Get the indices and shards that a search request would be run against.
 |        This information can be useful for working out issues or planning optimizations with routing and shard preferences.
 |        When filtered aliases are used, the filter is returned as part of the <code>indices</code> section.</p>
 |        <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>
 |
 |
 |      `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation-search-shards>`_
 |
 |      :param index: A comma-separated list of data streams, indices, and aliases to
 |          search. It supports wildcards (`*`). To search all data streams and indices,
 |          omit this parameter or use `*` or `_all`.
 |      :param allow_no_indices: A setting that does two separate checks on the index
 |          expression. If `false`, the request returns an error (1) if any wildcard
 |          expression (including `_all` and `*`) resolves to zero matching indices or
 |          (2) if the complete set of resolved indices, aliases or data streams is empty
 |          after all expressions are evaluated. If `true`, index expressions that resolve
 |          to no indices are allowed and the request returns an empty result.
 |      :param expand_wildcards: Type of index that wildcard patterns can match. If the
 |          request can target data streams, this argument determines whether wildcard
 |          expressions match hidden data streams. Supports comma-separated values, such
 |          as `open,hidden`.
 |      :param ignore_unavailable: If `false`, the request returns an error if it targets
 |          a concrete (non-wildcarded) index, alias, or data stream that is missing,
 |          closed, or otherwise unavailable. If `true`, unavailable concrete targets
 |          are silently ignored.
 |      :param local: If `true`, the request retrieves information from the local node
 |          only.
 |      :param master_timeout: The period to wait for a connection to the master node.
 |          If the master node is not available before the timeout expires, the request
 |          fails and returns an error. IT can also be set to `-1` to indicate that the
 |          request should never timeout.
 |      :param preference: The node or shard the operation should be performed on. It
 |          is random by default.
 |      :param routing: A custom value used to route operations to a specific shard.
 |
 |  search_template(self, *, index: Union[str, Sequence[str], NoneType] = None, allow_no_indices: Optional[bool] = None, ccs_minimize_roundtrips: Optional[bool] = None, error_trace: Optional[bool] = None, expand_wildcards: Union[Sequence[Union[str, Literal['all', 'closed', 'hidden', 'none', 'open']]], str, Literal['all', 'closed', 'hidden', 'none', 'open'], NoneType] = None, explain: Optional[bool] = None, filter_path: Union[str, Sequence[str], NoneType] = None, human: Optional[bool] = None, id: Optional[str] = None, ignore_throttled: Optional[bool] = None, ignore_unavailable: Optional[bool] = None, params: Optional[Mapping[str, Any]] = None, preference: Optional[str] = None, pretty: Optional[bool] = None, profile: Optional[bool] = None, project_routing: Optional[str] = None, rest_total_hits_as_int: Optional[bool] = None, routing: Union[str, Sequence[str], NoneType] = None, scroll: Union[str, Literal[-1], Literal[0], NoneType] = None, search_type: Union[str, Literal['dfs_query_then_fetch', 'query_then_fetch'], NoneType] = None, source: Union[str, Mapping[str, Any], NoneType] = None, typed_keys: Optional[bool] = None, body: Optional[Dict[str, Any]] = None) -> elastic_transport.ObjectApiResponse[typing.Any]
 |      .. raw:: html
 |
 |        <p>Run a search with a search template.</p>
 |
 |
 |      `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation-search-template>`_
 |
 |      :param index: A comma-separated list of data streams, indices, and aliases to
 |          search. It supports wildcards (`*`).
 |      :param allow_no_indices: A setting that does two separate checks on the index
 |          expression. If `false`, the request returns an error (1) if any wildcard
 |          expression (including `_all` and `*`) resolves to zero matching indices or
 |          (2) if the complete set of resolved indices, aliases or data streams is empty
 |          after all expressions are evaluated. If `true`, index expressions that resolve
 |          to no indices are allowed and the request returns an empty result.
 |      :param ccs_minimize_roundtrips: Indicates whether network round-trips should
 |          be minimized as part of cross-cluster search requests execution.
 |      :param expand_wildcards: The type of index that wildcard patterns can match.
 |          If the request can target data streams, this argument determines whether
 |          wildcard expressions match hidden data streams. Supports comma-separated
 |          values, such as `open,hidden`.
 |      :param explain: If `true`, returns detailed information about score calculation
 |          as part of each hit. If you specify both this and the `explain` query parameter,
 |          the API uses only the query parameter.
 |      :param id: The ID of the search template to use. If no `source` is specified,
 |          this parameter is required.
 |      :param ignore_throttled: If `true`, specified concrete, expanded, or aliased
 |          indices are not included in the response when throttled.
 |      :param ignore_unavailable: If `false`, the request returns an error if it targets
 |          a concrete (non-wildcarded) index, alias, or data stream that is missing,
 |          closed, or otherwise unavailable. If `true`, unavailable concrete targets
 |          are silently ignored.
 |      :param params: Key-value pairs used to replace Mustache variables in the template.
 |          The key is the variable name. The value is the variable value.
 |      :param preference: The node or shard the operation should be performed on. It
 |          is random by default.
 |      :param profile: If `true`, the query execution is profiled.
 |      :param project_routing: Specifies a subset of projects to target for the search
 |          using project metadata tags in a subset of Lucene query syntax. Allowed Lucene
 |          queries: the _alias tag and a single value (possibly wildcarded). Examples:
 |          _alias:my-project _alias:_origin _alias:*pr* Supported in serverless only.
 |      :param rest_total_hits_as_int: If `true`, `hits.total` is rendered as an integer
 |          in the response. If `false`, it is rendered as an object.
 |      :param routing: A custom value used to route operations to a specific shard.
 |      :param scroll: Specifies how long a consistent view of the index should be maintained
 |          for scrolled search.
 |      :param search_type: The type of the search operation.
 |      :param source: An inline search template. Supports the same parameters as the
 |          search API's request body. It also supports Mustache variables. If no `id`
 |          is specified, this parameter is required.
 |      :param typed_keys: If `true`, the response prefixes aggregation and suggester
 |          names with their respective types.
 |
 |  terms_enum(self, *, index: Union[str, Sequence[str]], field: Optional[str] = None, case_insensitive: Optional[bool] = None, error_trace: Optional[bool] = None, filter_path: Union[str, Sequence[str], NoneType] = None, human: Optional[bool] = None, index_filter: Optional[Mapping[str, Any]] = None, pretty: Optional[bool] = None, search_after: Optional[str] = None, size: Optional[int] = None, string: Optional[str] = None, timeout: Union[str, Literal[-1], Literal[0], NoneType] = None, body: Optional[Dict[str, Any]] = None) -> elastic_transport.ObjectApiResponse[typing.Any]
 |      .. raw:: html
 |
 |        <p>Get terms in an index.</p>
 |        <p>Discover terms that match a partial string in an index.
 |        This API is designed for low-latency look-ups used in auto-complete scenarios.</p>
 |        <blockquote>
 |        <p>info
 |        The terms enum API may return terms from deleted documents. Deleted documents are initially only marked as deleted. It is not until their segments are merged that documents are actually deleted. Until that happens, the terms enum API will return terms from these documents.</p>
 |        </blockquote>
 |
 |
 |      `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation-terms-enum>`_
 |
 |      :param index: A comma-separated list of data streams, indices, and index aliases
 |          to search. Wildcard (`*`) expressions are supported. To search all data streams
 |          or indices, omit this parameter or use `*` or `_all`.
 |      :param field: The string to match at the start of indexed terms. If not provided,
 |          all terms in the field are considered.
 |      :param case_insensitive: When `true`, the provided search string is matched against
 |          index terms without case sensitivity.
 |      :param index_filter: Filter an index shard if the provided query rewrites to
 |          `match_none`.
 |      :param search_after: The string after which terms in the index should be returned.
 |          It allows for a form of pagination if the last result from one request is
 |          passed as the `search_after` parameter for a subsequent request.
 |      :param size: The number of matching terms to return.
 |      :param string: The string to match at the start of indexed terms. If it is not
 |          provided, all terms in the field are considered. > info > The prefix string
 |          cannot be larger than the largest possible keyword value, which is Lucene's
 |          term byte-length limit of 32766.
 |      :param timeout: The maximum length of time to spend collecting results. If the
 |          timeout is exceeded the `complete` flag set to `false` in the response and
 |          the results may be partial or empty.
 |
 |  termvectors(self, *, index: str, id: Optional[str] = None, doc: Optional[Mapping[str, Any]] = None, error_trace: Optional[bool] = None, field_statistics: Optional[bool] = None, fields: Optional[Sequence[str]] = None, filter: Optional[Mapping[str, Any]] = None, filter_path: Union[str, Sequence[str], NoneType] = None, human: Optional[bool] = None, offsets: Optional[bool] = None, payloads: Optional[bool] = None, per_field_analyzer: Optional[Mapping[str, str]] = None, positions: Optional[bool] = None, preference: Optional[str] = None, pretty: Optional[bool] = None, realtime: Optional[bool] = None, routing: Union[str, Sequence[str], NoneType] = None, term_statistics: Optional[bool] = None, version: Optional[int] = None, version_type: Union[str, Literal['external', 'external_gte', 'internal'], NoneType] = None, body: Optional[Dict[str, Any]] = None) -> elastic_transport.ObjectApiResponse[typing.Any]
 |      .. raw:: html
 |
 |        <p>Get term vector information.</p>
 |        <p>Get information and statistics about terms in the fields of a particular document.</p>
 |        <p>You can retrieve term vectors for documents stored in the index or for artificial documents passed in the body of the request.
 |        You can specify the fields you are interested in through the <code>fields</code> parameter or by adding the fields to the request body.
 |        For example:</p>
 |        <pre><code>GET /my-index-000001/_termvectors/1?fields=message
 |        </code></pre>
 |        <p>Fields can be specified using wildcards, similar to the multi match query.</p>
 |        <p>Term vectors are real-time by default, not near real-time.
 |        This can be changed by setting <code>realtime</code> parameter to <code>false</code>.</p>
 |        <p>You can request three types of values: <em>term information</em>, <em>term statistics</em>, and <em>field statistics</em>.
 |        By default, all term information and field statistics are returned for all fields but term statistics are excluded.</p>
 |        <p><strong>Term information</strong></p>
 |        <ul>
 |        <li>term frequency in the field (always returned)</li>
 |        <li>term positions (<code>positions: true</code>)</li>
 |        <li>start and end offsets (<code>offsets: true</code>)</li>
 |        <li>term payloads (<code>payloads: true</code>), as base64 encoded bytes</li>
 |        </ul>
 |        <p>If the requested information wasn't stored in the index, it will be computed on the fly if possible.
 |        Additionally, term vectors could be computed for documents not even existing in the index, but instead provided by the user.</p>
 |        <blockquote>
 |        <p>warn
 |        Start and end offsets assume UTF-16 encoding is being used. If you want to use these offsets in order to get the original text that produced this token, you should make sure that the string you are taking a sub-string of is also encoded using UTF-16.</p>
 |        </blockquote>
 |        <p><strong>Behaviour</strong></p>
 |        <p>The term and field statistics are not accurate.
 |        Deleted documents are not taken into account.
 |        The information is only retrieved for the shard the requested document resides in.
 |        The term and field statistics are therefore only useful as relative measures whereas the absolute numbers have no meaning in this context.
 |        By default, when requesting term vectors of artificial documents, a shard to get the statistics from is randomly selected.
 |        Use <code>routing</code> only to hit a particular shard.
 |        Refer to the linked documentation for detailed examples of how to use this API.</p>
 |
 |
 |      `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-termvectors>`_
 |
 |      :param index: The name of the index that contains the document.
 |      :param id: A unique identifier for the document.
 |      :param doc: An artificial document (a document not present in the index) for
 |          which you want to retrieve term vectors.
 |      :param field_statistics: If `true`, the response includes: * The document count
 |          (how many documents contain this field). * The sum of document frequencies
 |          (the sum of document frequencies for all terms in this field). * The sum
 |          of total term frequencies (the sum of total term frequencies of each term
 |          in this field).
 |      :param fields: A list of fields to include in the statistics. It is used as the
 |          default list unless a specific field list is provided in the `completion_fields`
 |          or `fielddata_fields` parameters.
 |      :param filter: Filter terms based on their tf-idf scores. This could be useful
 |          in order find out a good characteristic vector of a document. This feature
 |          works in a similar manner to the second phase of the More Like This Query.
 |      :param offsets: If `true`, the response includes term offsets.
 |      :param payloads: If `true`, the response includes term payloads.
 |      :param per_field_analyzer: Override the default per-field analyzer. This is useful
 |          in order to generate term vectors in any fashion, especially when using artificial
 |          documents. When providing an analyzer for a field that already stores term
 |          vectors, the term vectors will be regenerated.
 |      :param positions: If `true`, the response includes term positions.
 |      :param preference: The node or shard the operation should be performed on. It
 |          is random by default.
 |      :param realtime: If true, the request is real-time as opposed to near-real-time.
 |      :param routing: A custom value that is used to route operations to a specific
 |          shard.
 |      :param term_statistics: If `true`, the response includes: * The total term frequency
 |          (how often a term occurs in all documents). * The document frequency (the
 |          number of documents containing the current term). By default these values
 |          are not returned since term statistics can have a serious performance impact.
 |      :param version: If `true`, returns the document version as part of a hit.
 |      :param version_type: The version type.
 |
 |  update(self, *, index: str, id: str, detect_noop: Optional[bool] = None, doc: Optional[Mapping[str, Any]] = None, doc_as_upsert: Optional[bool] = None, error_trace: Optional[bool] = None, filter_path: Union[str, Sequence[str], NoneType] = None, human: Optional[bool] = None, if_primary_term: Optional[int] = None, if_seq_no: Optional[int] = None, include_source_on_error: Optional[bool] = None, lang: Optional[str] = None, pretty: Optional[bool] = None, refresh: Union[bool, str, Literal['false', 'true', 'wait_for'], NoneType] = None, require_alias: Optional[bool] = None, retry_on_conflict: Optional[int] = None, routing: Union[str, Sequence[str], NoneType] = None, script: Optional[Mapping[str, Any]] = None, scripted_upsert: Optional[bool] = None, source: Union[bool, Mapping[str, Any], NoneType] = None, source_excludes: Union[str, Sequence[str], NoneType] = None, source_includes: Union[str, Sequence[str], NoneType] = None, timeout: Union[str, Literal[-1], Literal[0], NoneType] = None, upsert: Optional[Mapping[str, Any]] = None, wait_for_active_shards: Union[int, str, Literal['all', 'index-setting'], NoneType] = None, body: Optional[Dict[str, Any]] = None) -> elastic_transport.ObjectApiResponse[typing.Any]
 |      .. raw:: html
 |
 |        <p>Update a document.</p>
 |        <p>Update a document by running a script or passing a partial document.</p>
 |        <p>If the Elasticsearch security features are enabled, you must have the <code>index</code> or <code>write</code> index privilege for the target index or index alias.</p>
 |        <p>The script can update, delete, or skip modifying the document.
 |        The API also supports passing a partial document, which is merged into the existing document.
 |        To fully replace an existing document, use the index API.
 |        This operation:</p>
 |        <ul>
 |        <li>Gets the document (collocated with the shard) from the index.</li>
 |        <li>Runs the specified script.</li>
 |        <li>Indexes the result.</li>
 |        </ul>
 |        <p>The document must still be reindexed, but using this API removes some network roundtrips and reduces chances of version conflicts between the GET and the index operation.</p>
 |        <p>The <code>_source</code> field must be enabled to use this API.
 |        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).
 |        For usage examples such as partial updates, upserts, and scripted updates, see the External documentation.</p>
 |
 |
 |      `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-update>`_
 |
 |      :param index: The name of the target index. By default, the index is created
 |          automatically if it doesn't exist.
 |      :param id: A unique identifier for the document to be updated.
 |      :param detect_noop: If `true`, the `result` in the response is set to `noop`
 |          (no operation) when there are no changes to the document.
 |      :param doc: A partial update to an existing document. If both `doc` and `script`
 |          are specified, `doc` is ignored.
 |      :param doc_as_upsert: If `true`, use the contents of 'doc' as the value of 'upsert'.
 |          NOTE: Using ingest pipelines with `doc_as_upsert` is not supported.
 |      :param if_primary_term: Only perform the operation if the document has this primary
 |          term.
 |      :param if_seq_no: Only perform the operation if the document has this sequence
 |          number.
 |      :param include_source_on_error: True or false if to include the document source
 |          in the error message in case of parsing errors.
 |      :param lang: The script language.
 |      :param refresh: If 'true', Elasticsearch refreshes the affected shards to make
 |          this operation visible to search. If 'wait_for', it waits for a refresh to
 |          make this operation visible to search. If 'false', it does nothing with refreshes.
 |      :param require_alias: If `true`, the destination must be an index alias.
 |      :param retry_on_conflict: The number of times the operation should be retried
 |          when a conflict occurs.
 |      :param routing: A custom value used to route operations to a specific shard.
 |      :param script: The script to run to update the document.
 |      :param scripted_upsert: If `true`, run the script whether or not the document
 |          exists.
 |      :param source: If `false`, turn off source retrieval. You can also specify a
 |          comma-separated list of the fields you want to retrieve.
 |      :param source_excludes: The source fields you want to exclude.
 |      :param source_includes: The source fields you want to retrieve.
 |      :param timeout: The period to wait for the following operations: dynamic mapping
 |          updates and waiting for active shards. Elasticsearch waits for at least the
 |          timeout period before failing. The actual wait time could be longer, particularly
 |          when multiple waits occur.
 |      :param upsert: If the document does not already exist, the contents of 'upsert'
 |          are inserted as a new document. If the document exists, the 'script' is run.
 |      :param wait_for_active_shards: The number of copies of each shard that must be
 |          active before proceeding with the operation. Set to 'all' or any positive
 |          integer up to the total number of shards in the index (`number_of_replicas`+1).
 |          The default value of `1` means it waits for each primary shard to be active.
 |
 |  update_by_query(self, *, index: Union[str, Sequence[str]], allow_no_indices: Optional[bool] = None, analyze_wildcard: Optional[bool] = None, analyzer: Optional[str] = None, conflicts: Union[str, Literal['abort', 'proceed'], NoneType] = None, default_operator: Union[str, Literal['and', 'or'], NoneType] = None, df: Optional[str] = None, error_trace: Optional[bool] = None, expand_wildcards: Union[Sequence[Union[str, Literal['all', 'closed', 'hidden', 'none', 'open']]], str, Literal['all', 'closed', 'hidden', 'none', 'open'], NoneType] = None, filter_path: Union[str, Sequence[str], NoneType] = None, from_: Optional[int] = None, human: Optional[bool] = None, ignore_unavailable: Optional[bool] = None, lenient: Optional[bool] = None, max_docs: Optional[int] = None, pipeline: Optional[str] = None, preference: Optional[str] = None, pretty: Optional[bool] = None, q: Optional[str] = None, query: Optional[Mapping[str, Any]] = None, refresh: Optional[bool] = None, request_cache: Optional[bool] = None, requests_per_second: Optional[float] = None, routing: Union[str, Sequence[str], NoneType] = None, script: Optional[Mapping[str, Any]] = None, scroll: Union[str, Literal[-1], Literal[0], NoneType] = None, scroll_size: Optional[int] = None, search_timeout: Union[str, Literal[-1], Literal[0], NoneType] = None, search_type: Union[str, Literal['dfs_query_then_fetch', 'query_then_fetch'], NoneType] = None, slice: Optional[Mapping[str, Any]] = None, slices: Union[int, str, Literal['auto'], NoneType] = None, sort: Optional[Sequence[str]] = None, stats: Optional[Sequence[str]] = None, terminate_after: Optional[int] = None, timeout: Union[str, Literal[-1], Literal[0], NoneType] = None, version: Optional[bool] = None, version_type: Optional[bool] = None, wait_for_active_shards: Union[int, str, Literal['all', 'index-setting'], NoneType] = None, wait_for_completion: Optional[bool] = None, body: Optional[Dict[str, Any]] = None) -> elastic_transport.ObjectApiResponse[typing.Any]
 |      .. raw:: html
 |
 |        <p>Update documents.</p>
 |        <p>Updates documents that match the specified query.
 |        If no query is specified, performs an update on every document in the data stream or index without modifying the source, which is useful for picking up mapping changes.</p>
 |        <p>If the Elasticsearch security features are enabled, you must have the following index privileges for the target data stream, index, or alias:</p>
 |        <ul>
 |        <li><code>read</code></li>
 |        <li><code>index</code> or <code>write</code></li>
 |        </ul>
 |        <p>You can specify the query criteria in the request URI or the request body using the same syntax as the search API.</p>
 |        <p>When you submit an update by query request, Elasticsearch gets a snapshot of the data stream or index when it begins processing the request and updates matching documents using internal versioning.
 |        When the versions match, the document is updated and the version number is incremented.
 |        If a document changes between the time that the snapshot is taken and the update operation is processed, it results in a version conflict and the operation fails.
 |        You can opt to count version conflicts instead of halting and returning by setting <code>conflicts</code> to <code>proceed</code>.
 |        Note that if you opt to count version conflicts, the operation could attempt to update more documents from the source than <code>max_docs</code> until it has successfully updated <code>max_docs</code> documents or it has gone through every document in the source query.</p>
 |        <p>NOTE: Documents with a version equal to 0 cannot be updated using update by query because internal versioning does not support 0 as a valid version number.</p>
 |        <p>While processing an update by query request, Elasticsearch performs multiple search requests sequentially to find all of the matching documents.
 |        A bulk update request is performed for each batch of matching documents.
 |        Any query or update failures cause the update by query request to fail and the failures are shown in the response.
 |        Any update requests that completed successfully still stick, they are not rolled back.</p>
 |        <p><strong>Refreshing shards</strong></p>
 |        <p>Specifying the <code>refresh</code> parameter refreshes all shards once the request completes.
 |        This is different to the update API's <code>refresh</code> parameter, which causes only the shard
 |        that received the request to be refreshed. Unlike the update API, it does not support
 |        <code>wait_for</code>.</p>
 |        <p><strong>Running update by query asynchronously</strong></p>
 |        <p>If the request contains <code>wait_for_completion=false</code>, Elasticsearch
 |        performs some preflight checks, launches the request, and returns a
 |        <a href="https://www.elastic.co/docs/api/doc/elasticsearch/group/endpoint-tasks">task</a> you can use to cancel or get the status of the task.
 |        Elasticsearch creates a record of this task as a document at <code>.tasks/task/${taskId}</code>.</p>
 |        <p><strong>Waiting for active shards</strong></p>
 |        <p><code>wait_for_active_shards</code> controls how many copies of a shard must be active
 |        before proceeding with the request. See <a href="https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-create#operation-create-wait_for_active_shards"><code>wait_for_active_shards</code></a>
 |        for details. <code>timeout</code> controls how long each write request waits for unavailable
 |        shards to become available. Both work exactly the way they work in the
 |        <a href="https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-bulk">Bulk API</a>. Update by query uses scrolled searches, so you can also
 |        specify the <code>scroll</code> parameter to control how long it keeps the search context
 |        alive, for example <code>?scroll=10m</code>. The default is 5 minutes.</p>
 |        <p><strong>Throttling update requests</strong></p>
 |        <p>To control the rate at which update by query issues batches of update operations, you can set <code>requests_per_second</code> to any positive decimal number.
 |        This pads each batch with a wait time to throttle the rate.
 |        Set <code>requests_per_second</code> to <code>-1</code> to turn off throttling.</p>
 |        <p>Throttling uses a wait time between batches so that the internal scroll requests can be given a timeout that takes the request padding into account.
 |        The padding time is the difference between the batch size divided by the <code>requests_per_second</code> and the time spent writing.
 |        By default the batch size is 1000, so if <code>requests_per_second</code> is set to <code>500</code>:</p>
 |        <pre><code>target_time = 1000 / 500 per second = 2 seconds
 |        wait_time = target_time - write_time = 2 seconds - .5 seconds = 1.5 seconds
 |        </code></pre>
 |        <p>Since the batch is issued as a single _bulk request, large batch sizes cause Elasticsearch to create many requests and wait before starting the next set.
 |        This is &quot;bursty&quot; instead of &quot;smooth&quot;.</p>
 |        <p><strong>Slicing</strong></p>
 |        <p>Update by query supports sliced scroll to parallelize the update process.
 |        This can improve efficiency and provide a convenient way to break the request down into smaller parts.</p>
 |        <p>Setting <code>slices</code> to <code>auto</code> chooses a reasonable number for most data streams and indices.
 |        This setting will use one slice per shard, up to a certain limit.
 |        If there are multiple source data streams or indices, it will choose the number of slices based on the index or backing index with the smallest number of shards.</p>
 |        <p>Adding <code>slices</code> to <code>_update_by_query</code> just automates the manual process of creating sub-requests, which means it has some quirks:</p>
 |        <ul>
 |        <li>You can see these requests in the tasks APIs. These sub-requests are &quot;child&quot; tasks of the task for the request with slices.</li>
 |        <li>Fetching the status of the task for the request with <code>slices</code> only contains the status of completed slices.</li>
 |        <li>These sub-requests are individually addressable for things like cancellation and rethrottling.</li>
 |        <li>Rethrottling the request with <code>slices</code> will rethrottle the unfinished sub-request proportionally.</li>
 |        <li>Canceling the request with slices will cancel each sub-request.</li>
 |        <li>Due to the nature of slices each sub-request won't get a perfectly even portion of the documents. All documents will be addressed, but some slices may be larger than others. Expect larger slices to have a more even distribution.</li>
 |        <li>Parameters like <code>requests_per_second</code> and <code>max_docs</code> on a request with slices are distributed proportionally to each sub-request. Combine that with the point above about distribution being uneven and you should conclude that using <code>max_docs</code> with <code>slices</code> might not result in exactly <code>max_docs</code> documents being updated.</li>
 |        <li>Each sub-request gets a slightly different snapshot of the source data stream or index though these are all taken at approximately the same time.</li>
 |        </ul>
 |        <p>If you're slicing manually or otherwise tuning automatic slicing, keep in mind that:</p>
 |        <ul>
 |        <li>Query performance is most efficient when the number of slices is equal to the number of shards in the index or backing index. If that number is large (for example, 500), choose a lower number as too many slices hurts performance. Setting slices higher than the number of shards generally does not improve efficiency and adds overhead.</li>
 |        <li>Update performance scales linearly across available resources with the number of slices.</li>
 |        </ul>
 |        <p>Whether query or update performance dominates the runtime depends on the documents being reindexed and cluster resources.
 |        Refer to the linked documentation for examples of how to update documents using the <code>_update_by_query</code> API:</p>
 |
 |
 |      `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-update-by-query>`_
 |
 |      :param index: A comma-separated list of data streams, indices, and aliases to
 |          search. It supports wildcards (`*`). To search all data streams or indices,
 |          omit this parameter or use `*` or `_all`.
 |      :param allow_no_indices: A setting that does two separate checks on the index
 |          expression. If `false`, the request returns an error (1) if any wildcard
 |          expression (including `_all` and `*`) resolves to zero matching indices or
 |          (2) if the complete set of resolved indices, aliases or data streams is empty
 |          after all expressions are evaluated. If `true`, index expressions that resolve
 |          to no indices are allowed and the request returns an empty result.
 |      :param analyze_wildcard: If `true`, wildcard and prefix queries are analyzed.
 |          This parameter can be used only when the `q` query string parameter is specified.
 |      :param analyzer: The analyzer to use for the query string. This parameter can
 |          be used only when the `q` query string parameter is specified.
 |      :param conflicts: The preferred behavior when update by query hits version conflicts:
 |          `abort` or `proceed`.
 |      :param default_operator: The default operator for query string query: `and` or
 |          `or`. This parameter can be used only when the `q` query string parameter
 |          is specified.
 |      :param df: The field to use as default where no field prefix is given in the
 |          query string. This parameter can be used only when the `q` query string parameter
 |          is specified.
 |      :param expand_wildcards: The type of index that wildcard patterns can match.
 |          If the request can target data streams, this argument determines whether
 |          wildcard expressions match hidden data streams. It supports comma-separated
 |          values, such as `open,hidden`.
 |      :param from_: Skips the specified number of documents.
 |      :param ignore_unavailable: If `false`, the request returns an error if it targets
 |          a concrete (non-wildcarded) index, alias, or data stream that is missing,
 |          closed, or otherwise unavailable. If `true`, unavailable concrete targets
 |          are silently ignored.
 |      :param lenient: If `true`, format-based query failures (such as providing text
 |          to a numeric field) in the query string will be ignored. This parameter can
 |          be used only when the `q` query string parameter is specified.
 |      :param max_docs: The maximum number of documents to update.
 |      :param pipeline: The ID of the pipeline to use to preprocess incoming documents.
 |          If the index has a default ingest pipeline specified, then setting the value
 |          to `_none` disables the default ingest pipeline for this request. If a final
 |          pipeline is configured it will always run, regardless of the value of this
 |          parameter.
 |      :param preference: The node or shard the operation should be performed on. It
 |          is random by default.
 |      :param q: A query in the Lucene query string syntax.
 |      :param query: The documents to update using the Query DSL.
 |      :param refresh: If `true`, Elasticsearch refreshes affected shards to make the
 |          operation visible to search after the request completes. This is different
 |          than the update API's `refresh` parameter, which causes just the shard that
 |          received the request to be refreshed.
 |      :param request_cache: If `true`, the request cache is used for this request.
 |          It defaults to the index-level setting.
 |      :param requests_per_second: The throttle for this request in sub-requests per
 |          second.
 |      :param routing: A custom value used to route operations to a specific shard.
 |      :param script: The script to run to update the document source or metadata when
 |          updating.
 |      :param scroll: The period to retain the search context for scrolling.
 |      :param scroll_size: The size of the scroll request that powers the operation.
 |      :param search_timeout: An explicit timeout for each search request. By default,
 |          there is no timeout.
 |      :param search_type: The type of the search operation. Available options include
 |          `query_then_fetch` and `dfs_query_then_fetch`.
 |      :param slice: Slice the request manually using the provided slice ID and total
 |          number of slices.
 |      :param slices: The number of slices this task should be divided into.
 |      :param sort: A comma-separated list of <field>:<direction> pairs.
 |      :param stats: The specific `tag` of the request for logging and statistical purposes.
 |      :param terminate_after: The maximum number of documents to collect for each shard.
 |          If a query reaches this limit, Elasticsearch terminates the query early.
 |          Elasticsearch collects documents before sorting. IMPORTANT: Use with caution.
 |          Elasticsearch applies this parameter to each shard handling the request.
 |          When possible, let Elasticsearch perform early termination automatically.
 |          Avoid specifying this parameter for requests that target data streams with
 |          backing indices across multiple data tiers.
 |      :param timeout: The period each update request waits for the following operations:
 |          dynamic mapping updates, waiting for active shards. By default, it is one
 |          minute. This guarantees Elasticsearch waits for at least the timeout before
 |          failing. The actual wait time could be longer, particularly when multiple
 |          waits occur.
 |      :param version: If `true`, returns the document version as part of a hit.
 |      :param version_type: Should the document increment the version number (internal)
 |          on hit or not (reindex)
 |      :param wait_for_active_shards: The number of shard copies that must be active
 |          before proceeding with the operation. Set to `all` or any positive integer
 |          up to the total number of shards in the index (`number_of_replicas+1`). The
 |          `timeout` parameter controls how long each write request waits for unavailable
 |          shards to become available. Both work exactly the way they work in the bulk
 |          API.
 |      :param wait_for_completion: If `true`, the request blocks until the operation
 |          is complete. If `false`, Elasticsearch performs some preflight checks, launches
 |          the request, and returns a task ID that you can use to cancel or get the
 |          status of the task. Elasticsearch creates a record of this task as a document
 |          at `.tasks/task/${taskId}`.
 |
 |  update_by_query_rethrottle(self, *, task_id: str, requests_per_second: float, error_trace: Optional[bool] = None, filter_path: Union[str, Sequence[str], NoneType] = None, human: Optional[bool] = None, pretty: Optional[bool] = None) -> elastic_transport.ObjectApiResponse[typing.Any]
 |      .. raw:: html
 |
 |        <p>Throttle an update by query operation.</p>
 |        <p>Change the number of requests per second for a particular update by query operation.
 |        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>
 |
 |
 |      `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-update-by-query-rethrottle>`_
 |
 |      :param task_id: The ID for the task.
 |      :param requests_per_second: The throttle for this request in sub-requests per
 |          second. To turn off throttling, set it to `-1`.
 |
 |  ----------------------------------------------------------------------
 |  Methods inherited from elasticsearch._async.client._base.BaseClient:
 |
 |  async perform_request(self, method: str, path: str, *, params: Optional[Mapping[str, Any]] = None, headers: Optional[Mapping[str, str]] = None, body: Optional[Any] = None, endpoint_id: Optional[str] = None, path_parts: Optional[Mapping[str, Any]] = None) -> elastic_transport.ApiResponse[typing.Any]
 |
 |  ----------------------------------------------------------------------
 |  Readonly properties inherited from elasticsearch._async.client._base.BaseClient:
 |
 |  transport
 |
 |  ----------------------------------------------------------------------
 |  Data descriptors inherited from elasticsearch._async.client._base.BaseClient:
 |
 |  __dict__
 |      dictionary for instance variables
 |
 |  __weakref__
 |      list of weak references to the object
elasticsearch.AuthenticationException
Python Library Documentation: class AuthenticationException in module elasticsearch

class AuthenticationException(ApiError)
 |  AuthenticationException(message: str, meta: elastic_transport.ApiResponseMeta, body: Any, errors: Tuple[Exception, ...] = ())
 |
 |  Exception representing a 401 status code.
 |
 |  Method resolution order:
 |      AuthenticationException
 |      ApiError
 |      elastic_transport.ApiError
 |      builtins.Exception
 |      builtins.BaseException
 |      builtins.object
 |
 |  Methods inherited from ApiError:
 |
 |  __str__(self) -> str
 |      Return str(self).
 |
 |  ----------------------------------------------------------------------
 |  Readonly properties inherited from ApiError:
 |
 |  error
 |      Backwards-compatible way to access ``self.message``
 |
 |  info
 |      Backwards-compatible way to access ``self.body``
 |
 |  status_code
 |      Backwards-compatible way to access ``self.meta.status``
 |
 |  ----------------------------------------------------------------------
 |  Methods inherited from elastic_transport.ApiError:
 |
 |  __init__(self, message: str, meta: elastic_transport.ApiResponseMeta, body: Any, errors: Tuple[Exception, ...] = ())
 |      Initialize self.  See help(type(self)) for accurate signature.
 |
 |  __repr__(self) -> str
 |      Return repr(self).
 |
 |  ----------------------------------------------------------------------
 |  Data descriptors inherited from elastic_transport.ApiError:
 |
 |  __weakref__
 |      list of weak references to the object
 |
 |  ----------------------------------------------------------------------
 |  Static methods inherited from builtins.Exception:
 |
 |  __new__(*args, **kwargs) class method of builtins.Exception
 |      Create and return a new object.  See help(type) for accurate signature.
 |
 |  ----------------------------------------------------------------------
 |  Methods inherited from builtins.BaseException:
 |
 |  __getattribute__(self, name, /)
 |      Return getattr(self, name).
 |
 |  __reduce__(...)
 |      Helper for pickle.
 |
 |  __setstate__(...)
 |
 |  add_note(...)
 |      Exception.add_note(note) --
 |      add a note to the exception
 |
 |  with_traceback(...)
 |      Exception.with_traceback(tb) --
 |      set self.__traceback__ to tb and return self.
 |
 |  ----------------------------------------------------------------------
 |  Data descriptors inherited from builtins.BaseException:
 |
 |  __cause__
 |      exception cause
 |
 |  __context__
 |      exception context
 |
 |  __dict__
 |
 |  __suppress_context__
 |
 |  __traceback__
 |
 |  args
elasticsearch.AuthorizationException
Python Library Documentation: class AuthorizationException in module elasticsearch

class AuthorizationException(ApiError)
 |  AuthorizationException(message: str, meta: elastic_transport.ApiResponseMeta, body: Any, errors: Tuple[Exception, ...] = ())
 |
 |  Exception representing a 403 status code.
 |
 |  Method resolution order:
 |      AuthorizationException
 |      ApiError
 |      elastic_transport.ApiError
 |      builtins.Exception
 |      builtins.BaseException
 |      builtins.object
 |
 |  Methods inherited from ApiError:
 |
 |  __str__(self) -> str
 |      Return str(self).
 |
 |  ----------------------------------------------------------------------
 |  Readonly properties inherited from ApiError:
 |
 |  error
 |      Backwards-compatible way to access ``self.message``
 |
 |  info
 |      Backwards-compatible way to access ``self.body``
 |
 |  status_code
 |      Backwards-compatible way to access ``self.meta.status``
 |
 |  ----------------------------------------------------------------------
 |  Methods inherited from elastic_transport.ApiError:
 |
 |  __init__(self, message: str, meta: elastic_transport.ApiResponseMeta, body: Any, errors: Tuple[Exception, ...] = ())
 |      Initialize self.  See help(type(self)) for accurate signature.
 |
 |  __repr__(self) -> str
 |      Return repr(self).
 |
 |  ----------------------------------------------------------------------
 |  Data descriptors inherited from elastic_transport.ApiError:
 |
 |  __weakref__
 |      list of weak references to the object
 |
 |  ----------------------------------------------------------------------
 |  Static methods inherited from builtins.Exception:
 |
 |  __new__(*args, **kwargs) class method of builtins.Exception
 |      Create and return a new object.  See help(type) for accurate signature.
 |
 |  ----------------------------------------------------------------------
 |  Methods inherited from builtins.BaseException:
 |
 |  __getattribute__(self, name, /)
 |      Return getattr(self, name).
 |
 |  __reduce__(...)
 |      Helper for pickle.
 |
 |  __setstate__(...)
 |
 |  add_note(...)
 |      Exception.add_note(note) --
 |      add a note to the exception
 |
 |  with_traceback(...)
 |      Exception.with_traceback(tb) --
 |      set self.__traceback__ to tb and return self.
 |
 |  ----------------------------------------------------------------------
 |  Data descriptors inherited from builtins.BaseException:
 |
 |  __cause__
 |      exception cause
 |
 |  __context__
 |      exception context
 |
 |  __dict__
 |
 |  __suppress_context__
 |
 |  __traceback__
 |
 |  args
elasticsearch.BadRequestError
Python Library Documentation: class BadRequestError in module elasticsearch

class BadRequestError(ApiError)
 |  BadRequestError(message: str, meta: elastic_transport.ApiResponseMeta, body: Any, errors: Tuple[Exception, ...] = ())
 |
 |  Exception representing a 400 status code.
 |
 |  Method resolution order:
 |      BadRequestError
 |      ApiError
 |      elastic_transport.ApiError
 |      builtins.Exception
 |      builtins.BaseException
 |      builtins.object
 |
 |  Methods inherited from ApiError:
 |
 |  __str__(self) -> str
 |      Return str(self).
 |
 |  ----------------------------------------------------------------------
 |  Readonly properties inherited from ApiError:
 |
 |  error
 |      Backwards-compatible way to access ``self.message``
 |
 |  info
 |      Backwards-compatible way to access ``self.body``
 |
 |  status_code
 |      Backwards-compatible way to access ``self.meta.status``
 |
 |  ----------------------------------------------------------------------
 |  Methods inherited from elastic_transport.ApiError:
 |
 |  __init__(self, message: str, meta: elastic_transport.ApiResponseMeta, body: Any, errors: Tuple[Exception, ...] = ())
 |      Initialize self.  See help(type(self)) for accurate signature.
 |
 |  __repr__(self) -> str
 |      Return repr(self).
 |
 |  ----------------------------------------------------------------------
 |  Data descriptors inherited from elastic_transport.ApiError:
 |
 |  __weakref__
 |      list of weak references to the object
 |
 |  ----------------------------------------------------------------------
 |  Static methods inherited from builtins.Exception:
 |
 |  __new__(*args, **kwargs) class method of builtins.Exception
 |      Create and return a new object.  See help(type) for accurate signature.
 |
 |  ----------------------------------------------------------------------
 |  Methods inherited from builtins.BaseException:
 |
 |  __getattribute__(self, name, /)
 |      Return getattr(self, name).
 |
 |  __reduce__(...)
 |      Helper for pickle.
 |
 |  __setstate__(...)
 |
 |  add_note(...)
 |      Exception.add_note(note) --
 |      add a note to the exception
 |
 |  with_traceback(...)
 |      Exception.with_traceback(tb) --
 |      set self.__traceback__ to tb and return self.
 |
 |  ----------------------------------------------------------------------
 |  Data descriptors inherited from builtins.BaseException:
 |
 |  __cause__
 |      exception cause
 |
 |  __context__
 |      exception context
 |
 |  __dict__
 |
 |  __suppress_context__
 |
 |  __traceback__
 |
 |  args
elasticsearch.ConflictError
Python Library Documentation: class ConflictError in module elasticsearch

class ConflictError(ApiError)
 |  ConflictError(message: str, meta: elastic_transport.ApiResponseMeta, body: Any, errors: Tuple[Exception, ...] = ())
 |
 |  Exception representing a 409 status code.
 |
 |  Method resolution order:
 |      ConflictError
 |      ApiError
 |      elastic_transport.ApiError
 |      builtins.Exception
 |      builtins.BaseException
 |      builtins.object
 |
 |  Methods inherited from ApiError:
 |
 |  __str__(self) -> str
 |      Return str(self).
 |
 |  ----------------------------------------------------------------------
 |  Readonly properties inherited from ApiError:
 |
 |  error
 |      Backwards-compatible way to access ``self.message``
 |
 |  info
 |      Backwards-compatible way to access ``self.body``
 |
 |  status_code
 |      Backwards-compatible way to access ``self.meta.status``
 |
 |  ----------------------------------------------------------------------
 |  Methods inherited from elastic_transport.ApiError:
 |
 |  __init__(self, message: str, meta: elastic_transport.ApiResponseMeta, body: Any, errors: Tuple[Exception, ...] = ())
 |      Initialize self.  See help(type(self)) for accurate signature.
 |
 |  __repr__(self) -> str
 |      Return repr(self).
 |
 |  ----------------------------------------------------------------------
 |  Data descriptors inherited from elastic_transport.ApiError:
 |
 |  __weakref__
 |      list of weak references to the object
 |
 |  ----------------------------------------------------------------------
 |  Static methods inherited from builtins.Exception:
 |
 |  __new__(*args, **kwargs) class method of builtins.Exception
 |      Create and return a new object.  See help(type) for accurate signature.
 |
 |  ----------------------------------------------------------------------
 |  Methods inherited from builtins.BaseException:
 |
 |  __getattribute__(self, name, /)
 |      Return getattr(self, name).
 |
 |  __reduce__(...)
 |      Helper for pickle.
 |
 |  __setstate__(...)
 |
 |  add_note(...)
 |      Exception.add_note(note) --
 |      add a note to the exception
 |
 |  with_traceback(...)
 |      Exception.with_traceback(tb) --
 |      set self.__traceback__ to tb and return self.
 |
 |  ----------------------------------------------------------------------
 |  Data descriptors inherited from builtins.BaseException:
 |
 |  __cause__
 |      exception cause
 |
 |  __context__
 |      exception context
 |
 |  __dict__
 |
 |  __suppress_context__
 |
 |  __traceback__
 |
 |  args
elasticsearch.ConnectionError
Python Library Documentation: class ConnectionError in module elastic_transport

class ConnectionError(TransportError)
 |  ConnectionError(message: Any, errors: Tuple[Exception, ...] = ())
 |
 |  Error raised by the HTTP connection
 |
 |  Method resolution order:
 |      ConnectionError
 |      TransportError
 |      builtins.Exception
 |      builtins.BaseException
 |      builtins.object
 |
 |  Methods defined here:
 |
 |  __str__(self) -> str
 |      Return str(self).
 |
 |  ----------------------------------------------------------------------
 |  Methods inherited from TransportError:
 |
 |  __init__(self, message: Any, errors: Tuple[Exception, ...] = ())
 |      Initialize self.  See help(type(self)) for accurate signature.
 |
 |  __repr__(self) -> str
 |      Return repr(self).
 |
 |  ----------------------------------------------------------------------
 |  Data descriptors inherited from TransportError:
 |
 |  __weakref__
 |      list of weak references to the object
 |
 |  ----------------------------------------------------------------------
 |  Static methods inherited from builtins.Exception:
 |
 |  __new__(*args, **kwargs) class method of builtins.Exception
 |      Create and return a new object.  See help(type) for accurate signature.
 |
 |  ----------------------------------------------------------------------
 |  Methods inherited from builtins.BaseException:
 |
 |  __getattribute__(self, name, /)
 |      Return getattr(self, name).
 |
 |  __reduce__(...)
 |      Helper for pickle.
 |
 |  __setstate__(...)
 |
 |  add_note(...)
 |      Exception.add_note(note) --
 |      add a note to the exception
 |
 |  with_traceback(...)
 |      Exception.with_traceback(tb) --
 |      set self.__traceback__ to tb and return self.
 |
 |  ----------------------------------------------------------------------
 |  Data descriptors inherited from builtins.BaseException:
 |
 |  __cause__
 |      exception cause
 |
 |  __context__
 |      exception context
 |
 |  __dict__
 |
 |  __suppress_context__
 |
 |  __traceback__
 |
 |  args
elasticsearch.ConnectionTimeout
Python Library Documentation: class ConnectionTimeout in module elastic_transport

class ConnectionTimeout(TransportError)
 |  ConnectionTimeout(message: Any, errors: Tuple[Exception, ...] = ())
 |
 |  Connection timed out during an operation
 |
 |  Method resolution order:
 |      ConnectionTimeout
 |      TransportError
 |      builtins.Exception
 |      builtins.BaseException
 |      builtins.object
 |
 |  Methods defined here:
 |
 |  __str__(self) -> str
 |      Return str(self).
 |
 |  ----------------------------------------------------------------------
 |  Methods inherited from TransportError:
 |
 |  __init__(self, message: Any, errors: Tuple[Exception, ...] = ())
 |      Initialize self.  See help(type(self)) for accurate signature.
 |
 |  __repr__(self) -> str
 |      Return repr(self).
 |
 |  ----------------------------------------------------------------------
 |  Data descriptors inherited from TransportError:
 |
 |  __weakref__
 |      list of weak references to the object
 |
 |  ----------------------------------------------------------------------
 |  Static methods inherited from builtins.Exception:
 |
 |  __new__(*args, **kwargs) class method of builtins.Exception
 |      Create and return a new object.  See help(type) for accurate signature.
 |
 |  ----------------------------------------------------------------------
 |  Methods inherited from builtins.BaseException:
 |
 |  __getattribute__(self, name, /)
 |      Return getattr(self, name).
 |
 |  __reduce__(...)
 |      Helper for pickle.
 |
 |  __setstate__(...)
 |
 |  add_note(...)
 |      Exception.add_note(note) --
 |      add a note to the exception
 |
 |  with_traceback(...)
 |      Exception.with_traceback(tb) --
 |      set self.__traceback__ to tb and return self.
 |
 |  ----------------------------------------------------------------------
 |  Data descriptors inherited from builtins.BaseException:
 |
 |  __cause__
 |      exception cause
 |
 |  __context__
 |      exception context
 |
 |  __dict__
 |
 |  __suppress_context__
 |
 |  __traceback__
 |
 |  args
elasticsearch.Elasticsearch
Python Library Documentation: class Elasticsearch in module elasticsearch

class Elasticsearch(elasticsearch._sync.client._base.BaseClient)
 |  Elasticsearch(hosts: Union[str, Sequence[Union[str, Mapping[str, Union[str, int]], elastic_transport.NodeConfig]], NoneType] = None, *, cloud_id: Optional[str] = None, api_key: Union[str, Tuple[str, str], NoneType] = None, basic_auth: Union[str, Tuple[str, str], NoneType] = None, bearer_auth: Optional[str] = None, opaque_id: Optional[str] = None, server_mode: str = 'stack', headers: Union[elastic_transport.client_utils.DefaultType, Mapping[str, str]] = <DEFAULT>, connections_per_node: Union[elastic_transport.client_utils.DefaultType, int] = <DEFAULT>, http_compress: Union[elastic_transport.client_utils.DefaultType, bool] = <DEFAULT>, verify_certs: Union[elastic_transport.client_utils.DefaultType, bool] = <DEFAULT>, ca_certs: Union[elastic_transport.client_utils.DefaultType, str] = <DEFAULT>, client_cert: Union[elastic_transport.client_utils.DefaultType, str] = <DEFAULT>, client_key: Union[elastic_transport.client_utils.DefaultType, str] = <DEFAULT>, ssl_assert_hostname: Union[elastic_transport.client_utils.DefaultType, str] = <DEFAULT>, ssl_assert_fingerprint: Union[elastic_transport.client_utils.DefaultType, str] = <DEFAULT>, ssl_version: Union[elastic_transport.client_utils.DefaultType, int] = <DEFAULT>, ssl_context: Union[elastic_transport.client_utils.DefaultType, Any] = <DEFAULT>, ssl_show_warn: Union[elastic_transport.client_utils.DefaultType, bool] = <DEFAULT>, transport_class: Type[elastic_transport.Transport] = <class 'elastic_transport.Transport'>, request_timeout: Union[elastic_transport.client_utils.DefaultType, NoneType, float] = <DEFAULT>, node_class: Union[elastic_transport.client_utils.DefaultType, Type[elastic_transport.BaseNode]] = <DEFAULT>, node_pool_class: Union[elastic_transport.client_utils.DefaultType, Type[elastic_transport.NodePool]] = <DEFAULT>, randomize_nodes_in_pool: Union[elastic_transport.client_utils.DefaultType, bool] = <DEFAULT>, node_selector_class: Union[elastic_transport.client_utils.DefaultType, Type[elastic_transport.NodeSelector]] = <DEFAULT>, dead_node_backoff_factor: Union[elastic_transport.client_utils.DefaultType, float] = <DEFAULT>, max_dead_node_backoff: Union[elastic_transport.client_utils.DefaultType, float] = <DEFAULT>, serializer: Optional[elastic_transport.Serializer] = None, serializers: Union[elastic_transport.client_utils.DefaultType, Mapping[str, elastic_transport.Serializer]] = <DEFAULT>, default_mimetype: str = 'application/json', max_retries: Union[elastic_transport.client_utils.DefaultType, int] = <DEFAULT>, retry_on_status: Union[elastic_transport.client_utils.DefaultType, int, Collection[int]] = <DEFAULT>, retry_on_timeout: Union[elastic_transport.client_utils.DefaultType, bool] = <DEFAULT>, retry_backoff_base: Union[elastic_transport.client_utils.DefaultType, float] = <DEFAULT>, retry_backoff_cap: Union[elastic_transport.client_utils.DefaultType, float] = <DEFAULT>, sniff_on_start: Union[elastic_transport.client_utils.DefaultType, bool] = <DEFAULT>, sniff_before_requests: Union[elastic_transport.client_utils.DefaultType, bool] = <DEFAULT>, sniff_on_node_failure: Union[elastic_transport.client_utils.DefaultType, bool] = <DEFAULT>, sniff_timeout: Union[elastic_transport.client_utils.DefaultType, NoneType, float] = <DEFAULT>, min_delay_between_sniffing: Union[elastic_transport.client_utils.DefaultType, NoneType, float] = <DEFAULT>, sniffed_node_callback: Optional[Callable[[Dict[str, Any], elastic_transport.NodeConfig], Optional[elastic_transport.NodeConfig]]] = None, meta_header: Union[elastic_transport.client_utils.DefaultType, bool] = <DEFAULT>, http_auth: Union[elastic_transport.client_utils.DefaultType, Any] = <DEFAULT>, _transport: Optional[elastic_transport.Transport] = None) -> None
 |
 |  Elasticsearch low-level client. Provides a straightforward mapping from
 |  Python to Elasticsearch REST APIs.
 |
 |  The client instance has additional attributes to update APIs in different
 |  namespaces such as ``async_search``, ``indices``, ``security``, and more:
 |
 |  .. code-block:: python
 |
 |      client = Elasticsearch("http://localhost:9200")
 |
 |      # Get Document API
 |      client.get(index="*", id="1")
 |
 |      # Get Index API
 |      client.indices.get(index="*")
 |
 |  Transport options can be set on the client constructor or using
 |  the :meth:`~elasticsearch.Elasticsearch.options` method:
 |
 |  .. code-block:: python
 |
 |      # Set 'api_key' on the constructor
 |      client = Elasticsearch(
 |          "http://localhost:9200",
 |          api_key="api_key",
 |      )
 |      client.search(...)
 |
 |      # Set 'api_key' per request
 |      client.options(api_key="api_key").search(...)
 |
 |  Method resolution order:
 |      Elasticsearch
 |      elasticsearch._sync.client._base.BaseClient
 |      builtins.object
 |
 |  Methods defined here:
 |
 |  __enter__(self) -> 'Elasticsearch'
 |
 |  __exit__(self, *_: Any) -> None
 |
 |  __init__(self, hosts: Union[str, Sequence[Union[str, Mapping[str, Union[str, int]], elastic_transport.NodeConfig]], NoneType] = None, *, cloud_id: Optional[str] = None, api_key: Union[str, Tuple[str, str], NoneType] = None, basic_auth: Union[str, Tuple[str, str], NoneType] = None, bearer_auth: Optional[str] = None, opaque_id: Optional[str] = None, server_mode: str = 'stack', headers: Union[elastic_transport.client_utils.DefaultType, Mapping[str, str]] = <DEFAULT>, connections_per_node: Union[elastic_transport.client_utils.DefaultType, int] = <DEFAULT>, http_compress: Union[elastic_transport.client_utils.DefaultType, bool] = <DEFAULT>, verify_certs: Union[elastic_transport.client_utils.DefaultType, bool] = <DEFAULT>, ca_certs: Union[elastic_transport.client_utils.DefaultType, str] = <DEFAULT>, client_cert: Union[elastic_transport.client_utils.DefaultType, str] = <DEFAULT>, client_key: Union[elastic_transport.client_utils.DefaultType, str] = <DEFAULT>, ssl_assert_hostname: Union[elastic_transport.client_utils.DefaultType, str] = <DEFAULT>, ssl_assert_fingerprint: Union[elastic_transport.client_utils.DefaultType, str] = <DEFAULT>, ssl_version: Union[elastic_transport.client_utils.DefaultType, int] = <DEFAULT>, ssl_context: Union[elastic_transport.client_utils.DefaultType, Any] = <DEFAULT>, ssl_show_warn: Union[elastic_transport.client_utils.DefaultType, bool] = <DEFAULT>, transport_class: Type[elastic_transport.Transport] = <class 'elastic_transport.Transport'>, request_timeout: Union[elastic_transport.client_utils.DefaultType, NoneType, float] = <DEFAULT>, node_class: Union[elastic_transport.client_utils.DefaultType, Type[elastic_transport.BaseNode]] = <DEFAULT>, node_pool_class: Union[elastic_transport.client_utils.DefaultType, Type[elastic_transport.NodePool]] = <DEFAULT>, randomize_nodes_in_pool: Union[elastic_transport.client_utils.DefaultType, bool] = <DEFAULT>, node_selector_class: Union[elastic_transport.client_utils.DefaultType, Type[elastic_transport.NodeSelector]] = <DEFAULT>, dead_node_backoff_factor: Union[elastic_transport.client_utils.DefaultType, float] = <DEFAULT>, max_dead_node_backoff: Union[elastic_transport.client_utils.DefaultType, float] = <DEFAULT>, serializer: Optional[elastic_transport.Serializer] = None, serializers: Union[elastic_transport.client_utils.DefaultType, Mapping[str, elastic_transport.Serializer]] = <DEFAULT>, default_mimetype: str = 'application/json', max_retries: Union[elastic_transport.client_utils.DefaultType, int] = <DEFAULT>, retry_on_status: Union[elastic_transport.client_utils.DefaultType, int, Collection[int]] = <DEFAULT>, retry_on_timeout: Union[elastic_transport.client_utils.DefaultType, bool] = <DEFAULT>, retry_backoff_base: Union[elastic_transport.client_utils.DefaultType, float] = <DEFAULT>, retry_backoff_cap: Union[elastic_transport.client_utils.DefaultType, float] = <DEFAULT>, sniff_on_start: Union[elastic_transport.client_utils.DefaultType, bool] = <DEFAULT>, sniff_before_requests: Union[elastic_transport.client_utils.DefaultType, bool] = <DEFAULT>, sniff_on_node_failure: Union[elastic_transport.client_utils.DefaultType, bool] = <DEFAULT>, sniff_timeout: Union[elastic_transport.client_utils.DefaultType, NoneType, float] = <DEFAULT>, min_delay_between_sniffing: Union[elastic_transport.client_utils.DefaultType, NoneType, float] = <DEFAULT>, sniffed_node_callback: Optional[Callable[[Dict[str, Any], elastic_transport.NodeConfig], Optional[elastic_transport.NodeConfig]]] = None, meta_header: Union[elastic_transport.client_utils.DefaultType, bool] = <DEFAULT>, http_auth: Union[elastic_transport.client_utils.DefaultType, Any] = <DEFAULT>, _transport: Optional[elastic_transport.Transport] = None) -> None
 |      Initialize self.  See help(type(self)) for accurate signature.
 |
 |  __repr__(self) -> str
 |      Return repr(self).
 |
 |  bulk(self, *, operations: Optional[Sequence[Mapping[str, Any]]] = None, body: Optional[Sequence[Mapping[str, Any]]] = None, index: Optional[str] = None, error_trace: Optional[bool] = None, filter_path: Union[str, Sequence[str], NoneType] = None, human: Optional[bool] = None, include_source_on_error: Optional[bool] = None, list_executed_pipelines: Optional[bool] = None, pipeline: Optional[str] = None, pretty: Optional[bool] = None, refresh: Union[bool, str, Literal['false', 'true', 'wait_for'], NoneType] = None, require_alias: Optional[bool] = None, require_data_stream: Optional[bool] = None, routing: Union[str, Sequence[str], NoneType] = None, source: Union[bool, str, Sequence[str], NoneType] = None, source_excludes: Union[str, Sequence[str], NoneType] = None, source_includes: Union[str, Sequence[str], NoneType] = None, timeout: Union[str, Literal[-1], Literal[0], NoneType] = None, wait_for_active_shards: Union[int, str, Literal['all', 'index-setting'], NoneType] = None) -> elastic_transport.ObjectApiResponse[typing.Any]
 |      .. raw:: html
 |
 |        <p>Bulk index or delete documents.</p>
 |        <p>Perform multiple <code>index</code>, <code>create</code>, <code>delete</code>, and <code>update</code> actions in a single request.
 |        This reduces overhead and can greatly increase indexing speed.</p>
 |        <p>If the Elasticsearch security features are enabled, you must have the following index privileges for the target data stream, index, or index alias:</p>
 |        <ul>
 |        <li>To use the <code>create</code> action, you must have the <code>create_doc</code>, <code>create</code>, <code>index</code>, or <code>write</code> index privilege. Data streams support only the <code>create</code> action.</li>
 |        <li>To use the <code>index</code> action, you must have the <code>create</code>, <code>index</code>, or <code>write</code> index privilege.</li>
 |        <li>To use the <code>delete</code> action, you must have the <code>delete</code> or <code>write</code> index privilege.</li>
 |        <li>To use the <code>update</code> action, you must have the <code>index</code> or <code>write</code> index privilege.</li>
 |        <li>To automatically create a data stream or index with a bulk API request, you must have the <code>auto_configure</code>, <code>create_index</code>, or <code>manage</code> index privilege.</li>
 |        <li>To make the result of a bulk operation visible to search using the <code>refresh</code> parameter, you must have the <code>maintenance</code> or <code>manage</code> index privilege.</li>
 |        </ul>
 |        <p>Automatic data stream creation requires a matching index template with data stream enabled.</p>
 |        <p>The actions are specified in the request body using a newline delimited JSON (NDJSON) structure:</p>
 |        <pre><code>action_and_meta_data\n
 |        optional_source\n
 |        action_and_meta_data\n
 |        optional_source\n
 |        ....
 |        action_and_meta_data\n
 |        optional_source\n
 |        </code></pre>
 |        <p>The <code>index</code> and <code>create</code> actions expect a source on the next line and have the same semantics as the <code>op_type</code> parameter in the standard index API.
 |        A <code>create</code> action fails if a document with the same ID already exists in the target
 |        An <code>index</code> action adds or replaces a document as necessary.</p>
 |        <p>NOTE: Data streams support only the <code>create</code> action.
 |        To update or delete a document in a data stream, you must target the backing index containing the document.</p>
 |        <p>An <code>update</code> action expects that the partial doc, upsert, and script and its options are specified on the next line.</p>
 |        <p>A <code>delete</code> action does not expect a source on the next line and has the same semantics as the standard delete API.</p>
 |        <p>NOTE: The final line of data must end with a newline character (<code>\n</code>).
 |        Each newline character may be preceded by a carriage return (<code>\r</code>).
 |        When sending NDJSON data to the <code>_bulk</code> endpoint, use a <code>Content-Type</code> header of <code>application/json</code> or <code>application/x-ndjson</code>.
 |        Because this format uses literal newline characters (<code>\n</code>) as delimiters, make sure that the JSON actions and sources are not pretty printed.</p>
 |        <p>If you provide a target in the request path, it is used for any actions that don't explicitly specify an <code>_index</code> argument.</p>
 |        <p>A note on the format: the idea here is to make processing as fast as possible.
 |        As some of the actions are redirected to other shards on other nodes, only <code>action_meta_data</code> is parsed on the receiving node side.</p>
 |        <p>Client libraries using this protocol should try and strive to do something similar on the client side, and reduce buffering as much as possible.</p>
 |        <p>There is no &quot;correct&quot; number of actions to perform in a single bulk request.
 |        Experiment with different settings to find the optimal size for your particular workload.
 |        Note that Elasticsearch limits the maximum size of a HTTP request to 100mb by default so clients must ensure that no request exceeds this size.
 |        It is not possible to index a single document that exceeds the size limit, so you must pre-process any such documents into smaller pieces before sending them to Elasticsearch.
 |        For instance, split documents into pages or chapters before indexing them, or store raw binary data in a system outside Elasticsearch and replace the raw data with a link to the external system in the documents that you send to Elasticsearch.</p>
 |        <p><strong>Client suppport for bulk requests</strong></p>
 |        <p>Some of the officially supported clients provide helpers to assist with bulk requests and reindexing:</p>
 |        <ul>
 |        <li>Go: Check out <code>esutil.BulkIndexer</code></li>
 |        <li>Perl: Check out <code>Search::Elasticsearch::Client::5_0::Bulk</code> and <code>Search::Elasticsearch::Client::5_0::Scroll</code></li>
 |        <li>Python: Check out <code>elasticsearch.helpers.*</code></li>
 |        <li>JavaScript: Check out <code>client.helpers.*</code></li>
 |        <li>Java: Check out <code>co.elastic.clients.elasticsearch._helpers.bulk.BulkIngester</code></li>
 |        <li>.NET: Check out <code>BulkAllObservable</code></li>
 |        <li>PHP: Check out bulk indexing.</li>
 |        <li>Ruby: Check out <code>Elasticsearch::Helpers::BulkHelper</code></li>
 |        </ul>
 |        <p><strong>Submitting bulk requests with cURL</strong></p>
 |        <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>.
 |        The latter doesn't preserve newlines. For example:</p>
 |        <pre><code>$ cat requests
 |        { &quot;index&quot; : { &quot;_index&quot; : &quot;test&quot;, &quot;_id&quot; : &quot;1&quot; } }
 |        { &quot;field1&quot; : &quot;value1&quot; }
 |        $ curl -s -H &quot;Content-Type: application/x-ndjson&quot; -XPOST localhost:9200/_bulk --data-binary &quot;@requests&quot;; echo
 |        {&quot;took&quot;:7, &quot;errors&quot;: false, &quot;items&quot;:[{&quot;index&quot;:{&quot;_index&quot;:&quot;test&quot;,&quot;_id&quot;:&quot;1&quot;,&quot;_version&quot;:1,&quot;result&quot;:&quot;created&quot;,&quot;forced_refresh&quot;:false}}]}
 |        </code></pre>
 |        <p><strong>Optimistic concurrency control</strong></p>
 |        <p>Each <code>index</code> and <code>delete</code> action within a bulk API call may include the <code>if_seq_no</code> and <code>if_primary_term</code> parameters in their respective action and meta data lines.
 |        The <code>if_seq_no</code> and <code>if_primary_term</code> parameters control how operations are run, based on the last modification to existing documents. See Optimistic concurrency control for more details.</p>
 |        <p><strong>Versioning</strong></p>
 |        <p>Each bulk item can include the version value using the <code>version</code> field.
 |        It automatically follows the behavior of the index or delete operation based on the <code>_version</code> mapping.
 |        It also support the <code>version_type</code>.</p>
 |        <p><strong>Routing</strong></p>
 |        <p>Each bulk item can include the routing value using the <code>routing</code> field.
 |        It automatically follows the behavior of the index or delete operation based on the <code>_routing</code> mapping.</p>
 |        <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>
 |        <p><strong>Wait for active shards</strong></p>
 |        <p>When making bulk calls, you can set the <code>wait_for_active_shards</code> parameter to require a minimum number of shard copies to be active before starting to process the bulk request.</p>
 |        <p><strong>Refresh</strong></p>
 |        <p>Control when the changes made by this request are visible to search.</p>
 |        <p>NOTE: Only the shards that receive the bulk request will be affected by refresh.
 |        Imagine a <code>_bulk?refresh=wait_for</code> request with three documents in it that happen to be routed to different shards in an index with five shards.
 |        The request will only wait for those three shards to refresh.
 |        The other two shards that make up the index do not participate in the <code>_bulk</code> request at all.</p>
 |        <p>You might want to disable the refresh interval temporarily to improve indexing throughput for large bulk requests.
 |        Refer to the linked documentation for step-by-step instructions using the index settings API.</p>
 |
 |
 |      `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-bulk>`_
 |
 |      :param operations:
 |      :param index: The name of the data stream, index, or index alias to perform bulk
 |          actions on.
 |      :param include_source_on_error: True or false if to include the document source
 |          in the error message in case of parsing errors.
 |      :param list_executed_pipelines: If `true`, the response will include the ingest
 |          pipelines that were run for each index or create.
 |      :param pipeline: The pipeline identifier to use to preprocess incoming documents.
 |          If the index has a default ingest pipeline specified, setting the value to
 |          `_none` turns off the default ingest pipeline for this request. If a final
 |          pipeline is configured, it will always run regardless of the value of this
 |          parameter.
 |      :param refresh: If `true`, Elasticsearch refreshes the affected shards to make
 |          this operation visible to search. If `wait_for`, wait for a refresh to make
 |          this operation visible to search. If `false`, do nothing with refreshes.
 |          Valid values: `true`, `false`, `wait_for`.
 |      :param require_alias: If `true`, the request's actions must target an index alias.
 |      :param require_data_stream: If `true`, the request's actions must target a data
 |          stream (existing or to be created).
 |      :param routing: A custom value that is used to route operations to a specific
 |          shard.
 |      :param source: Indicates whether to return the `_source` field (`true` or `false`)
 |          or contains a list of fields to return.
 |      :param source_excludes: A comma-separated list of source fields to exclude from
 |          the response. You can also use this parameter to exclude fields from the
 |          subset specified in `_source_includes` query parameter. If the `_source`
 |          parameter is `false`, this parameter is ignored.
 |      :param source_includes: A comma-separated list of source fields to include in
 |          the response. If this parameter is specified, only these source fields are
 |          returned. You can exclude fields from this subset using the `_source_excludes`
 |          query parameter. If the `_source` parameter is `false`, this parameter is
 |          ignored.
 |      :param timeout: The period each action waits for the following operations: automatic
 |          index creation, dynamic mapping updates, and waiting for active shards. The
 |          default is `1m` (one minute), which guarantees Elasticsearch waits for at
 |          least the timeout before failing. The actual wait time could be longer, particularly
 |          when multiple waits occur.
 |      :param wait_for_active_shards: The number of shard copies that must be active
 |          before proceeding with the operation. Set to `all` or any positive integer
 |          up to the total number of shards in the index (`number_of_replicas+1`). The
 |          default is `1`, which waits for each primary shard to be active.
 |
 |  clear_scroll(self, *, error_trace: Optional[bool] = None, filter_path: Union[str, Sequence[str], NoneType] = None, human: Optional[bool] = None, pretty: Optional[bool] = None, scroll_id: Union[str, Sequence[str], NoneType] = None, body: Optional[Dict[str, Any]] = None) -> elastic_transport.ObjectApiResponse[typing.Any]
 |      .. raw:: html
 |
 |        <p>Clear a scrolling search.</p>
 |        <p>Clear the search context and results for a scrolling search.</p>
 |
 |
 |      `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation-clear-scroll>`_
 |
 |      :param scroll_id: The scroll IDs to clear. To clear all scroll IDs, use `_all`.
 |
 |  close(self) -> None
 |      Closes the Transport and all internal connections
 |
 |  close_point_in_time(self, *, id: Optional[str] = None, error_trace: Optional[bool] = None, filter_path: Union[str, Sequence[str], NoneType] = None, human: Optional[bool] = None, pretty: Optional[bool] = None, body: Optional[Dict[str, Any]] = None) -> elastic_transport.ObjectApiResponse[typing.Any]
 |      .. raw:: html
 |
 |        <p>Close a point in time.</p>
 |        <p>A point in time must be opened explicitly before being used in search requests.
 |        The <code>keep_alive</code> parameter tells Elasticsearch how long it should persist.
 |        A point in time is automatically closed when the <code>keep_alive</code> period has elapsed.
 |        However, keeping points in time has a cost; close them as soon as they are no longer required for search requests.</p>
 |
 |
 |      `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation-open-point-in-time>`_
 |
 |      :param id: The ID of the point-in-time.
 |
 |  count(self, *, index: Union[str, Sequence[str], NoneType] = None, allow_no_indices: Optional[bool] = None, analyze_wildcard: Optional[bool] = None, analyzer: Optional[str] = None, default_operator: Union[str, Literal['and', 'or'], NoneType] = None, df: Optional[str] = None, error_trace: Optional[bool] = None, expand_wildcards: Union[Sequence[Union[str, Literal['all', 'closed', 'hidden', 'none', 'open']]], str, Literal['all', 'closed', 'hidden', 'none', 'open'], NoneType] = None, filter_path: Union[str, Sequence[str], NoneType] = None, human: Optional[bool] = None, ignore_throttled: Optional[bool] = None, ignore_unavailable: Optional[bool] = None, lenient: Optional[bool] = None, min_score: Optional[float] = None, preference: Optional[str] = None, pretty: Optional[bool] = None, project_routing: Optional[str] = None, q: Optional[str] = None, query: Optional[Mapping[str, Any]] = None, routing: Union[str, Sequence[str], NoneType] = None, terminate_after: Optional[int] = None, body: Optional[Dict[str, Any]] = None) -> elastic_transport.ObjectApiResponse[typing.Any]
 |      .. raw:: html
 |
 |        <p>Count search results.</p>
 |        <p>Get the number of documents matching a query.</p>
 |        <p>The query can be provided either by using a simple query string as a parameter, or by defining Query DSL within the request body.
 |        The query is optional. When no query is provided, the API uses <code>match_all</code> to count all the documents.</p>
 |        <p>The count API supports multi-target syntax. You can run a single count API search across multiple data streams and indices.</p>
 |        <p>The operation is broadcast across all shards.
 |        For each shard ID group, a replica is chosen and the search is run against it.
 |        This means that replicas increase the scalability of the count.</p>
 |
 |
 |      `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation-count>`_
 |
 |      :param index: A comma-separated list of data streams, indices, and aliases to
 |          search. It supports wildcards (`*`). To search all data streams and indices,
 |          omit this parameter or use `*` or `_all`.
 |      :param allow_no_indices: A setting that does two separate checks on the index
 |          expression. If `false`, the request returns an error (1) if any wildcard
 |          expression (including `_all` and `*`) resolves to zero matching indices or
 |          (2) if the complete set of resolved indices, aliases or data streams is empty
 |          after all expressions are evaluated. If `true`, index expressions that resolve
 |          to no indices are allowed and the request returns an empty result.
 |      :param analyze_wildcard: If `true`, wildcard and prefix queries are analyzed.
 |          This parameter can be used only when the `q` query string parameter is specified.
 |      :param analyzer: The analyzer to use for the query string. This parameter can
 |          be used only when the `q` query string parameter is specified.
 |      :param default_operator: The default operator for query string query: `and` or
 |          `or`. This parameter can be used only when the `q` query string parameter
 |          is specified.
 |      :param df: The field to use as a default when no field prefix is given in the
 |          query string. This parameter can be used only when the `q` query string parameter
 |          is specified.
 |      :param expand_wildcards: The type of index that wildcard patterns can match.
 |          If the request can target data streams, this argument determines whether
 |          wildcard expressions match hidden data streams. It supports comma-separated
 |          values, such as `open,hidden`.
 |      :param ignore_throttled: If `true`, concrete, expanded, or aliased indices are
 |          ignored when frozen.
 |      :param ignore_unavailable: If `false`, the request returns an error if it targets
 |          a concrete (non-wildcarded) index, alias, or data stream that is missing,
 |          closed, or otherwise unavailable. If `true`, unavailable concrete targets
 |          are silently ignored.
 |      :param lenient: If `true`, format-based query failures (such as providing text
 |          to a numeric field) in the query string will be ignored. This parameter can
 |          be used only when the `q` query string parameter is specified.
 |      :param min_score: The minimum `_score` value that documents must have to be included
 |          in the result.
 |      :param preference: The node or shard the operation should be performed on. By
 |          default, it is random.
 |      :param project_routing: Specifies a subset of projects to target using project
 |          metadata tags in a subset of Lucene query syntax. Allowed Lucene queries:
 |          the _alias tag and a single value (possibly wildcarded). Examples: _alias:my-project
 |          _alias:_origin _alias:*pr* Supported in serverless only.
 |      :param q: The query in Lucene query string syntax. This parameter cannot be used
 |          with a request body.
 |      :param query: Defines the search query using Query DSL. A request body query
 |          cannot be used with the `q` query string parameter.
 |      :param routing: A custom value used to route operations to a specific shard.
 |      :param terminate_after: The maximum number of documents to collect for each shard.
 |          If a query reaches this limit, Elasticsearch terminates the query early.
 |          Elasticsearch collects documents before sorting. IMPORTANT: Use with caution.
 |          Elasticsearch applies this parameter to each shard handling the request.
 |          When possible, let Elasticsearch perform early termination automatically.
 |          Avoid specifying this parameter for requests that target data streams with
 |          backing indices across multiple data tiers.
 |
 |  create(self, *, index: str, id: str, document: Optional[Mapping[str, Any]] = None, body: Optional[Mapping[str, Any]] = None, error_trace: Optional[bool] = None, filter_path: Union[str, Sequence[str], NoneType] = None, human: Optional[bool] = None, include_source_on_error: Optional[bool] = None, pipeline: Optional[str] = None, pretty: Optional[bool] = None, refresh: Union[bool, str, Literal['false', 'true', 'wait_for'], NoneType] = None, require_alias: Optional[bool] = None, require_data_stream: Optional[bool] = None, routing: Union[str, Sequence[str], NoneType] = None, timeout: Union[str, Literal[-1], Literal[0], NoneType] = None, version: Optional[int] = None, version_type: Union[str, Literal['external', 'external_gte', 'internal'], NoneType] = None, wait_for_active_shards: Union[int, str, Literal['all', 'index-setting'], NoneType] = None) -> elastic_transport.ObjectApiResponse[typing.Any]
 |      .. raw:: html
 |
 |        <p>Create a new document in the index.</p>
 |        <p>You can index a new JSON document with the <code>/&lt;target&gt;/_doc/</code> or <code>/&lt;target&gt;/_create/&lt;_id&gt;</code> APIs
 |        Using <code>_create</code> guarantees that the document is indexed only if it does not already exist.
 |        It returns a 409 response when a document with a same ID already exists in the index.
 |        To update an existing document, you must use the <code>/&lt;target&gt;/_doc/</code> API.</p>
 |        <p>If the Elasticsearch security features are enabled, you must have the following index privileges for the target data stream, index, or index alias:</p>
 |        <ul>
 |        <li>To add a document using the <code>PUT /&lt;target&gt;/_create/&lt;_id&gt;</code> or <code>POST /&lt;target&gt;/_create/&lt;_id&gt;</code> request formats, you must have the <code>create_doc</code>, <code>create</code>, <code>index</code>, or <code>write</code> index privilege.</li>
 |        <li>To automatically create a data stream or index with this API request, you must have the <code>auto_configure</code>, <code>create_index</code>, or <code>manage</code> index privilege.</li>
 |        </ul>
 |        <p>Automatic data stream creation requires a matching index template with data stream enabled.</p>
 |        <p><strong>Automatically create data streams and indices</strong></p>
 |        <p>If the request's target doesn't exist and matches an index template with a <code>data_stream</code> definition, the index operation automatically creates the data stream.</p>
 |        <p>If the target doesn't exist and doesn't match a data stream template, the operation automatically creates the index and applies any matching index templates.</p>
 |        <p>NOTE: Elasticsearch includes several built-in index templates. To avoid naming collisions with these templates, refer to index pattern documentation.</p>
 |        <p>If no mapping exists, the index operation creates a dynamic mapping.
 |        By default, new fields and objects are automatically added to the mapping if needed.</p>
 |        <p>Automatic index creation is controlled by the <code>action.auto_create_index</code> setting.
 |        If it is <code>true</code>, any index can be created automatically.
 |        You can modify this setting to explicitly allow or block automatic creation of indices that match specified patterns or set it to <code>false</code> to turn off automatic index creation entirely.
 |        Specify a comma-separated list of patterns you want to allow or prefix each pattern with <code>+</code> or <code>-</code> to indicate whether it should be allowed or blocked.
 |        When a list is specified, the default behaviour is to disallow.</p>
 |        <p>NOTE: The <code>action.auto_create_index</code> setting affects the automatic creation of indices only.
 |        It does not affect the creation of data streams.</p>
 |        <p><strong>Routing</strong></p>
 |        <p>By default, shard placement — or routing — is controlled by using a hash of the document's ID value.
 |        For more explicit control, the value fed into the hash function used by the router can be directly specified on a per-operation basis using the <code>routing</code> parameter.</p>
 |        <p>When setting up explicit mapping, you can also use the <code>_routing</code> field to direct the index operation to extract the routing value from the document itself.
 |        This does come at the (very minimal) cost of an additional document parsing pass.
 |        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>
 |        <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>
 |        <p><strong>Distributed</strong></p>
 |        <p>The index operation is directed to the primary shard based on its route and performed on the actual node containing this shard.
 |        After the primary shard completes the operation, if needed, the update is distributed to applicable replicas.</p>
 |        <p><strong>Active shards</strong></p>
 |        <p>To improve the resiliency of writes to the system, indexing operations can be configured to wait for a certain number of active shard copies before proceeding with the operation.
 |        If the requisite number of active shard copies are not available, then the write operation must wait and retry, until either the requisite shard copies have started or a timeout occurs.
 |        By default, write operations only wait for the primary shards to be active before proceeding (that is to say <code>wait_for_active_shards</code> is <code>1</code>).
 |        This default can be overridden in the index settings dynamically by setting <code>index.write.wait_for_active_shards</code>.
 |        To alter this behavior per operation, use the <code>wait_for_active_shards request</code> parameter.</p>
 |        <p>Valid values are all or any positive integer up to the total number of configured copies per shard in the index (which is <code>number_of_replicas</code>+1).
 |        Specifying a negative value or a number greater than the number of shard copies will throw an error.</p>
 |        <p>For example, suppose you have a cluster of three nodes, A, B, and C and you create an index index with the number of replicas set to 3 (resulting in 4 shard copies, one more copy than there are nodes).
 |        If you attempt an indexing operation, by default the operation will only ensure the primary copy of each shard is available before proceeding.
 |        This means that even if B and C went down and A hosted the primary shard copies, the indexing operation would still proceed with only one copy of the data.
 |        If <code>wait_for_active_shards</code> is set on the request to <code>3</code> (and all three nodes are up), the indexing operation will require 3 active shard copies before proceeding.
 |        This requirement should be met because there are 3 active nodes in the cluster, each one holding a copy of the shard.
 |        However, if you set <code>wait_for_active_shards</code> to <code>all</code> (or to <code>4</code>, which is the same in this situation), the indexing operation will not proceed as you do not have all 4 copies of each shard active in the index.
 |        The operation will timeout unless a new node is brought up in the cluster to host the fourth copy of the shard.</p>
 |        <p>It is important to note that this setting greatly reduces the chances of the write operation not writing to the requisite number of shard copies, but it does not completely eliminate the possibility, because this check occurs before the write operation starts.
 |        After the write operation is underway, it is still possible for replication to fail on any number of shard copies but still succeed on the primary.
 |        The <code>_shards</code> section of the API response reveals the number of shard copies on which replication succeeded and failed.</p>
 |
 |
 |      `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-create>`_
 |
 |      :param index: The name of the data stream or index to target. If the target doesn't
 |          exist and matches the name or wildcard (`*`) pattern of an index template
 |          with a `data_stream` definition, this request creates the data stream. If
 |          the target doesn't exist and doesn’t match a data stream template, this request
 |          creates the index.
 |      :param id: A unique identifier for the document. To automatically generate a
 |          document ID, use the `POST /<target>/_doc/` request format.
 |      :param document:
 |      :param include_source_on_error: True or false if to include the document source
 |          in the error message in case of parsing errors.
 |      :param pipeline: The ID of the pipeline to use to preprocess incoming documents.
 |          If the index has a default ingest pipeline specified, setting the value to
 |          `_none` turns off the default ingest pipeline for this request. If a final
 |          pipeline is configured, it will always run regardless of the value of this
 |          parameter.
 |      :param refresh: If `true`, Elasticsearch refreshes the affected shards to make
 |          this operation visible to search. If `wait_for`, it waits for a refresh to
 |          make this operation visible to search. If `false`, it does nothing with refreshes.
 |      :param require_alias: If `true`, the destination must be an index alias.
 |      :param require_data_stream: If `true`, the request's actions must target a data
 |          stream (existing or to be created).
 |      :param routing: A custom value that is used to route operations to a specific
 |          shard.
 |      :param timeout: The period the request waits for the following operations: automatic
 |          index creation, dynamic mapping updates, waiting for active shards. Elasticsearch
 |          waits for at least the specified timeout period before failing. The actual
 |          wait time could be longer, particularly when multiple waits occur. This parameter
 |          is useful for situations where the primary shard assigned to perform the
 |          operation might not be available when the operation runs. Some reasons for
 |          this might be that the primary shard is currently recovering from a gateway
 |          or undergoing relocation. By default, the operation will wait on the primary
 |          shard to become available for at least 1 minute before failing and responding
 |          with an error. The actual wait time could be longer, particularly when multiple
 |          waits occur.
 |      :param version: The explicit version number for concurrency control. It must
 |          be a non-negative long number.
 |      :param version_type: The version type.
 |      :param wait_for_active_shards: The number of shard copies that must be active
 |          before proceeding with the operation. You can set it to `all` or any positive
 |          integer up to the total number of shards in the index (`number_of_replicas+1`).
 |          The default value of `1` means it waits for each primary shard to be active.
 |
 |  delete(self, *, index: str, id: str, error_trace: Optional[bool] = None, filter_path: Union[str, Sequence[str], NoneType] = None, human: Optional[bool] = None, if_primary_term: Optional[int] = None, if_seq_no: Optional[int] = None, pretty: Optional[bool] = None, refresh: Union[bool, str, Literal['false', 'true', 'wait_for'], NoneType] = None, routing: Union[str, Sequence[str], NoneType] = None, timeout: Union[str, Literal[-1], Literal[0], NoneType] = None, version: Optional[int] = None, version_type: Union[str, Literal['external', 'external_gte', 'internal'], NoneType] = None, wait_for_active_shards: Union[int, str, Literal['all', 'index-setting'], NoneType] = None) -> elastic_transport.ObjectApiResponse[typing.Any]
 |      .. raw:: html
 |
 |        <p>Delete a document.</p>
 |        <p>Remove a JSON document from the specified index.</p>
 |        <p>NOTE: You cannot send deletion requests directly to a data stream.
 |        To delete a document in a data stream, you must target the backing index containing the document.</p>
 |        <p><strong>Optimistic concurrency control</strong></p>
 |        <p>Delete operations can be made conditional and only be performed if the last modification to the document was assigned the sequence number and primary term specified by the <code>if_seq_no</code> and <code>if_primary_term</code> parameters.
 |        If a mismatch is detected, the operation will result in a <code>VersionConflictException</code> and a status code of <code>409</code>.</p>
 |        <p><strong>Versioning</strong></p>
 |        <p>Each document indexed is versioned.
 |        When deleting a document, the version can be specified to make sure the relevant document you are trying to delete is actually being deleted and it has not changed in the meantime.
 |        Every write operation run on a document, deletes included, causes its version to be incremented.
 |        The version number of a deleted document remains available for a short time after deletion to allow for control of concurrent operations.
 |        The length of time for which a deleted document's version remains available is determined by the <code>index.gc_deletes</code> index setting.</p>
 |        <p><strong>Routing</strong></p>
 |        <p>If routing is used during indexing, the routing value also needs to be specified to delete a document.</p>
 |        <p>If the <code>_routing</code> mapping is set to <code>required</code> and no routing value is specified, the delete API throws a <code>RoutingMissingException</code> and rejects the request.</p>
 |        <p>For example:</p>
 |        <pre><code>DELETE /my-index-000001/_doc/1?routing=shard-1
 |        </code></pre>
 |        <p>This request deletes the document with ID 1, but it is routed based on the user.
 |        The document is not deleted if the correct routing is not specified.</p>
 |        <p><strong>Distributed</strong></p>
 |        <p>The delete operation gets hashed into a specific shard ID.
 |        It then gets redirected into the primary shard within that ID group and replicated (if needed) to shard replicas within that ID group.</p>
 |
 |
 |      `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-delete>`_
 |
 |      :param index: The name of the target index.
 |      :param id: A unique identifier for the document.
 |      :param if_primary_term: Only perform the operation if the document has this primary
 |          term.
 |      :param if_seq_no: Only perform the operation if the document has this sequence
 |          number.
 |      :param refresh: If `true`, Elasticsearch refreshes the affected shards to make
 |          this operation visible to search. If `wait_for`, it waits for a refresh to
 |          make this operation visible to search. If `false`, it does nothing with refreshes.
 |      :param routing: A custom value used to route operations to a specific shard.
 |      :param timeout: The period to wait for active shards. This parameter is useful
 |          for situations where the primary shard assigned to perform the delete operation
 |          might not be available when the delete operation runs. Some reasons for this
 |          might be that the primary shard is currently recovering from a store or undergoing
 |          relocation. By default, the delete operation will wait on the primary shard
 |          to become available for up to 1 minute before failing and responding with
 |          an error.
 |      :param version: An explicit version number for concurrency control. It must match
 |          the current version of the document for the request to succeed.
 |      :param version_type: The version type.
 |      :param wait_for_active_shards: The minimum number of shard copies that must be
 |          active before proceeding with the operation. You can set it to `all` or any
 |          positive integer up to the total number of shards in the index (`number_of_replicas+1`).
 |          The default value of `1` means it waits for each primary shard to be active.
 |
 |  delete_by_query(self, *, index: Union[str, Sequence[str]], allow_no_indices: Optional[bool] = None, analyze_wildcard: Optional[bool] = None, analyzer: Optional[str] = None, conflicts: Union[str, Literal['abort', 'proceed'], NoneType] = None, default_operator: Union[str, Literal['and', 'or'], NoneType] = None, df: Optional[str] = None, error_trace: Optional[bool] = None, expand_wildcards: Union[Sequence[Union[str, Literal['all', 'closed', 'hidden', 'none', 'open']]], str, Literal['all', 'closed', 'hidden', 'none', 'open'], NoneType] = None, filter_path: Union[str, Sequence[str], NoneType] = None, from_: Optional[int] = None, human: Optional[bool] = None, ignore_unavailable: Optional[bool] = None, lenient: Optional[bool] = None, max_docs: Optional[int] = None, preference: Optional[str] = None, pretty: Optional[bool] = None, q: Optional[str] = None, query: Optional[Mapping[str, Any]] = None, refresh: Optional[bool] = None, request_cache: Optional[bool] = None, requests_per_second: Optional[float] = None, routing: Union[str, Sequence[str], NoneType] = None, scroll: Union[str, Literal[-1], Literal[0], NoneType] = None, scroll_size: Optional[int] = None, search_timeout: Union[str, Literal[-1], Literal[0], NoneType] = None, search_type: Union[str, Literal['dfs_query_then_fetch', 'query_then_fetch'], NoneType] = None, slice: Optional[Mapping[str, Any]] = None, slices: Union[int, str, Literal['auto'], NoneType] = None, sort: Union[Sequence[Union[str, Mapping[str, Any]]], str, Mapping[str, Any], NoneType] = None, stats: Optional[Sequence[str]] = None, terminate_after: Optional[int] = None, timeout: Union[str, Literal[-1], Literal[0], NoneType] = None, version: Optional[bool] = None, wait_for_active_shards: Union[int, str, Literal['all', 'index-setting'], NoneType] = None, wait_for_completion: Optional[bool] = None, body: Optional[Dict[str, Any]] = None) -> elastic_transport.ObjectApiResponse[typing.Any]
 |      .. raw:: html
 |
 |        <p>Delete documents.</p>
 |        <p>Deletes documents that match the specified query.</p>
 |        <p>If the Elasticsearch security features are enabled, you must have the following index privileges for the target data stream, index, or alias:</p>
 |        <ul>
 |        <li><code>read</code></li>
 |        <li><code>delete</code> or <code>write</code></li>
 |        </ul>
 |        <p>You can specify the query criteria in the request URI or the request body using the same syntax as the search API.
 |        When you submit a delete by query request, Elasticsearch gets a snapshot of the data stream or index when it begins processing the request and deletes matching documents using internal versioning.
 |        If a document changes between the time that the snapshot is taken and the delete operation is processed, it results in a version conflict and the delete operation fails.</p>
 |        <p>NOTE: Documents with a version equal to 0 cannot be deleted using delete by query because internal versioning does not support 0 as a valid version number.</p>
 |        <p>While processing a delete by query request, Elasticsearch performs multiple search requests sequentially to find all of the matching documents to delete.
 |        A bulk delete request is performed for each batch of matching documents.
 |        If a search or bulk request is rejected, the requests are retried up to 10 times, with exponential back off.
 |        If the maximum retry limit is reached, processing halts and all failed requests are returned in the response.
 |        Any delete requests that completed successfully still stick, they are not rolled back.</p>
 |        <p>You can opt to count version conflicts instead of halting and returning by setting <code>conflicts</code> to <code>proceed</code>.
 |        Note that if you opt to count version conflicts the operation could attempt to delete more documents from the source than <code>max_docs</code> until it has successfully deleted <code>max_docs documents</code>, or it has gone through every document in the source query.</p>
 |        <p><strong>Throttling delete requests</strong></p>
 |        <p>To control the rate at which delete by query issues batches of delete operations, you can set <code>requests_per_second</code> to any positive decimal number.
 |        This pads each batch with a wait time to throttle the rate.
 |        Set <code>requests_per_second</code> to <code>-1</code> to disable throttling.</p>
 |        <p>Throttling uses a wait time between batches so that the internal scroll requests can be given a timeout that takes the request padding into account.
 |        The padding time is the difference between the batch size divided by the <code>requests_per_second</code> and the time spent writing.
 |        By default the batch size is <code>1000</code>, so if <code>requests_per_second</code> is set to <code>500</code>:</p>
 |        <pre><code>target_time = 1000 / 500 per second = 2 seconds
 |        wait_time = target_time - write_time = 2 seconds - .5 seconds = 1.5 seconds
 |        </code></pre>
 |        <p>Since the batch is issued as a single <code>_bulk</code> request, large batch sizes cause Elasticsearch to create many requests and wait before starting the next set.
 |        This is &quot;bursty&quot; instead of &quot;smooth&quot;.</p>
 |        <p><strong>Slicing</strong></p>
 |        <p>Delete by query supports sliced scroll to parallelize the delete process.
 |        This can improve efficiency and provide a convenient way to break the request down into smaller parts.</p>
 |        <p>Setting <code>slices</code> to <code>auto</code> lets Elasticsearch choose the number of slices to use.
 |        This setting will use one slice per shard, up to a certain limit.
 |        If there are multiple source data streams or indices, it will choose the number of slices based on the index or backing index with the smallest number of shards.
 |        Adding slices to the delete by query operation creates sub-requests which means it has some quirks:</p>
 |        <ul>
 |        <li>You can see these requests in the tasks APIs. These sub-requests are &quot;child&quot; tasks of the task for the request with slices.</li>
 |        <li>Fetching the status of the task for the request with slices only contains the status of completed slices.</li>
 |        <li>These sub-requests are individually addressable for things like cancellation and rethrottling.</li>
 |        <li>Rethrottling the request with <code>slices</code> will rethrottle the unfinished sub-request proportionally.</li>
 |        <li>Canceling the request with <code>slices</code> will cancel each sub-request.</li>
 |        <li>Due to the nature of <code>slices</code> each sub-request won't get a perfectly even portion of the documents. All documents will be addressed, but some slices may be larger than others. Expect larger slices to have a more even distribution.</li>
 |        <li>Parameters like <code>requests_per_second</code> and <code>max_docs</code> on a request with <code>slices</code> are distributed proportionally to each sub-request. Combine that with the earlier point about distribution being uneven and you should conclude that using <code>max_docs</code> with <code>slices</code> might not result in exactly <code>max_docs</code> documents being deleted.</li>
 |        <li>Each sub-request gets a slightly different snapshot of the source data stream or index though these are all taken at approximately the same time.</li>
 |        </ul>
 |        <p>If you're slicing manually or otherwise tuning automatic slicing, keep in mind that:</p>
 |        <ul>
 |        <li>Query performance is most efficient when the number of slices is equal to the number of shards in the index or backing index. If that number is large (for example, 500), choose a lower number as too many <code>slices</code> hurts performance. Setting <code>slices</code> higher than the number of shards generally does not improve efficiency and adds overhead.</li>
 |        <li>Delete performance scales linearly across available resources with the number of slices.</li>
 |        </ul>
 |        <p>Whether query or delete performance dominates the runtime depends on the documents being reindexed and cluster resources.</p>
 |        <p><strong>Cancel a delete by query operation</strong></p>
 |        <p>Any delete by query can be canceled using the task cancel API. For example:</p>
 |        <pre><code>POST _tasks/r1A2WoRbTwKZ516z6NEs5A:36619/_cancel
 |        </code></pre>
 |        <p>The task ID can be found by using the get tasks API.</p>
 |        <p>Cancellation should happen quickly but might take a few seconds.
 |        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>
 |
 |
 |      `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-delete-by-query>`_
 |
 |      :param index: A comma-separated list of data streams, indices, and aliases to
 |          search. It supports wildcards (`*`). To search all data streams or indices,
 |          omit this parameter or use `*` or `_all`.
 |      :param allow_no_indices: A setting that does two separate checks on the index
 |          expression. If `false`, the request returns an error (1) if any wildcard
 |          expression (including `_all` and `*`) resolves to zero matching indices or
 |          (2) if the complete set of resolved indices, aliases or data streams is empty
 |          after all expressions are evaluated. If `true`, index expressions that resolve
 |          to no indices are allowed and the request returns an empty result.
 |      :param analyze_wildcard: If `true`, wildcard and prefix queries are analyzed.
 |          This parameter can be used only when the `q` query string parameter is specified.
 |      :param analyzer: Analyzer to use for the query string. This parameter can be
 |          used only when the `q` query string parameter is specified.
 |      :param conflicts: What to do if delete by query hits version conflicts: `abort`
 |          or `proceed`.
 |      :param default_operator: The default operator for query string query: `and` or
 |          `or`. This parameter can be used only when the `q` query string parameter
 |          is specified.
 |      :param df: The field to use as default where no field prefix is given in the
 |          query string. This parameter can be used only when the `q` query string parameter
 |          is specified.
 |      :param expand_wildcards: The type of index that wildcard patterns can match.
 |          If the request can target data streams, this argument determines whether
 |          wildcard expressions match hidden data streams. It supports comma-separated
 |          values, such as `open,hidden`.
 |      :param from_: Skips the specified number of documents.
 |      :param ignore_unavailable: If `false`, the request returns an error if it targets
 |          a concrete (non-wildcarded) index, alias, or data stream that is missing,
 |          closed, or otherwise unavailable. If `true`, unavailable concrete targets
 |          are silently ignored.
 |      :param lenient: If `true`, format-based query failures (such as providing text
 |          to a numeric field) in the query string will be ignored. This parameter can
 |          be used only when the `q` query string parameter is specified.
 |      :param max_docs: The maximum number of documents to delete.
 |      :param preference: The node or shard the operation should be performed on. It
 |          is random by default.
 |      :param q: A query in the Lucene query string syntax.
 |      :param query: The documents to delete specified with Query DSL.
 |      :param refresh: If `true`, Elasticsearch refreshes all shards involved in the
 |          delete by query after the request completes. This is different than the delete
 |          API's `refresh` parameter, which causes just the shard that received the
 |          delete request to be refreshed. Unlike the delete API, it does not support
 |          `wait_for`.
 |      :param request_cache: If `true`, the request cache is used for this request.
 |          Defaults to the index-level setting.
 |      :param requests_per_second: The throttle for this request in sub-requests per
 |          second.
 |      :param routing: A custom value used to route operations to a specific shard.
 |      :param scroll: The period to retain the search context for scrolling.
 |      :param scroll_size: The size of the scroll request that powers the operation.
 |      :param search_timeout: The explicit timeout for each search request. It defaults
 |          to no timeout.
 |      :param search_type: The type of the search operation. Available options include
 |          `query_then_fetch` and `dfs_query_then_fetch`.
 |      :param slice: Slice the request manually using the provided slice ID and total
 |          number of slices.
 |      :param slices: The number of slices this task should be divided into.
 |      :param sort: A sort object that specifies the order of deleted documents.
 |      :param stats: The specific `tag` of the request for logging and statistical purposes.
 |      :param terminate_after: The maximum number of documents to collect for each shard.
 |          If a query reaches this limit, Elasticsearch terminates the query early.
 |          Elasticsearch collects documents before sorting. Use with caution. Elasticsearch
 |          applies this parameter to each shard handling the request. When possible,
 |          let Elasticsearch perform early termination automatically. Avoid specifying
 |          this parameter for requests that target data streams with backing indices
 |          across multiple data tiers.
 |      :param timeout: The period each deletion request waits for active shards.
 |      :param version: If `true`, returns the document version as part of a hit.
 |      :param wait_for_active_shards: The number of shard copies that must be active
 |          before proceeding with the operation. Set to `all` or any positive integer
 |          up to the total number of shards in the index (`number_of_replicas+1`). The
 |          `timeout` value controls how long each write request waits for unavailable
 |          shards to become available.
 |      :param wait_for_completion: If `true`, the request blocks until the operation
 |          is complete. If `false`, Elasticsearch performs some preflight checks, launches
 |          the request, and returns a task you can use to cancel or get the status of
 |          the task. Elasticsearch creates a record of this task as a document at `.tasks/task/${taskId}`.
 |          When you are done with a task, you should delete the task document so Elasticsearch
 |          can reclaim the space.
 |
 |  delete_by_query_rethrottle(self, *, task_id: str, requests_per_second: float, error_trace: Optional[bool] = None, filter_path: Union[str, Sequence[str], NoneType] = None, human: Optional[bool] = None, pretty: Optional[bool] = None) -> elastic_transport.ObjectApiResponse[typing.Any]
 |      .. raw:: html
 |
 |        <p>Throttle a delete by query operation.</p>
 |        <p>Change the number of requests per second for a particular delete by query operation.
 |        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>
 |
 |
 |      `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-delete-by-query-rethrottle>`_
 |
 |      :param task_id: The ID for the task.
 |      :param requests_per_second: The throttle for this request in sub-requests per
 |          second. To disable throttling, set it to `-1`.
 |
 |  delete_script(self, *, id: str, error_trace: Optional[bool] = None, filter_path: Union[str, Sequence[str], NoneType] = None, human: Optional[bool] = None, master_timeout: Union[str, Literal[-1], Literal[0], NoneType] = None, pretty: Optional[bool] = None, timeout: Union[str, Literal[-1], Literal[0], NoneType] = None) -> elastic_transport.ObjectApiResponse[typing.Any]
 |      .. raw:: html
 |
 |        <p>Delete a script or search template.</p>
 |        <p>Deletes a stored script or search template.</p>
 |
 |
 |      `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation-delete-script>`_
 |
 |      :param id: The identifier for the stored script or search template.
 |      :param master_timeout: The period to wait for a connection to the master node.
 |          If no response is received before the timeout expires, the request fails
 |          and returns an error. It can also be set to `-1` to indicate that the request
 |          should never timeout.
 |      :param timeout: The period to wait for a response. If no response is received
 |          before the timeout expires, the request fails and returns an error. It can
 |          also be set to `-1` to indicate that the request should never timeout.
 |
 |  exists(self, *, index: str, id: str, error_trace: Optional[bool] = None, filter_path: Union[str, Sequence[str], NoneType] = None, human: Optional[bool] = None, preference: Optional[str] = None, pretty: Optional[bool] = None, realtime: Optional[bool] = None, refresh: Optional[bool] = None, routing: Union[str, Sequence[str], NoneType] = None, source: Union[bool, str, Sequence[str], NoneType] = None, source_excludes: Union[str, Sequence[str], NoneType] = None, source_includes: Union[str, Sequence[str], NoneType] = None, stored_fields: Union[str, Sequence[str], NoneType] = None, version: Optional[int] = None, version_type: Union[str, Literal['external', 'external_gte', 'internal'], NoneType] = None) -> elastic_transport.HeadApiResponse
 |      .. raw:: html
 |
 |        <p>Check a document.</p>
 |        <p>Verify that a document exists.
 |        For example, check to see if a document with the <code>_id</code> 0 exists:</p>
 |        <pre><code>HEAD my-index-000001/_doc/0
 |        </code></pre>
 |        <p>If the document exists, the API returns a status code of <code>200 - OK</code>.
 |        If the document doesn’t exist, the API returns <code>404 - Not Found</code>.</p>
 |        <p><strong>Versioning support</strong></p>
 |        <p>You can use the <code>version</code> parameter to check the document only if its current version is equal to the specified one.</p>
 |        <p>Internally, Elasticsearch has marked the old document as deleted and added an entirely new document.
 |        The old version of the document doesn't disappear immediately, although you won't be able to access it.
 |        Elasticsearch cleans up deleted documents in the background as you continue to index more data.</p>
 |
 |
 |      `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-get>`_
 |
 |      :param index: A comma-separated list of data streams, indices, and aliases. It
 |          supports wildcards (`*`).
 |      :param id: A unique document identifier.
 |      :param preference: The node or shard the operation should be performed on. By
 |          default, the operation is randomized between the shard replicas. If it is
 |          set to `_local`, the operation will prefer to be run on a local allocated
 |          shard when possible. If it is set to a custom value, the value is used to
 |          guarantee that the same shards will be used for the same custom value. This
 |          can help with "jumping values" when hitting different shards in different
 |          refresh states. A sample value can be something like the web session ID or
 |          the user name.
 |      :param realtime: If `true`, the request is real-time as opposed to near-real-time.
 |      :param refresh: If `true`, the request refreshes the relevant shards before retrieving
 |          the document. Setting it to `true` should be done after careful thought and
 |          verification that this does not cause a heavy load on the system (and slow
 |          down indexing).
 |      :param routing: A custom value used to route operations to a specific shard.
 |      :param source: Indicates whether to return the `_source` field (`true` or `false`)
 |          or lists the fields to return.
 |      :param source_excludes: A comma-separated list of source fields to exclude from
 |          the response. You can also use this parameter to exclude fields from the
 |          subset specified in `_source_includes` query parameter. If the `_source`
 |          parameter is `false`, this parameter is ignored.
 |      :param source_includes: A comma-separated list of source fields to include in
 |          the response. If this parameter is specified, only these source fields are
 |          returned. You can exclude fields from this subset using the `_source_excludes`
 |          query parameter. If the `_source` parameter is `false`, this parameter is
 |          ignored.
 |      :param stored_fields: A comma-separated list of stored fields to return as part
 |          of a hit. If no fields are specified, no stored fields are included in the
 |          response. If this field is specified, the `_source` parameter defaults to
 |          `false`.
 |      :param version: Explicit version number for concurrency control. The specified
 |          version must match the current version of the document for the request to
 |          succeed.
 |      :param version_type: The version type.
 |
 |  exists_source(self, *, index: str, id: str, error_trace: Optional[bool] = None, filter_path: Union[str, Sequence[str], NoneType] = None, human: Optional[bool] = None, preference: Optional[str] = None, pretty: Optional[bool] = None, realtime: Optional[bool] = None, refresh: Optional[bool] = None, routing: Union[str, Sequence[str], NoneType] = None, source: Union[bool, str, Sequence[str], NoneType] = None, source_excludes: Union[str, Sequence[str], NoneType] = None, source_includes: Union[str, Sequence[str], NoneType] = None, version: Optional[int] = None, version_type: Union[str, Literal['external', 'external_gte', 'internal'], NoneType] = None) -> elastic_transport.HeadApiResponse
 |      .. raw:: html
 |
 |        <p>Check for a document source.</p>
 |        <p>Check whether a document source exists in an index.
 |        For example:</p>
 |        <pre><code>HEAD my-index-000001/_source/1
 |        </code></pre>
 |        <p>A document's source is not available if it is disabled in the mapping.</p>
 |
 |
 |      `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-get>`_
 |
 |      :param index: A comma-separated list of data streams, indices, and aliases. It
 |          supports wildcards (`*`).
 |      :param id: A unique identifier for the document.
 |      :param preference: The node or shard the operation should be performed on. By
 |          default, the operation is randomized between the shard replicas.
 |      :param realtime: If `true`, the request is real-time as opposed to near-real-time.
 |      :param refresh: If `true`, the request refreshes the relevant shards before retrieving
 |          the document. Setting it to `true` should be done after careful thought and
 |          verification that this does not cause a heavy load on the system (and slow
 |          down indexing).
 |      :param routing: A custom value used to route operations to a specific shard.
 |      :param source: Indicates whether to return the `_source` field (`true` or `false`)
 |          or lists the fields to return.
 |      :param source_excludes: A comma-separated list of source fields to exclude in
 |          the response.
 |      :param source_includes: A comma-separated list of source fields to include in
 |          the response.
 |      :param version: The version number for concurrency control. It must match the
 |          current version of the document for the request to succeed.
 |      :param version_type: The version type.
 |
 |  explain(self, *, index: str, id: str, analyze_wildcard: Optional[bool] = None, analyzer: Optional[str] = None, default_operator: Union[str, Literal['and', 'or'], NoneType] = None, df: Optional[str] = None, error_trace: Optional[bool] = None, filter_path: Union[str, Sequence[str], NoneType] = None, human: Optional[bool] = None, lenient: Optional[bool] = None, preference: Optional[str] = None, pretty: Optional[bool] = None, q: Optional[str] = None, query: Optional[Mapping[str, Any]] = None, routing: Union[str, Sequence[str], NoneType] = None, source: Union[bool, str, Sequence[str], NoneType] = None, source_excludes: Union[str, Sequence[str], NoneType] = None, source_includes: Union[str, Sequence[str], NoneType] = None, stored_fields: Union[str, Sequence[str], NoneType] = None, body: Optional[Dict[str, Any]] = None) -> elastic_transport.ObjectApiResponse[typing.Any]
 |      .. raw:: html
 |
 |        <p>Explain a document match result.</p>
 |        <p>Get information about why a specific document matches, or doesn't match, a query.
 |        It computes a score explanation for a query and a specific document.</p>
 |
 |
 |      `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation-explain>`_
 |
 |      :param index: Index names that are used to limit the request. Only a single index
 |          name can be provided to this parameter.
 |      :param id: The document identifier.
 |      :param analyze_wildcard: If `true`, wildcard and prefix queries are analyzed.
 |          This parameter can be used only when the `q` query string parameter is specified.
 |      :param analyzer: The analyzer to use for the query string. This parameter can
 |          be used only when the `q` query string parameter is specified.
 |      :param default_operator: The default operator for query string query: `and` or
 |          `or`. This parameter can be used only when the `q` query string parameter
 |          is specified.
 |      :param df: The field to use as default where no field prefix is given in the
 |          query string. This parameter can be used only when the `q` query string parameter
 |          is specified.
 |      :param lenient: If `true`, format-based query failures (such as providing text
 |          to a numeric field) in the query string will be ignored. This parameter can
 |          be used only when the `q` query string parameter is specified.
 |      :param preference: The node or shard the operation should be performed on. It
 |          is random by default.
 |      :param q: The query in the Lucene query string syntax.
 |      :param query: Defines the search definition using the Query DSL.
 |      :param routing: A custom value used to route operations to a specific shard.
 |      :param source: `True` or `false` to return the `_source` field or not or a list
 |          of fields to return.
 |      :param source_excludes: A comma-separated list of source fields to exclude from
 |          the response. You can also use this parameter to exclude fields from the
 |          subset specified in `_source_includes` query parameter. If the `_source`
 |          parameter is `false`, this parameter is ignored.
 |      :param source_includes: A comma-separated list of source fields to include in
 |          the response. If this parameter is specified, only these source fields are
 |          returned. You can exclude fields from this subset using the `_source_excludes`
 |          query parameter. If the `_source` parameter is `false`, this parameter is
 |          ignored.
 |      :param stored_fields: A comma-separated list of stored fields to return in the
 |          response.
 |
 |  field_caps(self, *, index: Union[str, Sequence[str], NoneType] = None, allow_no_indices: Optional[bool] = None, error_trace: Optional[bool] = None, expand_wildcards: Union[Sequence[Union[str, Literal['all', 'closed', 'hidden', 'none', 'open']]], str, Literal['all', 'closed', 'hidden', 'none', 'open'], NoneType] = None, fields: Union[str, Sequence[str], NoneType] = None, filter_path: Union[str, Sequence[str], NoneType] = None, filters: Union[str, Sequence[str], NoneType] = None, human: Optional[bool] = None, ignore_unavailable: Optional[bool] = None, include_empty_fields: Optional[bool] = None, include_unmapped: Optional[bool] = None, index_filter: Optional[Mapping[str, Any]] = None, pretty: Optional[bool] = None, project_routing: Optional[str] = None, runtime_mappings: Optional[Mapping[str, Mapping[str, Any]]] = None, types: Optional[Sequence[str]] = None, body: Optional[Dict[str, Any]] = None) -> elastic_transport.ObjectApiResponse[typing.Any]
 |      .. raw:: html
 |
 |        <p>Get the field capabilities.</p>
 |        <p>Get information about the capabilities of fields among multiple indices.</p>
 |        <p>For data streams, the API returns field capabilities among the stream’s backing indices.
 |        It returns runtime fields like any other field.
 |        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>
 |
 |
 |      `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation-field-caps>`_
 |
 |      :param index: A comma-separated list of data streams, indices, and aliases used
 |          to limit the request. Supports wildcards (*). To target all data streams
 |          and indices, omit this parameter or use * or _all.
 |      :param allow_no_indices: A setting that does two separate checks on the index
 |          expression. If `false`, the request returns an error (1) if any wildcard
 |          expression (including `_all` and `*`) resolves to zero matching indices or
 |          (2) if the complete set of resolved indices, aliases or data streams is empty
 |          after all expressions are evaluated. If `true`, index expressions that resolve
 |          to no indices are allowed and the request returns an empty result.
 |      :param expand_wildcards: The type of index that wildcard patterns can match.
 |          If the request can target data streams, this argument determines whether
 |          wildcard expressions match hidden data streams. Supports comma-separated
 |          values, such as `open,hidden`.
 |      :param fields: A list of fields to retrieve capabilities for. Wildcard (`*`)
 |          expressions are supported.
 |      :param filters: A comma-separated list of filters to apply to the response.
 |      :param ignore_unavailable: If `false`, the request returns an error if it targets
 |          a concrete (non-wildcarded) index, alias, or data stream that is missing,
 |          closed, or otherwise unavailable. If `true`, unavailable concrete targets
 |          are silently ignored.
 |      :param include_empty_fields: If false, empty fields are not included in the response.
 |      :param include_unmapped: If true, unmapped fields are included in the response.
 |      :param index_filter: Filter indices if the provided query rewrites to `match_none`
 |          on every shard. IMPORTANT: The filtering is done on a best-effort basis,
 |          it uses index statistics and mappings to rewrite queries to `match_none`
 |          instead of fully running the request. For instance a range query over a date
 |          field can rewrite to `match_none` if all documents within a shard (including
 |          deleted documents) are outside of the provided range. However, not all queries
 |          can rewrite to `match_none` so this API may return an index even if the provided
 |          filter matches no document.
 |      :param project_routing: Specifies a subset of projects to target for the field-caps
 |          query using project metadata tags in a subset of Lucene query syntax. Allowed
 |          Lucene queries: the _alias tag and a single value (possibly wildcarded).
 |          Examples: _alias:my-project _alias:_origin _alias:*pr* Supported in serverless
 |          only.
 |      :param runtime_mappings: Define ad-hoc runtime fields in the request similar
 |          to the way it is done in search requests. These fields exist only as part
 |          of the query and take precedence over fields defined with the same name in
 |          the index mappings.
 |      :param types: A comma-separated list of field types to include. Any fields that
 |          do not match one of these types will be excluded from the results. It defaults
 |          to empty, meaning that all field types are returned.
 |
 |  get(self, *, index: str, id: str, error_trace: Optional[bool] = None, filter_path: Union[str, Sequence[str], NoneType] = None, force_synthetic_source: Optional[bool] = None, human: Optional[bool] = None, preference: Optional[str] = None, pretty: Optional[bool] = None, realtime: Optional[bool] = None, refresh: Optional[bool] = None, routing: Union[str, Sequence[str], NoneType] = None, source: Union[bool, str, Sequence[str], NoneType] = None, source_exclude_vectors: Optional[bool] = None, source_excludes: Union[str, Sequence[str], NoneType] = None, source_includes: Union[str, Sequence[str], NoneType] = None, stored_fields: Union[str, Sequence[str], NoneType] = None, version: Optional[int] = None, version_type: Union[str, Literal['external', 'external_gte', 'internal'], NoneType] = None) -> elastic_transport.ObjectApiResponse[typing.Any]
 |      .. raw:: html
 |
 |        <p>Get a document by its ID.</p>
 |        <p>Get a document and its source or stored fields from an index.</p>
 |        <p>By default, this API is realtime and is not affected by the refresh rate of the index (when data will become visible for search).
 |        In the case where stored fields are requested with the <code>stored_fields</code> parameter and the document has been updated but is not yet refreshed, the API will have to parse and analyze the source to extract the stored fields.
 |        To turn off realtime behavior, set the <code>realtime</code> parameter to false.</p>
 |        <p><strong>Source filtering</strong></p>
 |        <p>By default, the API returns the contents of the <code>_source</code> field unless you have used the <code>stored_fields</code> parameter or the <code>_source</code> field is turned off.
 |        You can turn off <code>_source</code> retrieval by using the <code>_source</code> parameter:</p>
 |        <pre><code>GET my-index-000001/_doc/0?_source=false
 |        </code></pre>
 |        <p>If you only need one or two fields from the <code>_source</code>, use the <code>_source_includes</code> or <code>_source_excludes</code> parameters to include or filter out particular fields.
 |        This can be helpful with large documents where partial retrieval can save on network overhead
 |        Both parameters take a comma separated list of fields or wildcard expressions.
 |        For example:</p>
 |        <pre><code>GET my-index-000001/_doc/0?_source_includes=*.id&amp;_source_excludes=entities
 |        </code></pre>
 |        <p>If you only want to specify includes, you can use a shorter notation:</p>
 |        <pre><code>GET my-index-000001/_doc/0?_source=*.id
 |        </code></pre>
 |        <p><strong>Routing</strong></p>
 |        <p>If routing is used during indexing, the routing value also needs to be specified to retrieve a document.
 |        For example:</p>
 |        <pre><code>GET my-index-000001/_doc/2?routing=user1
 |        </code></pre>
 |        <p>This request gets the document with ID 2, but it is routed based on the user.
 |        The document is not fetched if the correct routing is not specified.</p>
 |        <p><strong>Distributed</strong></p>
 |        <p>The GET operation is hashed into a specific shard ID.
 |        It is then redirected to one of the replicas within that shard ID and returns the result.
 |        The replicas are the primary shard and its replicas within that shard ID group.
 |        This means that the more replicas you have, the better your GET scaling will be.</p>
 |        <p><strong>Versioning support</strong></p>
 |        <p>You can use the <code>version</code> parameter to retrieve the document only if its current version is equal to the specified one.</p>
 |        <p>Internally, Elasticsearch has marked the old document as deleted and added an entirely new document.
 |        The old version of the document doesn't disappear immediately, although you won't be able to access it.
 |        Elasticsearch cleans up deleted documents in the background as you continue to index more data.</p>
 |
 |
 |      `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-get>`_
 |
 |      :param index: The name of the index that contains the document.
 |      :param id: A unique document identifier.
 |      :param force_synthetic_source: Indicates whether the request forces synthetic
 |          `_source`. Use this parameter to test if the mapping supports synthetic `_source`
 |          and to get a sense of the worst case performance. Fetches with this parameter
 |          enabled will be slower than enabling synthetic source natively in the index.
 |      :param preference: The node or shard the operation should be performed on. By
 |          default, the operation is randomized between the shard replicas. If it is
 |          set to `_local`, the operation will prefer to be run on a local allocated
 |          shard when possible. If it is set to a custom value, the value is used to
 |          guarantee that the same shards will be used for the same custom value. This
 |          can help with "jumping values" when hitting different shards in different
 |          refresh states. A sample value can be something like the web session ID or
 |          the user name.
 |      :param realtime: If `true`, the request is real-time as opposed to near-real-time.
 |      :param refresh: If `true`, the request refreshes the relevant shards before retrieving
 |          the document. Setting it to `true` should be done after careful thought and
 |          verification that this does not cause a heavy load on the system (and slow
 |          down indexing).
 |      :param routing: A custom value used to route operations to a specific shard.
 |      :param source: Indicates whether to return the `_source` field (`true` or `false`)
 |          or lists the fields to return.
 |      :param source_exclude_vectors: Whether vectors should be excluded from _source
 |      :param source_excludes: A comma-separated list of source fields to exclude from
 |          the response. You can also use this parameter to exclude fields from the
 |          subset specified in `_source_includes` query parameter. If the `_source`
 |          parameter is `false`, this parameter is ignored.
 |      :param source_includes: A comma-separated list of source fields to include in
 |          the response. If this parameter is specified, only these source fields are
 |          returned. You can exclude fields from this subset using the `_source_excludes`
 |          query parameter. If the `_source` parameter is `false`, this parameter is
 |          ignored.
 |      :param stored_fields: A comma-separated list of stored fields to return as part
 |          of a hit. If no fields are specified, no stored fields are included in the
 |          response. If this field is specified, the `_source` parameter defaults to
 |          `false`. Only leaf fields can be retrieved with the `stored_fields` option.
 |          Object fields can't be returned; if specified, the request fails.
 |      :param version: The version number for concurrency control. It must match the
 |          current version of the document for the request to succeed.
 |      :param version_type: The version type.
 |
 |  get_script(self, *, id: str, error_trace: Optional[bool] = None, filter_path: Union[str, Sequence[str], NoneType] = None, human: Optional[bool] = None, master_timeout: Union[str, Literal[-1], Literal[0], NoneType] = None, pretty: Optional[bool] = None) -> elastic_transport.ObjectApiResponse[typing.Any]
 |      .. raw:: html
 |
 |        <p>Get a script or search template.</p>
 |        <p>Retrieves a stored script or search template.</p>
 |
 |
 |      `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation-get-script>`_
 |
 |      :param id: The identifier for the stored script or search template.
 |      :param master_timeout: The period to wait for the master node. If the master
 |          node is not available before the timeout expires, the request fails and returns
 |          an error. It can also be set to `-1` to indicate that the request should
 |          never timeout.
 |
 |  get_script_context(self, *, error_trace: Optional[bool] = None, filter_path: Union[str, Sequence[str], NoneType] = None, human: Optional[bool] = None, pretty: Optional[bool] = None) -> elastic_transport.ObjectApiResponse[typing.Any]
 |      .. raw:: html
 |
 |        <p>Get script contexts.</p>
 |        <p>Get a list of supported script contexts and their methods.</p>
 |
 |
 |      `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation-get-script-context>`_
 |
 |  get_script_languages(self, *, error_trace: Optional[bool] = None, filter_path: Union[str, Sequence[str], NoneType] = None, human: Optional[bool] = None, pretty: Optional[bool] = None) -> elastic_transport.ObjectApiResponse[typing.Any]
 |      .. raw:: html
 |
 |        <p>Get script languages.</p>
 |        <p>Get a list of available script types, languages, and contexts.</p>
 |
 |
 |      `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation-get-script-languages>`_
 |
 |  get_source(self, *, index: str, id: str, error_trace: Optional[bool] = None, filter_path: Union[str, Sequence[str], NoneType] = None, human: Optional[bool] = None, preference: Optional[str] = None, pretty: Optional[bool] = None, realtime: Optional[bool] = None, refresh: Optional[bool] = None, routing: Union[str, Sequence[str], NoneType] = None, source: Union[bool, str, Sequence[str], NoneType] = None, source_excludes: Union[str, Sequence[str], NoneType] = None, source_includes: Union[str, Sequence[str], NoneType] = None, version: Optional[int] = None, version_type: Union[str, Literal['external', 'external_gte', 'internal'], NoneType] = None) -> elastic_transport.ObjectApiResponse[typing.Any]
 |      .. raw:: html
 |
 |        <p>Get a document's source.</p>
 |        <p>Get the source of a document.
 |        For example:</p>
 |        <pre><code>GET my-index-000001/_source/1
 |        </code></pre>
 |        <p>You can use the source filtering parameters to control which parts of the <code>_source</code> are returned:</p>
 |        <pre><code>GET my-index-000001/_source/1/?_source_includes=*.id&amp;_source_excludes=entities
 |        </code></pre>
 |
 |
 |      `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-get>`_
 |
 |      :param index: The name of the index that contains the document.
 |      :param id: A unique document identifier.
 |      :param preference: The node or shard the operation should be performed on. By
 |          default, the operation is randomized between the shard replicas.
 |      :param realtime: If `true`, the request is real-time as opposed to near-real-time.
 |      :param refresh: If `true`, the request refreshes the relevant shards before retrieving
 |          the document. Setting it to `true` should be done after careful thought and
 |          verification that this does not cause a heavy load on the system (and slow
 |          down indexing).
 |      :param routing: A custom value used to route operations to a specific shard.
 |      :param source: Indicates whether to return the `_source` field (`true` or `false`)
 |          or lists the fields to return.
 |      :param source_excludes: A comma-separated list of source fields to exclude in
 |          the response.
 |      :param source_includes: A comma-separated list of source fields to include in
 |          the response.
 |      :param version: The version number for concurrency control. It must match the
 |          current version of the document for the request to succeed.
 |      :param version_type: The version type.
 |
 |  health_report(self, *, feature: Union[str, Sequence[str], NoneType] = None, error_trace: Optional[bool] = None, filter_path: Union[str, Sequence[str], NoneType] = None, human: Optional[bool] = None, pretty: Optional[bool] = None, size: Optional[int] = None, timeout: Union[str, Literal[-1], Literal[0], NoneType] = None, verbose: Optional[bool] = None) -> elastic_transport.ObjectApiResponse[typing.Any]
 |      .. raw:: html
 |
 |        <p>Get the cluster health.</p>
 |        <p>Get a report with the health status of an Elasticsearch cluster.
 |        The report contains a list of indicators that compose Elasticsearch functionality.</p>
 |        <p>Each indicator has a health status of: green, unknown, yellow or red.
 |        The indicator will provide an explanation and metadata describing the reason for its current health status.</p>
 |        <p>The cluster’s status is controlled by the worst indicator status.</p>
 |        <p>In the event that an indicator’s status is non-green, a list of impacts may be present in the indicator result which detail the functionalities that are negatively affected by the health issue.
 |        Each impact carries with it a severity level, an area of the system that is affected, and a simple description of the impact on the system.</p>
 |        <p>Some health indicators can determine the root cause of a health problem and prescribe a set of steps that can be performed in order to improve the health of the system.
 |        The root cause and remediation steps are encapsulated in a diagnosis.
 |        A diagnosis contains a cause detailing a root cause analysis, an action containing a brief description of the steps to take to fix the problem, the list of affected resources (if applicable), and a detailed step-by-step troubleshooting guide to fix the diagnosed problem.</p>
 |        <p>NOTE: The health indicators perform root cause analysis of non-green health statuses. This can be computationally expensive when called frequently.
 |        When setting up automated polling of the API for health status, set verbose to false to disable the more expensive analysis logic.</p>
 |
 |
 |      `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation-health-report>`_
 |
 |      :param feature: A feature of the cluster, as returned by the top-level health
 |          report API.
 |      :param size: Limit the number of affected resources the health report API returns.
 |      :param timeout: Explicit operation timeout.
 |      :param verbose: Opt-in for more information about the health of the system.
 |
 |  index(self, *, index: str, document: Optional[Mapping[str, Any]] = None, body: Optional[Mapping[str, Any]] = None, id: Optional[str] = None, error_trace: Optional[bool] = None, filter_path: Union[str, Sequence[str], NoneType] = None, human: Optional[bool] = None, if_primary_term: Optional[int] = None, if_seq_no: Optional[int] = None, include_source_on_error: Optional[bool] = None, op_type: Union[str, Literal['create', 'index'], NoneType] = None, pipeline: Optional[str] = None, pretty: Optional[bool] = None, refresh: Union[bool, str, Literal['false', 'true', 'wait_for'], NoneType] = None, require_alias: Optional[bool] = None, require_data_stream: Optional[bool] = None, routing: Union[str, Sequence[str], NoneType] = None, timeout: Union[str, Literal[-1], Literal[0], NoneType] = None, version: Optional[int] = None, version_type: Union[str, Literal['external', 'external_gte', 'internal'], NoneType] = None, wait_for_active_shards: Union[int, str, Literal['all', 'index-setting'], NoneType] = None) -> elastic_transport.ObjectApiResponse[typing.Any]
 |      .. raw:: html
 |
 |        <p>Create or update a document in an index.</p>
 |        <p>Add a JSON document to the specified data stream or index and make it searchable.
 |        If the target is an index and the document already exists, the request updates the document and increments its version.</p>
 |        <p>NOTE: You cannot use this API to send update requests for existing documents in a data stream.</p>
 |        <p>If the Elasticsearch security features are enabled, you must have the following index privileges for the target data stream, index, or index alias:</p>
 |        <ul>
 |        <li>To add or overwrite a document using the <code>PUT /&lt;target&gt;/_doc/&lt;_id&gt;</code> request format, you must have the <code>create</code>, <code>index</code>, or <code>write</code> index privilege.</li>
 |        <li>To add a document using the <code>POST /&lt;target&gt;/_doc/</code> request format, you must have the <code>create_doc</code>, <code>create</code>, <code>index</code>, or <code>write</code> index privilege.</li>
 |        <li>To automatically create a data stream or index with this API request, you must have the <code>auto_configure</code>, <code>create_index</code>, or <code>manage</code> index privilege.</li>
 |        </ul>
 |        <p>Automatic data stream creation requires a matching index template with data stream enabled.</p>
 |        <p>NOTE: Replica shards might not all be started when an indexing operation returns successfully.
 |        By default, only the primary is required. Set <code>wait_for_active_shards</code> to change this default behavior.</p>
 |        <p><strong>Automatically create data streams and indices</strong></p>
 |        <p>If the request's target doesn't exist and matches an index template with a <code>data_stream</code> definition, the index operation automatically creates the data stream.</p>
 |        <p>If the target doesn't exist and doesn't match a data stream template, the operation automatically creates the index and applies any matching index templates.</p>
 |        <p>NOTE: Elasticsearch includes several built-in index templates. To avoid naming collisions with these templates, refer to index pattern documentation.</p>
 |        <p>If no mapping exists, the index operation creates a dynamic mapping.
 |        By default, new fields and objects are automatically added to the mapping if needed.</p>
 |        <p>Automatic index creation is controlled by the <code>action.auto_create_index</code> setting.
 |        If it is <code>true</code>, any index can be created automatically.
 |        You can modify this setting to explicitly allow or block automatic creation of indices that match specified patterns or set it to <code>false</code> to turn off automatic index creation entirely.
 |        Specify a comma-separated list of patterns you want to allow or prefix each pattern with <code>+</code> or <code>-</code> to indicate whether it should be allowed or blocked.
 |        When a list is specified, the default behaviour is to disallow.</p>
 |        <p>NOTE: The <code>action.auto_create_index</code> setting affects the automatic creation of indices only.
 |        It does not affect the creation of data streams.</p>
 |        <p><strong>Optimistic concurrency control</strong></p>
 |        <p>Index operations can be made conditional and only be performed if the last modification to the document was assigned the sequence number and primary term specified by the <code>if_seq_no</code> and <code>if_primary_term</code> parameters.
 |        If a mismatch is detected, the operation will result in a <code>VersionConflictException</code> and a status code of <code>409</code>.</p>
 |        <p><strong>Routing</strong></p>
 |        <p>By default, shard placement — or routing — is controlled by using a hash of the document's ID value.
 |        For more explicit control, the value fed into the hash function used by the router can be directly specified on a per-operation basis using the <code>routing</code> parameter.</p>
 |        <p>When setting up explicit mapping, you can also use the <code>_routing</code> field to direct the index operation to extract the routing value from the document itself.
 |        This does come at the (very minimal) cost of an additional document parsing pass.
 |        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>
 |        <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>
 |        <p><strong>Distributed</strong></p>
 |        <p>The index operation is directed to the primary shard based on its route and performed on the actual node containing this shard.
 |        After the primary shard completes the operation, if needed, the update is distributed to applicable replicas.</p>
 |        <p><strong>Active shards</strong></p>
 |        <p>To improve the resiliency of writes to the system, indexing operations can be configured to wait for a certain number of active shard copies before proceeding with the operation.
 |        If the requisite number of active shard copies are not available, then the write operation must wait and retry, until either the requisite shard copies have started or a timeout occurs.
 |        By default, write operations only wait for the primary shards to be active before proceeding (that is to say <code>wait_for_active_shards</code> is <code>1</code>).
 |        This default can be overridden in the index settings dynamically by setting <code>index.write.wait_for_active_shards</code>.
 |        To alter this behavior per operation, use the <code>wait_for_active_shards request</code> parameter.</p>
 |        <p>Valid values are all or any positive integer up to the total number of configured copies per shard in the index (which is <code>number_of_replicas</code>+1).
 |        Specifying a negative value or a number greater than the number of shard copies will throw an error.</p>
 |        <p>For example, suppose you have a cluster of three nodes, A, B, and C and you create an index index with the number of replicas set to 3 (resulting in 4 shard copies, one more copy than there are nodes).
 |        If you attempt an indexing operation, by default the operation will only ensure the primary copy of each shard is available before proceeding.
 |        This means that even if B and C went down and A hosted the primary shard copies, the indexing operation would still proceed with only one copy of the data.
 |        If <code>wait_for_active_shards</code> is set on the request to <code>3</code> (and all three nodes are up), the indexing operation will require 3 active shard copies before proceeding.
 |        This requirement should be met because there are 3 active nodes in the cluster, each one holding a copy of the shard.
 |        However, if you set <code>wait_for_active_shards</code> to <code>all</code> (or to <code>4</code>, which is the same in this situation), the indexing operation will not proceed as you do not have all 4 copies of each shard active in the index.
 |        The operation will timeout unless a new node is brought up in the cluster to host the fourth copy of the shard.</p>
 |        <p>It is important to note that this setting greatly reduces the chances of the write operation not writing to the requisite number of shard copies, but it does not completely eliminate the possibility, because this check occurs before the write operation starts.
 |        After the write operation is underway, it is still possible for replication to fail on any number of shard copies but still succeed on the primary.
 |        The <code>_shards</code> section of the API response reveals the number of shard copies on which replication succeeded and failed.</p>
 |        <p><strong>No operation (noop) updates</strong></p>
 |        <p>When updating a document by using this API, a new version of the document is always created even if the document hasn't changed.
 |        If this isn't acceptable use the <code>_update</code> API with <code>detect_noop</code> set to <code>true</code>.
 |        The <code>detect_noop</code> option isn't available on this API because it doesn’t fetch the old source and isn't able to compare it against the new source.</p>
 |        <p>There isn't a definitive rule for when noop updates aren't acceptable.
 |        It's a combination of lots of factors like how frequently your data source sends updates that are actually noops and how many queries per second Elasticsearch runs on the shard receiving the updates.</p>
 |        <p><strong>Versioning</strong></p>
 |        <p>Each indexed document is given a version number.
 |        By default, internal versioning is used that starts at 1 and increments with each update, deletes included.
 |        Optionally, the version number can be set to an external value (for example, if maintained in a database).
 |        To enable this functionality, <code>version_type</code> should be set to <code>external</code>.
 |        The value provided must be a numeric, long value greater than or equal to 0, and less than around <code>9.2e+18</code>.</p>
 |        <p>NOTE: Versioning is completely real time, and is not affected by the near real time aspects of search operations.
 |        If no version is provided, the operation runs without any version checks.</p>
 |        <p>When using the external version type, the system checks to see if the version number passed to the index request is greater than the version of the currently stored document.
 |        If true, the document will be indexed and the new version number used.
 |        If the value provided is less than or equal to the stored document's version number, a version conflict will occur and the index operation will fail. For example:</p>
 |        <pre><code>PUT my-index-000001/_doc/1?version=2&amp;version_type=external
 |        {
 |          &quot;user&quot;: {
 |            &quot;id&quot;: &quot;elkbee&quot;
 |          }
 |        }
 |        </code></pre>
 |        <p>In this example, the operation will succeed since the supplied version of 2 is higher than the current document version of 1.
 |        If the document was already updated and its version was set to 2 or higher, the indexing command will fail and result in a conflict (409 HTTP status code).</p>
 |        <p>A nice side effect is that there is no need to maintain strict ordering of async indexing operations run as a result of changes to a source database, as long as version numbers from the source database are used.
 |        Even the simple case of updating the Elasticsearch index using data from a database is simplified if external versioning is used, as only the latest version will be used if the index operations arrive out of order.</p>
 |
 |
 |      `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-create>`_
 |
 |      :param index: The name of the data stream or index to target. If the target doesn't
 |          exist and matches the name or wildcard (`*`) pattern of an index template
 |          with a `data_stream` definition, this request creates the data stream. If
 |          the target doesn't exist and doesn't match a data stream template, this request
 |          creates the index. You can check for existing targets with the resolve index
 |          API.
 |      :param document:
 |      :param id: A unique identifier for the document. To automatically generate a
 |          document ID, use the `POST /<target>/_doc/` request format and omit this
 |          parameter.
 |      :param if_primary_term: Only perform the operation if the document has this primary
 |          term.
 |      :param if_seq_no: Only perform the operation if the document has this sequence
 |          number.
 |      :param include_source_on_error: True or false if to include the document source
 |          in the error message in case of parsing errors.
 |      :param op_type: Set to `create` to only index the document if it does not already
 |          exist (put if absent). If a document with the specified `_id` already exists,
 |          the indexing operation will fail. The behavior is the same as using the `<index>/_create`
 |          endpoint. If a document ID is specified, this paramater defaults to `index`.
 |          Otherwise, it defaults to `create`. If the request targets a data stream,
 |          an `op_type` of `create` is required.
 |      :param pipeline: The ID of the pipeline to use to preprocess incoming documents.
 |          If the index has a default ingest pipeline specified, then setting the value
 |          to `_none` disables the default ingest pipeline for this request. If a final
 |          pipeline is configured it will always run, regardless of the value of this
 |          parameter.
 |      :param refresh: If `true`, Elasticsearch refreshes the affected shards to make
 |          this operation visible to search. If `wait_for`, it waits for a refresh to
 |          make this operation visible to search. If `false`, it does nothing with refreshes.
 |      :param require_alias: If `true`, the destination must be an index alias.
 |      :param require_data_stream: If `true`, the request's actions must target a data
 |          stream (existing or to be created).
 |      :param routing: A custom value that is used to route operations to a specific
 |          shard.
 |      :param timeout: The period the request waits for the following operations: automatic
 |          index creation, dynamic mapping updates, waiting for active shards. This
 |          parameter is useful for situations where the primary shard assigned to perform
 |          the operation might not be available when the operation runs. Some reasons
 |          for this might be that the primary shard is currently recovering from a gateway
 |          or undergoing relocation. By default, the operation will wait on the primary
 |          shard to become available for at least 1 minute before failing and responding
 |          with an error. The actual wait time could be longer, particularly when multiple
 |          waits occur.
 |      :param version: An explicit version number for concurrency control. It must be
 |          a non-negative long number.
 |      :param version_type: The version type.
 |      :param wait_for_active_shards: The number of shard copies that must be active
 |          before proceeding with the operation. You can set it to `all` or any positive
 |          integer up to the total number of shards in the index (`number_of_replicas+1`).
 |          The default value of `1` means it waits for each primary shard to be active.
 |
 |  info(self, *, error_trace: Optional[bool] = None, filter_path: Union[str, Sequence[str], NoneType] = None, human: Optional[bool] = None, pretty: Optional[bool] = None) -> elastic_transport.ObjectApiResponse[typing.Any]
 |      .. raw:: html
 |
 |        <p>Get cluster info.</p>
 |        <p>Get basic build, version, and cluster information.
 |        ::: In Serverless, this API is retained for backward compatibility only. Some response fields, such as the version number, should be ignored.</p>
 |
 |
 |      `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/group/endpoint-info>`_
 |
 |  mget(self, *, index: Optional[str] = None, docs: Optional[Sequence[Mapping[str, Any]]] = None, error_trace: Optional[bool] = None, filter_path: Union[str, Sequence[str], NoneType] = None, force_synthetic_source: Optional[bool] = None, human: Optional[bool] = None, ids: Union[str, Sequence[str], NoneType] = None, preference: Optional[str] = None, pretty: Optional[bool] = None, realtime: Optional[bool] = None, refresh: Optional[bool] = None, routing: Union[str, Sequence[str], NoneType] = None, source: Union[bool, str, Sequence[str], NoneType] = None, source_excludes: Union[str, Sequence[str], NoneType] = None, source_includes: Union[str, Sequence[str], NoneType] = None, stored_fields: Union[str, Sequence[str], NoneType] = None, body: Optional[Dict[str, Any]] = None) -> elastic_transport.ObjectApiResponse[typing.Any]
 |      .. raw:: html
 |
 |        <p>Get multiple documents.</p>
 |        <p>Get multiple JSON documents by ID from one or more indices.
 |        If you specify an index in the request URI, you only need to specify the document IDs in the request body.
 |        To ensure fast responses, this multi get (mget) API responds with partial results if one or more shards fail.</p>
 |        <p><strong>Filter source fields</strong></p>
 |        <p>By default, the <code>_source</code> field is returned for every document (if stored).
 |        Use the <code>_source</code> and <code>_source_include</code> or <code>source_exclude</code> attributes to filter what fields are returned for a particular document.
 |        You can include the <code>_source</code>, <code>_source_includes</code>, and <code>_source_excludes</code> query parameters in the request URI to specify the defaults to use when there are no per-document instructions.</p>
 |        <p><strong>Get stored fields</strong></p>
 |        <p>Use the <code>stored_fields</code> attribute to specify the set of stored fields you want to retrieve.
 |        Any requested fields that are not stored are ignored.
 |        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>
 |
 |
 |      `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-mget>`_
 |
 |      :param index: Name of the index to retrieve documents from when `ids` are specified,
 |          or when a document in the `docs` array does not specify an index.
 |      :param docs: The documents you want to retrieve. Required if no index is specified
 |          in the request URI.
 |      :param force_synthetic_source: Should this request force synthetic _source? Use
 |          this to test if the mapping supports synthetic _source and to get a sense
 |          of the worst case performance. Fetches with this enabled will be slower the
 |          enabling synthetic source natively in the index.
 |      :param ids: The IDs of the documents you want to retrieve. Allowed when the index
 |          is specified in the request URI.
 |      :param preference: Specifies the node or shard the operation should be performed
 |          on. Random by default.
 |      :param realtime: If `true`, the request is real-time as opposed to near-real-time.
 |      :param refresh: If `true`, the request refreshes relevant shards before retrieving
 |          documents.
 |      :param routing: Custom value used to route operations to a specific shard.
 |      :param source: True or false to return the `_source` field or not, or a list
 |          of fields to return.
 |      :param source_excludes: A comma-separated list of source fields to exclude from
 |          the response. You can also use this parameter to exclude fields from the
 |          subset specified in `_source_includes` query parameter.
 |      :param source_includes: A comma-separated list of source fields to include in
 |          the response. If this parameter is specified, only these source fields are
 |          returned. You can exclude fields from this subset using the `_source_excludes`
 |          query parameter. If the `_source` parameter is `false`, this parameter is
 |          ignored.
 |      :param stored_fields: If `true`, retrieves the document fields stored in the
 |          index rather than the document `_source`.
 |
 |  msearch(self, *, searches: Optional[Sequence[Mapping[str, Any]]] = None, body: Optional[Sequence[Mapping[str, Any]]] = None, index: Union[str, Sequence[str], NoneType] = None, allow_no_indices: Optional[bool] = None, ccs_minimize_roundtrips: Optional[bool] = None, error_trace: Optional[bool] = None, expand_wildcards: Union[Sequence[Union[str, Literal['all', 'closed', 'hidden', 'none', 'open']]], str, Literal['all', 'closed', 'hidden', 'none', 'open'], NoneType] = None, filter_path: Union[str, Sequence[str], NoneType] = None, human: Optional[bool] = None, ignore_throttled: Optional[bool] = None, ignore_unavailable: Optional[bool] = None, include_named_queries_score: Optional[bool] = None, max_concurrent_searches: Optional[int] = None, max_concurrent_shard_requests: Optional[int] = None, pre_filter_shard_size: Optional[int] = None, pretty: Optional[bool] = None, project_routing: Optional[str] = None, rest_total_hits_as_int: Optional[bool] = None, routing: Union[str, Sequence[str], NoneType] = None, search_type: Union[str, Literal['dfs_query_then_fetch', 'query_then_fetch'], NoneType] = None, typed_keys: Optional[bool] = None) -> elastic_transport.ObjectApiResponse[typing.Any]
 |      .. raw:: html
 |
 |        <p>Run multiple searches.</p>
 |        <p>The format of the request is similar to the bulk API format and makes use of the newline delimited JSON (NDJSON) format.
 |        The structure is as follows:</p>
 |        <pre><code>header\n
 |        body\n
 |        header\n
 |        body\n
 |        </code></pre>
 |        <p>This structure is specifically optimized to reduce parsing if a specific search ends up redirected to another node.</p>
 |        <p>IMPORTANT: The final line of data must end with a newline character <code>\n</code>.
 |        Each newline character may be preceded by a carriage return <code>\r</code>.
 |        When sending requests to this endpoint the <code>Content-Type</code> header should be set to <code>application/x-ndjson</code>.</p>
 |
 |
 |      `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation-msearch>`_
 |
 |      :param searches:
 |      :param index: Comma-separated list of data streams, indices, and index aliases
 |          to search.
 |      :param allow_no_indices: A setting that does two separate checks on the index
 |          expression. If `false`, the request returns an error (1) if any wildcard
 |          expression (including `_all` and `*`) resolves to zero matching indices or
 |          (2) if the complete set of resolved indices, aliases or data streams is empty
 |          after all expressions are evaluated. If `true`, index expressions that resolve
 |          to no indices are allowed and the request returns an empty result.
 |      :param ccs_minimize_roundtrips: If true, network roundtrips between the coordinating
 |          node and remote clusters are minimized for cross-cluster search requests.
 |      :param expand_wildcards: Type of index that wildcard expressions can match. If
 |          the request can target data streams, this argument determines whether wildcard
 |          expressions match hidden data streams.
 |      :param ignore_throttled: If true, concrete, expanded or aliased indices are ignored
 |          when frozen.
 |      :param ignore_unavailable: If `false`, the request returns an error if it targets
 |          a concrete (non-wildcarded) index, alias, or data stream that is missing,
 |          closed, or otherwise unavailable. If `true`, unavailable concrete targets
 |          are silently ignored.
 |      :param include_named_queries_score: Indicates whether hit.matched_queries should
 |          be rendered as a map that includes the name of the matched query associated
 |          with its score (true) or as an array containing the name of the matched queries
 |          (false) This functionality reruns each named query on every hit in a search
 |          response. Typically, this adds a small overhead to a request. However, using
 |          computationally expensive named queries on a large number of hits may add
 |          significant overhead.
 |      :param max_concurrent_searches: Maximum number of concurrent searches the multi
 |          search API can execute. Defaults to `max(1, (# of data nodes * min(search
 |          thread pool size, 10)))`.
 |      :param max_concurrent_shard_requests: Maximum number of concurrent shard requests
 |          that each sub-search request executes per node.
 |      :param pre_filter_shard_size: Defines a threshold that enforces a pre-filter
 |          roundtrip to prefilter search shards based on query rewriting if the number
 |          of shards the search request expands to exceeds the threshold. This filter
 |          roundtrip can limit the number of shards significantly if for instance a
 |          shard can not match any documents based on its rewrite method i.e., if date
 |          filters are mandatory to match but the shard bounds and the query are disjoint.
 |      :param project_routing: Specifies a subset of projects to target for a search
 |          using project metadata tags in a subset Lucene syntax. Allowed Lucene queries:
 |          the _alias tag and a single value (possible wildcarded). Examples: _alias:my-project
 |          _alias:_origin _alias:*pr* Supported in serverless only.
 |      :param rest_total_hits_as_int: If true, hits.total are returned as an integer
 |          in the response. Defaults to false, which returns an object.
 |      :param routing: Custom routing value used to route search operations to a specific
 |          shard.
 |      :param search_type: Indicates whether global term and document frequencies should
 |          be used when scoring returned documents.
 |      :param typed_keys: Specifies whether aggregation and suggester names should be
 |          prefixed by their respective types in the response.
 |
 |  msearch_template(self, *, search_templates: Optional[Sequence[Mapping[str, Any]]] = None, body: Optional[Sequence[Mapping[str, Any]]] = None, index: Union[str, Sequence[str], NoneType] = None, ccs_minimize_roundtrips: Optional[bool] = None, error_trace: Optional[bool] = None, filter_path: Union[str, Sequence[str], NoneType] = None, human: Optional[bool] = None, max_concurrent_searches: Optional[int] = None, pretty: Optional[bool] = None, project_routing: Optional[str] = None, rest_total_hits_as_int: Optional[bool] = None, search_type: Union[str, Literal['dfs_query_then_fetch', 'query_then_fetch'], NoneType] = None, typed_keys: Optional[bool] = None) -> elastic_transport.ObjectApiResponse[typing.Any]
 |      .. raw:: html
 |
 |        <p>Run multiple templated searches.</p>
 |        <p>Run multiple templated searches with a single request.
 |        If you are providing a text file or text input to <code>curl</code>, use the <code>--data-binary</code> flag instead of <code>-d</code> to preserve newlines.
 |        For example:</p>
 |        <pre><code>$ cat requests
 |        { &quot;index&quot;: &quot;my-index&quot; }
 |        { &quot;id&quot;: &quot;my-search-template&quot;, &quot;params&quot;: { &quot;query_string&quot;: &quot;hello world&quot;, &quot;from&quot;: 0, &quot;size&quot;: 10 }}
 |        { &quot;index&quot;: &quot;my-other-index&quot; }
 |        { &quot;id&quot;: &quot;my-other-search-template&quot;, &quot;params&quot;: { &quot;query_type&quot;: &quot;match_all&quot; }}
 |
 |        $ curl -H &quot;Content-Type: application/x-ndjson&quot; -XGET localhost:9200/_msearch/template --data-binary &quot;@requests&quot;; echo
 |        </code></pre>
 |
 |
 |      `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation-msearch-template>`_
 |
 |      :param search_templates:
 |      :param index: A comma-separated list of data streams, indices, and aliases to
 |          search. It supports wildcards (`*`). To search all data streams and indices,
 |          omit this parameter or use `*`.
 |      :param ccs_minimize_roundtrips: If `true`, network round-trips are minimized
 |          for cross-cluster search requests.
 |      :param max_concurrent_searches: The maximum number of concurrent searches the
 |          API can run.
 |      :param project_routing: Specifies a subset of projects to target for the search
 |          using project metadata tags in a subset of Lucene query syntax. Allowed Lucene
 |          queries: the _alias tag and a single value (possibly wildcarded). Examples:
 |          _alias:my-project _alias:_origin _alias:*pr* Supported in serverless only.
 |      :param rest_total_hits_as_int: If `true`, the response returns `hits.total` as
 |          an integer. If `false`, it returns `hits.total` as an object.
 |      :param search_type: The type of the search operation.
 |      :param typed_keys: If `true`, the response prefixes aggregation and suggester
 |          names with their respective types.
 |
 |  mtermvectors(self, *, index: Optional[str] = None, docs: Optional[Sequence[Mapping[str, Any]]] = None, error_trace: Optional[bool] = None, field_statistics: Optional[bool] = None, fields: Union[str, Sequence[str], NoneType] = None, filter_path: Union[str, Sequence[str], NoneType] = None, human: Optional[bool] = None, ids: Optional[Sequence[str]] = None, offsets: Optional[bool] = None, payloads: Optional[bool] = None, positions: Optional[bool] = None, preference: Optional[str] = None, pretty: Optional[bool] = None, realtime: Optional[bool] = None, routing: Union[str, Sequence[str], NoneType] = None, term_statistics: Optional[bool] = None, version: Optional[int] = None, version_type: Union[str, Literal['external', 'external_gte', 'internal'], NoneType] = None, body: Optional[Dict[str, Any]] = None) -> elastic_transport.ObjectApiResponse[typing.Any]
 |      .. raw:: html
 |
 |        <p>Get multiple term vectors.</p>
 |        <p>Get multiple term vectors with a single request.
 |        You can specify existing documents by index and ID or provide artificial documents in the body of the request.
 |        You can specify the index in the request body or request URI.
 |        The response contains a <code>docs</code> array with all the fetched termvectors.
 |        Each element has the structure provided by the termvectors API.</p>
 |        <p><strong>Artificial documents</strong></p>
 |        <p>You can also use <code>mtermvectors</code> to generate term vectors for artificial documents provided in the body of the request.
 |        The mapping used is determined by the specified <code>_index</code>.</p>
 |
 |
 |      `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-mtermvectors>`_
 |
 |      :param index: The name of the index that contains the documents.
 |      :param docs: An array of existing or artificial documents.
 |      :param field_statistics: If `true`, the response includes the document count,
 |          sum of document frequencies, and sum of total term frequencies.
 |      :param fields: A comma-separated list or wildcard expressions of fields to include
 |          in the statistics. It is used as the default list unless a specific field
 |          list is provided in the `completion_fields` or `fielddata_fields` parameters.
 |      :param ids: A simplified syntax to specify documents by their ID if they're in
 |          the same index.
 |      :param offsets: If `true`, the response includes term offsets.
 |      :param payloads: If `true`, the response includes term payloads.
 |      :param positions: If `true`, the response includes term positions.
 |      :param preference: The node or shard the operation should be performed on. It
 |          is random by default.
 |      :param realtime: If true, the request is real-time as opposed to near-real-time.
 |      :param routing: A custom value used to route operations to a specific shard.
 |      :param term_statistics: If true, the response includes term frequency and document
 |          frequency.
 |      :param version: If `true`, returns the document version as part of a hit.
 |      :param version_type: The version type.
 |
 |  open_point_in_time(self, *, index: Union[str, Sequence[str]], keep_alive: Union[str, Literal[-1], Literal[0]], allow_partial_search_results: Optional[bool] = None, error_trace: Optional[bool] = None, expand_wildcards: Union[Sequence[Union[str, Literal['all', 'closed', 'hidden', 'none', 'open']]], str, Literal['all', 'closed', 'hidden', 'none', 'open'], NoneType] = None, filter_path: Union[str, Sequence[str], NoneType] = None, human: Optional[bool] = None, ignore_unavailable: Optional[bool] = None, index_filter: Optional[Mapping[str, Any]] = None, max_concurrent_shard_requests: Optional[int] = None, preference: Optional[str] = None, pretty: Optional[bool] = None, project_routing: Optional[str] = None, routing: Union[str, Sequence[str], NoneType] = None, body: Optional[Dict[str, Any]] = None) -> elastic_transport.ObjectApiResponse[typing.Any]
 |      .. raw:: html
 |
 |        <p>Open a point in time.</p>
 |        <p>A search request by default runs against the most recent visible data of the target indices,
 |        which is called point in time. Elasticsearch pit (point in time) is a lightweight view into the
 |        state of the data as it existed when initiated. In some cases, it’s preferred to perform multiple
 |        search requests using the same point in time. For example, if refreshes happen between
 |        <code>search_after</code> requests, then the results of those requests might not be consistent as changes happening
 |        between searches are only visible to the more recent point in time.</p>
 |        <p>A point in time must be opened explicitly before being used in search requests.</p>
 |        <p>A subsequent search request with the <code>pit</code> parameter must not specify <code>index</code>, <code>routing</code>, or <code>preference</code> values as these parameters are copied from the point in time.</p>
 |        <p>Just like regular searches, you can use <code>from</code> and <code>size</code> to page through point in time search results, up to the first 10,000 hits.
 |        If you want to retrieve more hits, use PIT with <code>search_after</code>.</p>
 |        <p>IMPORTANT: The open point in time request and each subsequent search request can return different identifiers; always use the most recently received ID for the next search request.</p>
 |        <p>When a PIT that contains shard failures is used in a search request, the missing are always reported in the search response as a <code>NoShardAvailableActionException</code> exception.
 |        To get rid of these exceptions, a new PIT needs to be created so that shards missing from the previous PIT can be handled, assuming they become available in the meantime.</p>
 |        <p><strong>Keeping point in time alive</strong></p>
 |        <p>The <code>keep_alive</code> parameter, which is passed to a open point in time request and search request, extends the time to live of the corresponding point in time.
 |        The value does not need to be long enough to process all data — it just needs to be long enough for the next request.</p>
 |        <p>Normally, the background merge process optimizes the index by merging together smaller segments to create new, bigger segments.
 |        Once the smaller segments are no longer needed they are deleted.
 |        However, open point-in-times prevent the old segments from being deleted since they are still in use.</p>
 |        <p>TIP: Keeping older segments alive means that more disk space and file handles are needed.
 |        Ensure that you have configured your nodes to have ample free file handles.</p>
 |        <p>Additionally, if a segment contains deleted or updated documents then the point in time must keep track of whether each document in the segment was live at the time of the initial search request.
 |        Ensure that your nodes have sufficient heap space if you have many open point-in-times on an index that is subject to ongoing deletes or updates.
 |        Note that a point-in-time doesn't prevent its associated indices from being deleted.
 |        You can check how many point-in-times (that is, search contexts) are open with the nodes stats API.</p>
 |
 |
 |      `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation-open-point-in-time>`_
 |
 |      :param index: A comma-separated list of index names to open point in time; use
 |          `_all` or empty string to perform the operation on all indices
 |      :param keep_alive: Extend the length of time that the point in time persists.
 |      :param allow_partial_search_results: Indicates whether the point in time tolerates
 |          unavailable shards or shard failures when initially creating the PIT. If
 |          `false`, creating a point in time request when a shard is missing or unavailable
 |          will throw an exception. If `true`, the point in time will contain all the
 |          shards that are available at the time of the request.
 |      :param expand_wildcards: The type of index that wildcard patterns can match.
 |          If the request can target data streams, this argument determines whether
 |          wildcard expressions match hidden data streams. It supports comma-separated
 |          values, such as `open,hidden`.
 |      :param ignore_unavailable: If `false`, the request returns an error if it targets
 |          a concrete (non-wildcarded) index, alias, or data stream that is missing,
 |          closed, or otherwise unavailable. If `true`, unavailable concrete targets
 |          are silently ignored.
 |      :param index_filter: Filter indices if the provided query rewrites to `match_none`
 |          on every shard.
 |      :param max_concurrent_shard_requests: Maximum number of concurrent shard requests
 |          that each sub-search request executes per node.
 |      :param preference: The node or shard the operation should be performed on. By
 |          default, it is random.
 |      :param project_routing: Specifies a subset of projects to target for the PIT
 |          request using project metadata tags in a subset of Lucene query syntax. Allowed
 |          Lucene queries: the _alias tag and a single value (possibly wildcarded).
 |          Examples: _alias:my-project _alias:_origin _alias:*pr* Supported in serverless
 |          only.
 |      :param routing: A custom value that is used to route operations to a specific
 |          shard.
 |
 |  options(self: ~SelfType, *, opaque_id: Union[elastic_transport.client_utils.DefaultType, str] = <DEFAULT>, api_key: Union[elastic_transport.client_utils.DefaultType, str, Tuple[str, str]] = <DEFAULT>, basic_auth: Union[elastic_transport.client_utils.DefaultType, str, Tuple[str, str]] = <DEFAULT>, bearer_auth: Union[elastic_transport.client_utils.DefaultType, str] = <DEFAULT>, headers: Union[elastic_transport.client_utils.DefaultType, Mapping[str, str]] = <DEFAULT>, request_timeout: Union[elastic_transport.client_utils.DefaultType, float, NoneType] = <DEFAULT>, ignore_status: Union[elastic_transport.client_utils.DefaultType, int, Collection[int]] = <DEFAULT>, max_retries: Union[elastic_transport.client_utils.DefaultType, int] = <DEFAULT>, retry_on_status: Union[elastic_transport.client_utils.DefaultType, int, Collection[int]] = <DEFAULT>, retry_on_timeout: Union[elastic_transport.client_utils.DefaultType, bool] = <DEFAULT>, retry_backoff_base: Union[elastic_transport.client_utils.DefaultType, float] = <DEFAULT>, retry_backoff_cap: Union[elastic_transport.client_utils.DefaultType, float] = <DEFAULT>) -> ~SelfType
 |
 |  ping(self, *, error_trace: Optional[bool] = None, filter_path: Union[List[str], str, NoneType] = None, human: Optional[bool] = None, pretty: Optional[bool] = None) -> bool
 |      Returns True if a successful response returns from the info() API,
 |      otherwise returns False. This API call can fail either at the transport
 |      layer (due to connection errors or timeouts) or from a non-2XX HTTP response
 |      (due to authentication or authorization issues).
 |
 |      If you want to discover why the request failed you should use the ``info()`` API.
 |
 |      `<https://www.elastic.co/guide/en/elasticsearch/reference/current/index.html>`_
 |
 |  put_script(self, *, id: str, script: Optional[Mapping[str, Any]] = None, context: Optional[str] = None, error_trace: Optional[bool] = None, filter_path: Union[str, Sequence[str], NoneType] = None, human: Optional[bool] = None, master_timeout: Union[str, Literal[-1], Literal[0], NoneType] = None, pretty: Optional[bool] = None, timeout: Union[str, Literal[-1], Literal[0], NoneType] = None, body: Optional[Dict[str, Any]] = None) -> elastic_transport.ObjectApiResponse[typing.Any]
 |      .. raw:: html
 |
 |        <p>Create or update a script or search template.</p>
 |        <p>Creates or updates a stored script or search template.</p>
 |
 |
 |      `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation-put-script>`_
 |
 |      :param id: The identifier for the stored script or search template. It must be
 |          unique within the cluster.
 |      :param script: The script or search template, its parameters, and its language.
 |      :param context: The context in which the script or search template should run.
 |          To prevent errors, the API immediately compiles the script or template in
 |          this context.
 |      :param master_timeout: The period to wait for a connection to the master node.
 |          If no response is received before the timeout expires, the request fails
 |          and returns an error. It can also be set to `-1` to indicate that the request
 |          should never timeout.
 |      :param timeout: The period to wait for a response. If no response is received
 |          before the timeout expires, the request fails and returns an error. It can
 |          also be set to `-1` to indicate that the request should never timeout.
 |
 |  rank_eval(self, *, requests: Optional[Sequence[Mapping[str, Any]]] = None, index: Union[str, Sequence[str], NoneType] = None, allow_no_indices: Optional[bool] = None, error_trace: Optional[bool] = None, expand_wildcards: Union[Sequence[Union[str, Literal['all', 'closed', 'hidden', 'none', 'open']]], str, Literal['all', 'closed', 'hidden', 'none', 'open'], NoneType] = None, filter_path: Union[str, Sequence[str], NoneType] = None, human: Optional[bool] = None, ignore_unavailable: Optional[bool] = None, metric: Optional[Mapping[str, Any]] = None, pretty: Optional[bool] = None, search_type: Union[str, Literal['dfs_query_then_fetch', 'query_then_fetch'], NoneType] = None, body: Optional[Dict[str, Any]] = None) -> elastic_transport.ObjectApiResponse[typing.Any]
 |      .. raw:: html
 |
 |        <p>Evaluate ranked search results.</p>
 |        <p>Evaluate the quality of ranked search results over a set of typical search queries.</p>
 |
 |
 |      `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation-rank-eval>`_
 |
 |      :param requests: A set of typical search requests, together with their provided
 |          ratings.
 |      :param index: A comma-separated list of data streams, indices, and index aliases
 |          used to limit the request. Wildcard (`*`) expressions are supported. To target
 |          all data streams and indices in a cluster, omit this parameter or use `_all`
 |          or `*`.
 |      :param allow_no_indices: A setting that does two separate checks on the index
 |          expression. If `false`, the request returns an error (1) if any wildcard
 |          expression (including `_all` and `*`) resolves to zero matching indices or
 |          (2) if the complete set of resolved indices, aliases or data streams is empty
 |          after all expressions are evaluated. If `true`, index expressions that resolve
 |          to no indices are allowed and the request returns an empty result.
 |      :param expand_wildcards: Whether to expand wildcard expression to concrete indices
 |          that are open, closed or both.
 |      :param ignore_unavailable: If `false`, the request returns an error if it targets
 |          a concrete (non-wildcarded) index, alias, or data stream that is missing,
 |          closed, or otherwise unavailable. If `true`, unavailable concrete targets
 |          are silently ignored.
 |      :param metric: Definition of the evaluation metric to calculate.
 |      :param search_type: Search operation type
 |
 |  reindex(self, *, dest: Optional[Mapping[str, Any]] = None, source: Optional[Mapping[str, Any]] = None, conflicts: Union[str, Literal['abort', 'proceed'], NoneType] = None, error_trace: Optional[bool] = None, filter_path: Union[str, Sequence[str], NoneType] = None, human: Optional[bool] = None, max_docs: Optional[int] = None, pretty: Optional[bool] = None, refresh: Optional[bool] = None, requests_per_second: Optional[float] = None, require_alias: Optional[bool] = None, script: Optional[Mapping[str, Any]] = None, scroll: Union[str, Literal[-1], Literal[0], NoneType] = None, slices: Union[int, str, Literal['auto'], NoneType] = None, timeout: Union[str, Literal[-1], Literal[0], NoneType] = None, wait_for_active_shards: Union[int, str, Literal['all', 'index-setting'], NoneType] = None, wait_for_completion: Optional[bool] = None, body: Optional[Dict[str, Any]] = None) -> elastic_transport.ObjectApiResponse[typing.Any]
 |      .. raw:: html
 |
 |        <p>Reindex documents.</p>
 |        <p>Copy documents from a source to a destination.
 |        You can copy all documents to the destination index or reindex a subset of the documents.
 |        The source can be any existing index, alias, or data stream.
 |        The destination must differ from the source.
 |        For example, you cannot reindex a data stream into itself.</p>
 |        <p>IMPORTANT: Reindex requires <code>_source</code> to be enabled for all documents in the source.
 |        The destination should be configured as wanted before calling the reindex API.
 |        Reindex does not copy the settings from the source or its associated template.
 |        Mappings, shard counts, and replicas, for example, must be configured ahead of time.</p>
 |        <p>If the Elasticsearch security features are enabled, you must have the following security privileges:</p>
 |        <ul>
 |        <li>The <code>read</code> index privilege for the source data stream, index, or alias.</li>
 |        <li>The <code>write</code> index privilege for the destination data stream, index, or index alias.</li>
 |        <li>To automatically create a data stream or index with a reindex API request, you must have the <code>auto_configure</code>, <code>create_index</code>, or <code>manage</code> index privilege for the destination data stream, index, or alias.</li>
 |        <li>If reindexing from a remote cluster, the <code>source.remote.user</code> must have the <code>monitor</code> cluster privilege and the <code>read</code> index privilege for the source data stream, index, or alias.</li>
 |        </ul>
 |        <p>If reindexing from a remote cluster into a cluster using Elastic Stack, you must explicitly allow the remote host using the <code>reindex.remote.whitelist</code> node setting on the destination cluster.
 |        If reindexing from a remote cluster into an Elastic Cloud Serverless project, only remote hosts from Elastic Cloud Hosted are allowed.
 |        Automatic data stream creation requires a matching index template with data stream enabled.</p>
 |        <p>The <code>dest</code> element can be configured like the index API to control optimistic concurrency control.
 |        Omitting <code>version_type</code> or setting it to <code>internal</code> causes Elasticsearch to blindly dump documents into the destination, overwriting any that happen to have the same ID.</p>
 |        <p>Setting <code>version_type</code> to <code>external</code> causes Elasticsearch to preserve the <code>version</code> from the source, create any documents that are missing, and update any documents that have an older version in the destination than they do in the source.</p>
 |        <p>Setting <code>op_type</code> to <code>create</code> causes the reindex API to create only missing documents in the destination.
 |        All existing documents will cause a version conflict.</p>
 |        <p>IMPORTANT: Because data streams are append-only, any reindex request to a destination data stream must have an <code>op_type</code> of <code>create</code>.
 |        A reindex can only add new documents to a destination data stream.
 |        It cannot update existing documents in a destination data stream.</p>
 |        <p>By default, version conflicts abort the reindex process.
 |        To continue reindexing if there are conflicts, set the <code>conflicts</code> request body property to <code>proceed</code>.
 |        In this case, the response includes a count of the version conflicts that were encountered.
 |        Note that the handling of other error types is unaffected by the <code>conflicts</code> property.
 |        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>
 |        <p>It's recommended to reindex on indices with a green status. Reindexing can fail when a node shuts down or crashes.</p>
 |        <ul>
 |        <li>When requested with <code>wait_for_completion=true</code> (default), the request fails if the node shuts down.</li>
 |        <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.
 |        When retrying a failed reindex operation, it might be necessary to set <code>conflicts=proceed</code> or to first delete the partial destination index.
 |        Additionally, dry runs, checking disk space, and fetching index recovery information can help address the root cause.</li>
 |        </ul>
 |        <p>Refer to the linked documentation for examples of how to reindex documents.</p>
 |
 |
 |      `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-reindex>`_
 |
 |      :param dest: The destination you are copying to.
 |      :param source: The source you are copying from.
 |      :param conflicts: Indicates whether to continue reindexing even when there are
 |          conflicts.
 |      :param max_docs: The maximum number of documents to reindex. By default, all
 |          documents are reindexed. If it is a value less then or equal to `scroll_size`,
 |          a scroll will not be used to retrieve the results for the operation. If `conflicts`
 |          is set to `proceed`, the reindex operation could attempt to reindex more
 |          documents from the source than `max_docs` until it has successfully indexed
 |          `max_docs` documents into the target or it has gone through every document
 |          in the source query.
 |      :param refresh: If `true`, the request refreshes affected shards to make this
 |          operation visible to search.
 |      :param requests_per_second: The throttle for this request in sub-requests per
 |          second. By default, there is no throttle.
 |      :param require_alias: If `true`, the destination must be an index alias.
 |      :param script: The script to run to update the document source or metadata when
 |          reindexing.
 |      :param scroll: The period of time that a consistent view of the index should
 |          be maintained for scrolled search.
 |      :param slices: The number of slices this task should be divided into. It defaults
 |          to one slice, which means the task isn't sliced into subtasks. Reindex supports
 |          sliced scroll to parallelize the reindexing process. This parallelization
 |          can improve efficiency and provide a convenient way to break the request
 |          down into smaller parts. NOTE: Reindexing from remote clusters does not support
 |          manual or automatic slicing. If set to `auto`, Elasticsearch chooses the
 |          number of slices to use. This setting will use one slice per shard, up to
 |          a certain limit. If there are multiple sources, it will choose the number
 |          of slices based on the index or backing index with the smallest number of
 |          shards.
 |      :param timeout: The period each indexing waits for automatic index creation,
 |          dynamic mapping updates, and waiting for active shards. By default, Elasticsearch
 |          waits for at least one minute before failing. The actual wait time could
 |          be longer, particularly when multiple waits occur.
 |      :param wait_for_active_shards: The number of shard copies that must be active
 |          before proceeding with the operation. Set it to `all` or any positive integer
 |          up to the total number of shards in the index (`number_of_replicas+1`). The
 |          default value is one, which means it waits for each primary shard to be active.
 |      :param wait_for_completion: If `true`, the request blocks until the operation
 |          is complete.
 |
 |  reindex_rethrottle(self, *, task_id: str, requests_per_second: float, error_trace: Optional[bool] = None, filter_path: Union[str, Sequence[str], NoneType] = None, group_by: Union[str, Literal['nodes', 'none', 'parents'], NoneType] = None, human: Optional[bool] = None, pretty: Optional[bool] = None) -> elastic_transport.ObjectApiResponse[typing.Any]
 |      .. raw:: html
 |
 |        <p>Throttle a reindex operation.</p>
 |        <p>Change the number of requests per second for a particular reindex operation.
 |        For example:</p>
 |        <pre><code>POST _reindex/r1A2WoRbTwKZ516z6NEs5A:36619/_rethrottle?requests_per_second=-1
 |        </code></pre>
 |        <p>Rethrottling that speeds up the query takes effect immediately.
 |        Rethrottling that slows down the query will take effect after completing the current batch.
 |        This behavior prevents scroll timeouts.</p>
 |
 |
 |      `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-reindex>`_
 |
 |      :param task_id: The task identifier, which can be found by using the tasks API.
 |      :param requests_per_second: The throttle for this request in sub-requests per
 |          second. It can be either `-1` to turn off throttling or any decimal number
 |          like `1.7` or `12` to throttle to that level.
 |      :param group_by:
 |
 |  render_search_template(self, *, id: Optional[str] = None, error_trace: Optional[bool] = None, file: Optional[str] = None, filter_path: Union[str, Sequence[str], NoneType] = None, human: Optional[bool] = None, params: Optional[Mapping[str, Any]] = None, pretty: Optional[bool] = None, source: Union[str, Mapping[str, Any], NoneType] = None, body: Optional[Dict[str, Any]] = None) -> elastic_transport.ObjectApiResponse[typing.Any]
 |      .. raw:: html
 |
 |        <p>Render a search template.</p>
 |        <p>Render a search template as a search request body.</p>
 |
 |
 |      `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation-render-search-template>`_
 |
 |      :param id: The ID of the search template to render. If no `source` is specified,
 |          this or the `id` request body parameter is required.
 |      :param file:
 |      :param params: Key-value pairs used to replace Mustache variables in the template.
 |          The key is the variable name. The value is the variable value.
 |      :param source: An inline search template. It supports the same parameters as
 |          the search API's request body. These parameters also support Mustache variables.
 |          If no `id` or `<templated-id>` is specified, this parameter is required.
 |
 |  scripts_painless_execute(self, *, context: Union[str, Literal['boolean_field', 'composite_field', 'date_field', 'double_field', 'filter', 'geo_point_field', 'ip_field', 'keyword_field', 'long_field', 'painless_test', 'score'], NoneType] = None, context_setup: Optional[Mapping[str, Any]] = None, error_trace: Optional[bool] = None, filter_path: Union[str, Sequence[str], NoneType] = None, human: Optional[bool] = None, pretty: Optional[bool] = None, script: Optional[Mapping[str, Any]] = None, body: Optional[Dict[str, Any]] = None) -> elastic_transport.ObjectApiResponse[typing.Any]
 |      .. raw:: html
 |
 |        <p>Run a script.</p>
 |        <p>Runs a script and returns a result.
 |        Use this API to build and test scripts, such as when defining a script for a runtime field.
 |        This API requires very few dependencies and is especially useful if you don't have permissions to write documents on a cluster.</p>
 |        <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>
 |        <p>Each context requires a script, but additional parameters depend on the context you're using for that script.</p>
 |
 |
 |      `<https://www.elastic.co/docs/reference/scripting-languages/painless/painless-api-examples>`_
 |
 |      :param context: The context that the script should run in. NOTE: Result ordering
 |          in the field contexts is not guaranteed.
 |      :param context_setup: Additional parameters for the `context`. NOTE: This parameter
 |          is required for all contexts except `painless_test`, which is the default
 |          if no value is provided for `context`.
 |      :param script: The Painless script to run.
 |
 |  scroll(self, *, scroll_id: Optional[str] = None, error_trace: Optional[bool] = None, filter_path: Union[str, Sequence[str], NoneType] = None, human: Optional[bool] = None, pretty: Optional[bool] = None, rest_total_hits_as_int: Optional[bool] = None, scroll: Union[str, Literal[-1], Literal[0], NoneType] = None, body: Optional[Dict[str, Any]] = None) -> elastic_transport.ObjectApiResponse[typing.Any]
 |      .. raw:: html
 |
 |        <p>Run a scrolling search.</p>
 |        <p>IMPORTANT: The scroll API is no longer recommend for deep pagination. If you need to preserve the index state while paging through more than 10,000 hits, use the <code>search_after</code> parameter with a point in time (PIT).</p>
 |        <p>The scroll API gets large sets of results from a single scrolling search request.
 |        To get the necessary scroll ID, submit a search API request that includes an argument for the <code>scroll</code> query parameter.
 |        The <code>scroll</code> parameter indicates how long Elasticsearch should retain the search context for the request.
 |        The search response returns a scroll ID in the <code>_scroll_id</code> response body parameter.
 |        You can then use the scroll ID with the scroll API to retrieve the next batch of results for the request.
 |        If the Elasticsearch security features are enabled, the access to the results of a specific scroll ID is restricted to the user or API key that submitted the search.</p>
 |        <p>You can also use the scroll API to specify a new scroll parameter that extends or shortens the retention period for the search context.</p>
 |        <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>
 |
 |
 |      `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation-scroll>`_
 |
 |      :param scroll_id: The scroll ID of the search.
 |      :param rest_total_hits_as_int: If true, the API response’s hit.total property
 |          is returned as an integer. If false, the API response’s hit.total property
 |          is returned as an object.
 |      :param scroll: The period to retain the search context for scrolling.
 |
 |  search(self, *, index: Union[str, Sequence[str], NoneType] = None, aggregations: Optional[Mapping[str, Mapping[str, Any]]] = None, aggs: Optional[Mapping[str, Mapping[str, Any]]] = None, allow_no_indices: Optional[bool] = None, allow_partial_search_results: Optional[bool] = None, analyze_wildcard: Optional[bool] = None, analyzer: Optional[str] = None, batched_reduce_size: Optional[int] = None, ccs_minimize_roundtrips: Optional[bool] = None, collapse: Optional[Mapping[str, Any]] = None, default_operator: Union[str, Literal['and', 'or'], NoneType] = None, df: Optional[str] = None, docvalue_fields: Optional[Sequence[Mapping[str, Any]]] = None, error_trace: Optional[bool] = None, expand_wildcards: Union[Sequence[Union[str, Literal['all', 'closed', 'hidden', 'none', 'open']]], str, Literal['all', 'closed', 'hidden', 'none', 'open'], NoneType] = None, explain: Optional[bool] = None, ext: Optional[Mapping[str, Any]] = None, fields: Optional[Sequence[Mapping[str, Any]]] = None, filter_path: Union[str, Sequence[str], NoneType] = None, force_synthetic_source: Optional[bool] = None, from_: Optional[int] = None, highlight: Optional[Mapping[str, Any]] = None, human: Optional[bool] = None, ignore_throttled: Optional[bool] = None, ignore_unavailable: Optional[bool] = None, include_named_queries_score: Optional[bool] = None, indices_boost: Optional[Sequence[Mapping[str, float]]] = None, knn: Union[Mapping[str, Any], Sequence[Mapping[str, Any]], NoneType] = None, lenient: Optional[bool] = None, max_concurrent_shard_requests: Optional[int] = None, min_score: Optional[float] = None, pit: Optional[Mapping[str, Any]] = None, post_filter: Optional[Mapping[str, Any]] = None, pre_filter_shard_size: Optional[int] = None, preference: Optional[str] = None, pretty: Optional[bool] = None, profile: Optional[bool] = None, project_routing: Optional[str] = None, q: Optional[str] = None, query: Optional[Mapping[str, Any]] = None, rank: Optional[Mapping[str, Any]] = None, request_cache: Optional[bool] = None, rescore: Union[Mapping[str, Any], Sequence[Mapping[str, Any]], NoneType] = None, rest_total_hits_as_int: Optional[bool] = None, retriever: Optional[Mapping[str, Any]] = None, routing: Union[str, Sequence[str], NoneType] = None, runtime_mappings: Optional[Mapping[str, Mapping[str, Any]]] = None, script_fields: Optional[Mapping[str, Mapping[str, Any]]] = None, scroll: Union[str, Literal[-1], Literal[0], NoneType] = None, search_after: Optional[Sequence[Union[NoneType, bool, float, int, str]]] = None, search_type: Union[str, Literal['dfs_query_then_fetch', 'query_then_fetch'], NoneType] = None, seq_no_primary_term: Optional[bool] = None, size: Optional[int] = None, slice: Optional[Mapping[str, Any]] = None, sort: Union[Sequence[Union[str, Mapping[str, Any]]], str, Mapping[str, Any], NoneType] = None, source: Union[bool, Mapping[str, Any], NoneType] = None, source_exclude_vectors: Optional[bool] = None, source_excludes: Union[str, Sequence[str], NoneType] = None, source_includes: Union[str, Sequence[str], NoneType] = None, stats: Optional[Sequence[str]] = None, stored_fields: Union[str, Sequence[str], NoneType] = None, suggest: Optional[Mapping[str, Any]] = None, suggest_field: Optional[str] = None, suggest_mode: Union[str, Literal['always', 'missing', 'popular'], NoneType] = None, suggest_size: Optional[int] = None, suggest_text: Optional[str] = None, terminate_after: Optional[int] = None, timeout: Optional[str] = None, track_scores: Optional[bool] = None, track_total_hits: Union[bool, int, NoneType] = None, typed_keys: Optional[bool] = None, version: Optional[bool] = None, body: Optional[Dict[str, Any]] = None) -> elastic_transport.ObjectApiResponse[typing.Any]
 |      .. raw:: html
 |
 |        <p>Run a search.</p>
 |        <p>Get search hits that match the query defined in the request.
 |        You can provide search queries using the <code>q</code> query string parameter or the request body.
 |        If both are specified, only the query parameter is used.</p>
 |        <p>If the Elasticsearch security features are enabled, you must have the read index privilege for the target data stream, index, or alias. For cross-cluster search, refer to the documentation about configuring CCS privileges.
 |        To search a point in time (PIT) for an alias, you must have the <code>read</code> index privilege for the alias's data streams or indices.</p>
 |        <p><strong>Search slicing</strong></p>
 |        <p>When paging through a large number of documents, it can be helpful to split the search into multiple slices to consume them independently with the <code>slice</code> and <code>pit</code> properties.
 |        By default the splitting is done first on the shards, then locally on each shard.</p>
 |        <p>For instance if the number of shards is equal to 2 and you request 4 slices, the slices 0 and 2 are assigned to the first shard and the slices 1 and 3 are assigned to the second shard.</p>
 |        <p>IMPORTANT: The same point-in-time ID should be used for all slices.
 |        If different PIT IDs are used, slices can overlap and miss documents.
 |        This situation can occur because, by default, the splitting criterion is based on Lucene document IDs, which are not stable across changes to the index.</p>
 |
 |
 |      `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation-search>`_
 |
 |      :param index: A comma-separated list of data streams, indices, and aliases to
 |          search. It supports wildcards (`*`). To search all data streams and indices,
 |          omit this parameter or use `*` or `_all`.
 |      :param aggregations: Defines the aggregations that are run as part of the search
 |          request.
 |      :param aggs: Defines the aggregations that are run as part of the search request.
 |      :param allow_no_indices: A setting that does two separate checks on the index
 |          expression. If `false`, the request returns an error (1) if any wildcard
 |          expression (including `_all` and `*`) resolves to zero matching indices or
 |          (2) if the complete set of resolved indices, aliases or data streams is empty
 |          after all expressions are evaluated. If `true`, index expressions that resolve
 |          to no indices are allowed and the request returns an empty result.
 |      :param allow_partial_search_results: If `true` and there are shard request timeouts
 |          or shard failures, the request returns partial results. If `false`, it returns
 |          an error with no partial results. To override the default behavior, you can
 |          set the `search.default_allow_partial_results` cluster setting to `false`.
 |      :param analyze_wildcard: If `true`, wildcard and prefix queries are analyzed.
 |          This parameter can be used only when the `q` query string parameter is specified.
 |      :param analyzer: The analyzer to use for the query string. This parameter can
 |          be used only when the `q` query string parameter is specified.
 |      :param batched_reduce_size: The number of shard results that should be reduced
 |          at once on the coordinating node. If the potential number of shards in the
 |          request can be large, this value should be used as a protection mechanism
 |          to reduce the memory overhead per search request.
 |      :param ccs_minimize_roundtrips: If `true`, network round-trips between the coordinating
 |          node and the remote clusters are minimized when running cross-cluster search
 |          (CCS) requests.
 |      :param collapse: Collapses search results the values of the specified field.
 |      :param default_operator: The default operator for the query string query: `and`
 |          or `or`. This parameter can be used only when the `q` query string parameter
 |          is specified.
 |      :param df: The field to use as a default when no field prefix is given in the
 |          query string. This parameter can be used only when the `q` query string parameter
 |          is specified.
 |      :param docvalue_fields: An array of wildcard (`*`) field patterns. The request
 |          returns doc values for field names matching these patterns in the `hits.fields`
 |          property of the response.
 |      :param expand_wildcards: The type of index that wildcard patterns can match.
 |          If the request can target data streams, this argument determines whether
 |          wildcard expressions match hidden data streams. It supports comma-separated
 |          values such as `open,hidden`.
 |      :param explain: If `true`, the request returns detailed information about score
 |          computation as part of a hit.
 |      :param ext: Configuration of search extensions defined by Elasticsearch plugins.
 |      :param fields: An array of wildcard (`*`) field patterns. The request returns
 |          values for field names matching these patterns in the `hits.fields` property
 |          of the response.
 |      :param force_synthetic_source: Should this request force synthetic _source? Use
 |          this to test if the mapping supports synthetic _source and to get a sense
 |          of the worst case performance. Fetches with this enabled will be slower the
 |          enabling synthetic source natively in the index.
 |      :param from_: The starting document offset, which must be non-negative. By default,
 |          you cannot page through more than 10,000 hits using the `from` and `size`
 |          parameters. To page through more hits, use the `search_after` parameter.
 |      :param highlight: Specifies the highlighter to use for retrieving highlighted
 |          snippets from one or more fields in your search results.
 |      :param ignore_throttled: If `true`, concrete, expanded or aliased indices will
 |          be ignored when frozen.
 |      :param ignore_unavailable: If `false`, the request returns an error if it targets
 |          a concrete (non-wildcarded) index, alias, or data stream that is missing,
 |          closed, or otherwise unavailable. If `true`, unavailable concrete targets
 |          are silently ignored.
 |      :param include_named_queries_score: If `true`, the response includes the score
 |          contribution from any named queries. This functionality reruns each named
 |          query on every hit in a search response. Typically, this adds a small overhead
 |          to a request. However, using computationally expensive named queries on a
 |          large number of hits may add significant overhead.
 |      :param indices_boost: Boost the `_score` of documents from specified indices.
 |          The boost value is the factor by which scores are multiplied. A boost value
 |          greater than `1.0` increases the score. A boost value between `0` and `1.0`
 |          decreases the score.
 |      :param knn: The approximate kNN search to run.
 |      :param lenient: If `true`, format-based query failures (such as providing text
 |          to a numeric field) in the query string will be ignored. This parameter can
 |          be used only when the `q` query string parameter is specified.
 |      :param max_concurrent_shard_requests: The number of concurrent shard requests
 |          per node that the search runs concurrently. This value should be used to
 |          limit the impact of the search on the cluster in order to limit the number
 |          of concurrent shard requests.
 |      :param min_score: The minimum `_score` for matching documents. Documents with
 |          a lower `_score` are not included in search results and results collected
 |          by aggregations.
 |      :param pit: Limit the search to a point in time (PIT). If you provide a PIT,
 |          you cannot specify an `<index>` in the request path.
 |      :param post_filter: Use the `post_filter` parameter to filter search results.
 |          The search hits are filtered after the aggregations are calculated. A post
 |          filter has no impact on the aggregation results.
 |      :param pre_filter_shard_size: A threshold that enforces a pre-filter roundtrip
 |          to prefilter search shards based on query rewriting if the number of shards
 |          the search request expands to exceeds the threshold. This filter roundtrip
 |          can limit the number of shards significantly if for instance a shard can
 |          not match any documents based on its rewrite method (if date filters are
 |          mandatory to match but the shard bounds and the query are disjoint). When
 |          unspecified, the pre-filter phase is executed if any of these conditions
 |          is met: * The request targets more than 128 shards. * The request targets
 |          one or more read-only index. * The primary sort of the query targets an indexed
 |          field.
 |      :param preference: The nodes and shards used for the search. By default, Elasticsearch
 |          selects from eligible nodes and shards using adaptive replica selection,
 |          accounting for allocation awareness. Valid values are: * `_only_local` to
 |          run the search only on shards on the local node. * `_local` to, if possible,
 |          run the search on shards on the local node, or if not, select shards using
 |          the default method. * `_only_nodes:<node-id>,<node-id>` to run the search
 |          on only the specified nodes IDs. If suitable shards exist on more than one
 |          selected node, use shards on those nodes using the default method. If none
 |          of the specified nodes are available, select shards from any available node
 |          using the default method. * `_prefer_nodes:<node-id>,<node-id>` to if possible,
 |          run the search on the specified nodes IDs. If not, select shards using the
 |          default method. * `_shards:<shard>,<shard>` to run the search only on the
 |          specified shards. You can combine this value with other `preference` values.
 |          However, the `_shards` value must come first. For example: `_shards:2,3|_local`.
 |          * `<custom-string>` (any string that does not start with `_`) to route searches
 |          with the same `<custom-string>` to the same shards in the same order.
 |      :param profile: Set to `true` to return detailed timing information about the
 |          execution of individual components in a search request. NOTE: This is a debugging
 |          tool and adds significant overhead to search execution.
 |      :param project_routing: Specifies a subset of projects to target for the search
 |          using project metadata tags in a subset of Lucene query syntax. Allowed Lucene
 |          queries: the _alias tag and a single value (possibly wildcarded). Examples:
 |          _alias:my-project _alias:_origin _alias:*pr* Supported in serverless only.
 |      :param q: A query in the Lucene query string syntax. Query parameter searches
 |          do not support the full Elasticsearch Query DSL but are handy for testing.
 |          IMPORTANT: This parameter overrides the query parameter in the request body.
 |          If both parameters are specified, documents matching the query request body
 |          parameter are not returned.
 |      :param query: The search definition using the Query DSL.
 |      :param rank: The Reciprocal Rank Fusion (RRF) to use.
 |      :param request_cache: If `true`, the caching of search results is enabled for
 |          requests where `size` is `0`. It defaults to index level settings.
 |      :param rescore: Can be used to improve precision by reordering just the top (for
 |          example 100 - 500) documents returned by the `query` and `post_filter` phases.
 |      :param rest_total_hits_as_int: Indicates whether `hits.total` should be rendered
 |          as an integer or an object in the rest search response.
 |      :param retriever: A retriever is a specification to describe top documents returned
 |          from a search. A retriever replaces other elements of the search API that
 |          also return top documents such as `query` and `knn`.
 |      :param routing: A custom value that is used to route operations to a specific
 |          shard.
 |      :param runtime_mappings: One or more runtime fields in the search request. These
 |          fields take precedence over mapped fields with the same name.
 |      :param script_fields: Retrieve a script evaluation (based on different fields)
 |          for each hit.
 |      :param scroll: The period to retain the search context for scrolling. By default,
 |          this value cannot exceed `1d` (24 hours). You can change this limit by using
 |          the `search.max_keep_alive` cluster-level setting.
 |      :param search_after: Used to retrieve the next page of hits using a set of sort
 |          values from the previous page.
 |      :param search_type: Indicates how distributed term frequencies are calculated
 |          for relevance scoring.
 |      :param seq_no_primary_term: If `true`, the request returns sequence number and
 |          primary term of the last modification of each hit.
 |      :param size: The number of hits to return, which must not be negative. By default,
 |          you cannot page through more than 10,000 hits using the `from` and `size`
 |          parameters. To page through more hits, use the `search_after` property.
 |      :param slice: Split a scrolled search into multiple slices that can be consumed
 |          independently.
 |      :param sort: A comma-separated list of <field>:<direction> pairs.
 |      :param source: The source fields that are returned for matching documents. These
 |          fields are returned in the `hits._source` property of the search response.
 |          If the `stored_fields` property is specified, the `_source` property defaults
 |          to `false`. Otherwise, it defaults to `true`.
 |      :param source_exclude_vectors: Whether vectors should be excluded from _source
 |      :param source_excludes: A comma-separated list of source fields to exclude from
 |          the response. You can also use this parameter to exclude fields from the
 |          subset specified in `_source_includes` query parameter. If the `_source`
 |          parameter is `false`, this parameter is ignored.
 |      :param source_includes: A comma-separated list of source fields to include in
 |          the response. If this parameter is specified, only these source fields are
 |          returned. You can exclude fields from this subset using the `_source_excludes`
 |          query parameter. If the `_source` parameter is `false`, this parameter is
 |          ignored.
 |      :param stats: The stats groups to associate with the search. Each group maintains
 |          a statistics aggregation for its associated searches. You can retrieve these
 |          stats using the indices stats API.
 |      :param stored_fields: A comma-separated list of stored fields to return as part
 |          of a hit. If no fields are specified, no stored fields are included in the
 |          response. If this field is specified, the `_source` property defaults to
 |          `false`. You can pass `_source: true` to return both source fields and stored
 |          fields in the search response.
 |      :param suggest: Defines a suggester that provides similar looking terms based
 |          on a provided text.
 |      :param suggest_field: The field to use for suggestions.
 |      :param suggest_mode: The suggest mode. This parameter can be used only when the
 |          `suggest_field` and `suggest_text` query string parameters are specified.
 |      :param suggest_size: The number of suggestions to return. This parameter can
 |          be used only when the `suggest_field` and `suggest_text` query string parameters
 |          are specified.
 |      :param suggest_text: The source text for which the suggestions should be returned.
 |          This parameter can be used only when the `suggest_field` and `suggest_text`
 |          query string parameters are specified.
 |      :param terminate_after: The maximum number of documents to collect for each shard.
 |          If a query reaches this limit, Elasticsearch terminates the query early.
 |          Elasticsearch collects documents before sorting. IMPORTANT: Use with caution.
 |          Elasticsearch applies this property to each shard handling the request. When
 |          possible, let Elasticsearch perform early termination automatically. Avoid
 |          specifying this property for requests that target data streams with backing
 |          indices across multiple data tiers. If set to `0` (default), the query does
 |          not terminate early.
 |      :param timeout: The period of time to wait for a response from each shard. If
 |          no response is received before the timeout expires, the request fails and
 |          returns an error. Defaults to no timeout.
 |      :param track_scores: If `true`, calculate and return document scores, even if
 |          the scores are not used for sorting.
 |      :param track_total_hits: Number of hits matching the query to count accurately.
 |          If `true`, the exact number of hits is returned at the cost of some performance.
 |          If `false`, the response does not include the total number of hits matching
 |          the query.
 |      :param typed_keys: If `true`, aggregation and suggester names are be prefixed
 |          by their respective types in the response.
 |      :param version: If `true`, the request returns the document version as part of
 |          a hit.
 |
 |  search_mvt(self, *, index: Union[str, Sequence[str]], field: str, zoom: int, x: int, y: int, aggs: Optional[Mapping[str, Mapping[str, Any]]] = None, buffer: Optional[int] = None, error_trace: Optional[bool] = None, exact_bounds: Optional[bool] = None, extent: Optional[int] = None, fields: Union[str, Sequence[str], NoneType] = None, filter_path: Union[str, Sequence[str], NoneType] = None, grid_agg: Union[str, Literal['geohex', 'geotile'], NoneType] = None, grid_precision: Optional[int] = None, grid_type: Union[str, Literal['centroid', 'grid', 'point'], NoneType] = None, human: Optional[bool] = None, pretty: Optional[bool] = None, project_routing: Optional[str] = None, query: Optional[Mapping[str, Any]] = None, runtime_mappings: Optional[Mapping[str, Mapping[str, Any]]] = None, size: Optional[int] = None, sort: Union[Sequence[Union[str, Mapping[str, Any]]], str, Mapping[str, Any], NoneType] = None, track_total_hits: Union[bool, int, NoneType] = None, with_labels: Optional[bool] = None, body: Optional[Dict[str, Any]] = None) -> elastic_transport.BinaryApiResponse
 |      .. raw:: html
 |
 |        <p>Search a vector tile.</p>
 |        <p>Search a vector tile for geospatial values.
 |        Before using this API, you should be familiar with the Mapbox vector tile specification.
 |        The API returns results as a binary mapbox vector tile.</p>
 |        <p>Internally, Elasticsearch translates a vector tile search API request into a search containing:</p>
 |        <ul>
 |        <li>A <code>geo_bounding_box</code> query on the <code>&lt;field&gt;</code>. The query uses the <code>&lt;zoom&gt;/&lt;x&gt;/&lt;y&gt;</code> tile as a bounding box.</li>
 |        <li>A <code>geotile_grid</code> or <code>geohex_grid</code> aggregation on the <code>&lt;field&gt;</code>. The <code>grid_agg</code> parameter determines the aggregation type. The aggregation uses the <code>&lt;zoom&gt;/&lt;x&gt;/&lt;y&gt;</code> tile as a bounding box.</li>
 |        <li>Optionally, a <code>geo_bounds</code> aggregation on the <code>&lt;field&gt;</code>. The search only includes this aggregation if the <code>exact_bounds</code> parameter is <code>true</code>.</li>
 |        <li>If the optional parameter <code>with_labels</code> is <code>true</code>, the internal search will include a dynamic runtime field that calls the <code>getLabelPosition</code> function of the geometry doc value. This enables the generation of new point features containing suggested geometry labels, so that, for example, multi-polygons will have only one label.</li>
 |        </ul>
 |        <p>The API returns results as a binary Mapbox vector tile.
 |        Mapbox vector tiles are encoded as Google Protobufs (PBF). By default, the tile contains three layers:</p>
 |        <ul>
 |        <li>A <code>hits</code> layer containing a feature for each <code>&lt;field&gt;</code> value matching the <code>geo_bounding_box</code> query.</li>
 |        <li>An <code>aggs</code> layer containing a feature for each cell of the <code>geotile_grid</code> or <code>geohex_grid</code>. The layer only contains features for cells with matching data.</li>
 |        <li>A meta layer containing:
 |        <ul>
 |        <li>A feature containing a bounding box. By default, this is the bounding box of the tile.</li>
 |        <li>Value ranges for any sub-aggregations on the <code>geotile_grid</code> or <code>geohex_grid</code>.</li>
 |        <li>Metadata for the search.</li>
 |        </ul>
 |        </li>
 |        </ul>
 |        <p>The API only returns features that can display at its zoom level.
 |        For example, if a polygon feature has no area at its zoom level, the API omits it.
 |        The API returns errors as UTF-8 encoded JSON.</p>
 |        <p>IMPORTANT: You can specify several options for this API as either a query parameter or request body parameter.
 |        If you specify both parameters, the query parameter takes precedence.</p>
 |        <p><strong>Grid precision for geotile</strong></p>
 |        <p>For a <code>grid_agg</code> of <code>geotile</code>, you can use cells in the <code>aggs</code> layer as tiles for lower zoom levels.
 |        <code>grid_precision</code> represents the additional zoom levels available through these cells. The final precision is computed by as follows: <code>&lt;zoom&gt; + grid_precision</code>.
 |        For example, if <code>&lt;zoom&gt;</code> is 7 and <code>grid_precision</code> is 8, then the <code>geotile_grid</code> aggregation will use a precision of 15.
 |        The maximum final precision is 29.
 |        The <code>grid_precision</code> also determines the number of cells for the grid as follows: <code>(2^grid_precision) x (2^grid_precision)</code>.
 |        For example, a value of 8 divides the tile into a grid of 256 x 256 cells.
 |        The <code>aggs</code> layer only contains features for cells with matching data.</p>
 |        <p><strong>Grid precision for geohex</strong></p>
 |        <p>For a <code>grid_agg</code> of <code>geohex</code>, Elasticsearch uses <code>&lt;zoom&gt;</code> and <code>grid_precision</code> to calculate a final precision as follows: <code>&lt;zoom&gt; + grid_precision</code>.</p>
 |        <p>This precision determines the H3 resolution of the hexagonal cells produced by the <code>geohex</code> aggregation.
 |        The following table maps the H3 resolution for each precision.
 |        For example, if <code>&lt;zoom&gt;</code> is 3 and <code>grid_precision</code> is 3, the precision is 6.
 |        At a precision of 6, hexagonal cells have an H3 resolution of 2.
 |        If <code>&lt;zoom&gt;</code> is 3 and <code>grid_precision</code> is 4, the precision is 7.
 |        At a precision of 7, hexagonal cells have an H3 resolution of 3.</p>
 |        <table>
 |        <thead>
 |        <tr>
 |        <th>Precision</th>
 |        <th>Unique tile bins</th>
 |        <th>H3 resolution</th>
 |        <th>Unique hex bins</th>
 |        <th>Ratio</th>
 |        </tr>
 |        </thead>
 |        <tbody>
 |        <tr>
 |        <td>1</td>
 |        <td>4</td>
 |        <td>0</td>
 |        <td>122</td>
 |        <td>30.5</td>
 |        </tr>
 |        <tr>
 |        <td>2</td>
 |        <td>16</td>
 |        <td>0</td>
 |        <td>122</td>
 |        <td>7.625</td>
 |        </tr>
 |        <tr>
 |        <td>3</td>
 |        <td>64</td>
 |        <td>1</td>
 |        <td>842</td>
 |        <td>13.15625</td>
 |        </tr>
 |        <tr>
 |        <td>4</td>
 |        <td>256</td>
 |        <td>1</td>
 |        <td>842</td>
 |        <td>3.2890625</td>
 |        </tr>
 |        <tr>
 |        <td>5</td>
 |        <td>1024</td>
 |        <td>2</td>
 |        <td>5882</td>
 |        <td>5.744140625</td>
 |        </tr>
 |        <tr>
 |        <td>6</td>
 |        <td>4096</td>
 |        <td>2</td>
 |        <td>5882</td>
 |        <td>1.436035156</td>
 |        </tr>
 |        <tr>
 |        <td>7</td>
 |        <td>16384</td>
 |        <td>3</td>
 |        <td>41162</td>
 |        <td>2.512329102</td>
 |        </tr>
 |        <tr>
 |        <td>8</td>
 |        <td>65536</td>
 |        <td>3</td>
 |        <td>41162</td>
 |        <td>0.6280822754</td>
 |        </tr>
 |        <tr>
 |        <td>9</td>
 |        <td>262144</td>
 |        <td>4</td>
 |        <td>288122</td>
 |        <td>1.099098206</td>
 |        </tr>
 |        <tr>
 |        <td>10</td>
 |        <td>1048576</td>
 |        <td>4</td>
 |        <td>288122</td>
 |        <td>0.2747745514</td>
 |        </tr>
 |        <tr>
 |        <td>11</td>
 |        <td>4194304</td>
 |        <td>5</td>
 |        <td>2016842</td>
 |        <td>0.4808526039</td>
 |        </tr>
 |        <tr>
 |        <td>12</td>
 |        <td>16777216</td>
 |        <td>6</td>
 |        <td>14117882</td>
 |        <td>0.8414913416</td>
 |        </tr>
 |        <tr>
 |        <td>13</td>
 |        <td>67108864</td>
 |        <td>6</td>
 |        <td>14117882</td>
 |        <td>0.2103728354</td>
 |        </tr>
 |        <tr>
 |        <td>14</td>
 |        <td>268435456</td>
 |        <td>7</td>
 |        <td>98825162</td>
 |        <td>0.3681524172</td>
 |        </tr>
 |        <tr>
 |        <td>15</td>
 |        <td>1073741824</td>
 |        <td>8</td>
 |        <td>691776122</td>
 |        <td>0.644266719</td>
 |        </tr>
 |        <tr>
 |        <td>16</td>
 |        <td>4294967296</td>
 |        <td>8</td>
 |        <td>691776122</td>
 |        <td>0.1610666797</td>
 |        </tr>
 |        <tr>
 |        <td>17</td>
 |        <td>17179869184</td>
 |        <td>9</td>
 |        <td>4842432842</td>
 |        <td>0.2818666889</td>
 |        </tr>
 |        <tr>
 |        <td>18</td>
 |        <td>68719476736</td>
 |        <td>10</td>
 |        <td>33897029882</td>
 |        <td>0.4932667053</td>
 |        </tr>
 |        <tr>
 |        <td>19</td>
 |        <td>274877906944</td>
 |        <td>11</td>
 |        <td>237279209162</td>
 |        <td>0.8632167343</td>
 |        </tr>
 |        <tr>
 |        <td>20</td>
 |        <td>1099511627776</td>
 |        <td>11</td>
 |        <td>237279209162</td>
 |        <td>0.2158041836</td>
 |        </tr>
 |        <tr>
 |        <td>21</td>
 |        <td>4398046511104</td>
 |        <td>12</td>
 |        <td>1660954464122</td>
 |        <td>0.3776573213</td>
 |        </tr>
 |        <tr>
 |        <td>22</td>
 |        <td>17592186044416</td>
 |        <td>13</td>
 |        <td>11626681248842</td>
 |        <td>0.6609003122</td>
 |        </tr>
 |        <tr>
 |        <td>23</td>
 |        <td>70368744177664</td>
 |        <td>13</td>
 |        <td>11626681248842</td>
 |        <td>0.165225078</td>
 |        </tr>
 |        <tr>
 |        <td>24</td>
 |        <td>281474976710656</td>
 |        <td>14</td>
 |        <td>81386768741882</td>
 |        <td>0.2891438866</td>
 |        </tr>
 |        <tr>
 |        <td>25</td>
 |        <td>1125899906842620</td>
 |        <td>15</td>
 |        <td>569707381193162</td>
 |        <td>0.5060018015</td>
 |        </tr>
 |        <tr>
 |        <td>26</td>
 |        <td>4503599627370500</td>
 |        <td>15</td>
 |        <td>569707381193162</td>
 |        <td>0.1265004504</td>
 |        </tr>
 |        <tr>
 |        <td>27</td>
 |        <td>18014398509482000</td>
 |        <td>15</td>
 |        <td>569707381193162</td>
 |        <td>0.03162511259</td>
 |        </tr>
 |        <tr>
 |        <td>28</td>
 |        <td>72057594037927900</td>
 |        <td>15</td>
 |        <td>569707381193162</td>
 |        <td>0.007906278149</td>
 |        </tr>
 |        <tr>
 |        <td>29</td>
 |        <td>288230376151712000</td>
 |        <td>15</td>
 |        <td>569707381193162</td>
 |        <td>0.001976569537</td>
 |        </tr>
 |        </tbody>
 |        </table>
 |        <p>Hexagonal cells don't align perfectly on a vector tile.
 |        Some cells may intersect more than one vector tile.
 |        To compute the H3 resolution for each precision, Elasticsearch compares the average density of hexagonal bins at each resolution with the average density of tile bins at each zoom level.
 |        Elasticsearch uses the H3 resolution that is closest to the corresponding geotile density.</p>
 |        <p>Learn how to use the vector tile search API with practical examples in the <a href="https://www.elastic.co/docs/reference/elasticsearch/rest-apis/vector-tile-search">Vector tile search examples</a> guide.</p>
 |
 |
 |      `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation-search-mvt>`_
 |
 |      :param index: A list of indices, data streams, or aliases to search. It supports
 |          wildcards (`*`). To search all data streams and indices, omit this parameter
 |          or use `*` or `_all`. To search a remote cluster, use the `<cluster>:<target>`
 |          syntax.
 |      :param field: A field that contains the geospatial data to return. It must be
 |          a `geo_point` or `geo_shape` field. The field must have doc values enabled.
 |          It cannot be a nested field. NOTE: Vector tiles do not natively support geometry
 |          collections. For `geometrycollection` values in a `geo_shape` field, the
 |          API returns a hits layer feature for each element of the collection. This
 |          behavior may change in a future release.
 |      :param zoom: The zoom level of the vector tile to search. It accepts `0` to `29`.
 |      :param x: The X coordinate for the vector tile to search.
 |      :param y: The Y coordinate for the vector tile to search.
 |      :param aggs: Sub-aggregations for the geotile_grid. It supports the following
 |          aggregation types: - `avg` - `boxplot` - `cardinality` - `extended stats`
 |          - `max` - `median absolute deviation` - `min` - `percentile` - `percentile-rank`
 |          - `stats` - `sum` - `value count` The aggregation names can't start with
 |          `_mvt_`. The `_mvt_` prefix is reserved for internal aggregations.
 |      :param buffer: The size, in pixels, of a clipping buffer outside the tile. This
 |          allows renderers to avoid outline artifacts from geometries that extend past
 |          the extent of the tile.
 |      :param exact_bounds: If `false`, the meta layer's feature is the bounding box
 |          of the tile. If `true`, the meta layer's feature is a bounding box resulting
 |          from a `geo_bounds` aggregation. The aggregation runs on <field> values that
 |          intersect the `<zoom>/<x>/<y>` tile with `wrap_longitude` set to `false`.
 |          The resulting bounding box may be larger than the vector tile.
 |      :param extent: The size, in pixels, of a side of the tile. Vector tiles are square
 |          with equal sides.
 |      :param fields: The fields to return in the `hits` layer. It supports wildcards
 |          (`*`). This parameter does not support fields with array values. Fields with
 |          array values may return inconsistent results.
 |      :param grid_agg: The aggregation used to create a grid for the `field`.
 |      :param grid_precision: Additional zoom levels available through the aggs layer.
 |          For example, if `<zoom>` is `7` and `grid_precision` is `8`, you can zoom
 |          in up to level 15. Accepts 0-8. If 0, results don't include the aggs layer.
 |      :param grid_type: Determines the geometry type for features in the aggs layer.
 |          In the aggs layer, each feature represents a `geotile_grid` cell. If `grid,
 |          each feature is a polygon of the cells bounding box. If `point`, each feature
 |          is a Point that is the centroid of the cell.
 |      :param project_routing: Specifies a subset of projects to target for the search
 |          using project metadata tags in a subset of Lucene query syntax. Allowed Lucene
 |          queries: the _alias tag and a single value (possibly wildcarded). Examples:
 |          _alias:my-project _alias:_origin _alias:*pr* Supported in serverless only.
 |      :param query: The query DSL used to filter documents for the search.
 |      :param runtime_mappings: Defines one or more runtime fields in the search request.
 |          These fields take precedence over mapped fields with the same name.
 |      :param size: The maximum number of features to return in the hits layer. Accepts
 |          0-10000. If 0, results don't include the hits layer.
 |      :param sort: Sort the features in the hits layer. By default, the API calculates
 |          a bounding box for each feature. It sorts features based on this box's diagonal
 |          length, from longest to shortest.
 |      :param track_total_hits: The number of hits matching the query to count accurately.
 |          If `true`, the exact number of hits is returned at the cost of some performance.
 |          If `false`, the response does not include the total number of hits matching
 |          the query.
 |      :param with_labels: If `true`, the hits and aggs layers will contain additional
 |          point features representing suggested label positions for the original features.
 |          * `Point` and `MultiPoint` features will have one of the points selected.
 |          * `Polygon` and `MultiPolygon` features will have a single point generated,
 |          either the centroid, if it is within the polygon, or another point within
 |          the polygon selected from the sorted triangle-tree. * `LineString` features
 |          will likewise provide a roughly central point selected from the triangle-tree.
 |          * The aggregation results will provide one central point for each aggregation
 |          bucket. All attributes from the original features will also be copied to
 |          the new label features. In addition, the new features will be distinguishable
 |          using the tag `_mvt_label_position`.
 |
 |  search_shards(self, *, index: Union[str, Sequence[str], NoneType] = None, allow_no_indices: Optional[bool] = None, error_trace: Optional[bool] = None, expand_wildcards: Union[Sequence[Union[str, Literal['all', 'closed', 'hidden', 'none', 'open']]], str, Literal['all', 'closed', 'hidden', 'none', 'open'], NoneType] = None, filter_path: Union[str, Sequence[str], NoneType] = None, human: Optional[bool] = None, ignore_unavailable: Optional[bool] = None, local: Optional[bool] = None, master_timeout: Union[str, Literal[-1], Literal[0], NoneType] = None, preference: Optional[str] = None, pretty: Optional[bool] = None, routing: Union[str, Sequence[str], NoneType] = None) -> elastic_transport.ObjectApiResponse[typing.Any]
 |      .. raw:: html
 |
 |        <p>Get the search shards.</p>
 |        <p>Get the indices and shards that a search request would be run against.
 |        This information can be useful for working out issues or planning optimizations with routing and shard preferences.
 |        When filtered aliases are used, the filter is returned as part of the <code>indices</code> section.</p>
 |        <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>
 |
 |
 |      `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation-search-shards>`_
 |
 |      :param index: A comma-separated list of data streams, indices, and aliases to
 |          search. It supports wildcards (`*`). To search all data streams and indices,
 |          omit this parameter or use `*` or `_all`.
 |      :param allow_no_indices: A setting that does two separate checks on the index
 |          expression. If `false`, the request returns an error (1) if any wildcard
 |          expression (including `_all` and `*`) resolves to zero matching indices or
 |          (2) if the complete set of resolved indices, aliases or data streams is empty
 |          after all expressions are evaluated. If `true`, index expressions that resolve
 |          to no indices are allowed and the request returns an empty result.
 |      :param expand_wildcards: Type of index that wildcard patterns can match. If the
 |          request can target data streams, this argument determines whether wildcard
 |          expressions match hidden data streams. Supports comma-separated values, such
 |          as `open,hidden`.
 |      :param ignore_unavailable: If `false`, the request returns an error if it targets
 |          a concrete (non-wildcarded) index, alias, or data stream that is missing,
 |          closed, or otherwise unavailable. If `true`, unavailable concrete targets
 |          are silently ignored.
 |      :param local: If `true`, the request retrieves information from the local node
 |          only.
 |      :param master_timeout: The period to wait for a connection to the master node.
 |          If the master node is not available before the timeout expires, the request
 |          fails and returns an error. IT can also be set to `-1` to indicate that the
 |          request should never timeout.
 |      :param preference: The node or shard the operation should be performed on. It
 |          is random by default.
 |      :param routing: A custom value used to route operations to a specific shard.
 |
 |  search_template(self, *, index: Union[str, Sequence[str], NoneType] = None, allow_no_indices: Optional[bool] = None, ccs_minimize_roundtrips: Optional[bool] = None, error_trace: Optional[bool] = None, expand_wildcards: Union[Sequence[Union[str, Literal['all', 'closed', 'hidden', 'none', 'open']]], str, Literal['all', 'closed', 'hidden', 'none', 'open'], NoneType] = None, explain: Optional[bool] = None, filter_path: Union[str, Sequence[str], NoneType] = None, human: Optional[bool] = None, id: Optional[str] = None, ignore_throttled: Optional[bool] = None, ignore_unavailable: Optional[bool] = None, params: Optional[Mapping[str, Any]] = None, preference: Optional[str] = None, pretty: Optional[bool] = None, profile: Optional[bool] = None, project_routing: Optional[str] = None, rest_total_hits_as_int: Optional[bool] = None, routing: Union[str, Sequence[str], NoneType] = None, scroll: Union[str, Literal[-1], Literal[0], NoneType] = None, search_type: Union[str, Literal['dfs_query_then_fetch', 'query_then_fetch'], NoneType] = None, source: Union[str, Mapping[str, Any], NoneType] = None, typed_keys: Optional[bool] = None, body: Optional[Dict[str, Any]] = None) -> elastic_transport.ObjectApiResponse[typing.Any]
 |      .. raw:: html
 |
 |        <p>Run a search with a search template.</p>
 |
 |
 |      `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation-search-template>`_
 |
 |      :param index: A comma-separated list of data streams, indices, and aliases to
 |          search. It supports wildcards (`*`).
 |      :param allow_no_indices: A setting that does two separate checks on the index
 |          expression. If `false`, the request returns an error (1) if any wildcard
 |          expression (including `_all` and `*`) resolves to zero matching indices or
 |          (2) if the complete set of resolved indices, aliases or data streams is empty
 |          after all expressions are evaluated. If `true`, index expressions that resolve
 |          to no indices are allowed and the request returns an empty result.
 |      :param ccs_minimize_roundtrips: Indicates whether network round-trips should
 |          be minimized as part of cross-cluster search requests execution.
 |      :param expand_wildcards: The type of index that wildcard patterns can match.
 |          If the request can target data streams, this argument determines whether
 |          wildcard expressions match hidden data streams. Supports comma-separated
 |          values, such as `open,hidden`.
 |      :param explain: If `true`, returns detailed information about score calculation
 |          as part of each hit. If you specify both this and the `explain` query parameter,
 |          the API uses only the query parameter.
 |      :param id: The ID of the search template to use. If no `source` is specified,
 |          this parameter is required.
 |      :param ignore_throttled: If `true`, specified concrete, expanded, or aliased
 |          indices are not included in the response when throttled.
 |      :param ignore_unavailable: If `false`, the request returns an error if it targets
 |          a concrete (non-wildcarded) index, alias, or data stream that is missing,
 |          closed, or otherwise unavailable. If `true`, unavailable concrete targets
 |          are silently ignored.
 |      :param params: Key-value pairs used to replace Mustache variables in the template.
 |          The key is the variable name. The value is the variable value.
 |      :param preference: The node or shard the operation should be performed on. It
 |          is random by default.
 |      :param profile: If `true`, the query execution is profiled.
 |      :param project_routing: Specifies a subset of projects to target for the search
 |          using project metadata tags in a subset of Lucene query syntax. Allowed Lucene
 |          queries: the _alias tag and a single value (possibly wildcarded). Examples:
 |          _alias:my-project _alias:_origin _alias:*pr* Supported in serverless only.
 |      :param rest_total_hits_as_int: If `true`, `hits.total` is rendered as an integer
 |          in the response. If `false`, it is rendered as an object.
 |      :param routing: A custom value used to route operations to a specific shard.
 |      :param scroll: Specifies how long a consistent view of the index should be maintained
 |          for scrolled search.
 |      :param search_type: The type of the search operation.
 |      :param source: An inline search template. Supports the same parameters as the
 |          search API's request body. It also supports Mustache variables. If no `id`
 |          is specified, this parameter is required.
 |      :param typed_keys: If `true`, the response prefixes aggregation and suggester
 |          names with their respective types.
 |
 |  terms_enum(self, *, index: Union[str, Sequence[str]], field: Optional[str] = None, case_insensitive: Optional[bool] = None, error_trace: Optional[bool] = None, filter_path: Union[str, Sequence[str], NoneType] = None, human: Optional[bool] = None, index_filter: Optional[Mapping[str, Any]] = None, pretty: Optional[bool] = None, search_after: Optional[str] = None, size: Optional[int] = None, string: Optional[str] = None, timeout: Union[str, Literal[-1], Literal[0], NoneType] = None, body: Optional[Dict[str, Any]] = None) -> elastic_transport.ObjectApiResponse[typing.Any]
 |      .. raw:: html
 |
 |        <p>Get terms in an index.</p>
 |        <p>Discover terms that match a partial string in an index.
 |        This API is designed for low-latency look-ups used in auto-complete scenarios.</p>
 |        <blockquote>
 |        <p>info
 |        The terms enum API may return terms from deleted documents. Deleted documents are initially only marked as deleted. It is not until their segments are merged that documents are actually deleted. Until that happens, the terms enum API will return terms from these documents.</p>
 |        </blockquote>
 |
 |
 |      `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation-terms-enum>`_
 |
 |      :param index: A comma-separated list of data streams, indices, and index aliases
 |          to search. Wildcard (`*`) expressions are supported. To search all data streams
 |          or indices, omit this parameter or use `*` or `_all`.
 |      :param field: The string to match at the start of indexed terms. If not provided,
 |          all terms in the field are considered.
 |      :param case_insensitive: When `true`, the provided search string is matched against
 |          index terms without case sensitivity.
 |      :param index_filter: Filter an index shard if the provided query rewrites to
 |          `match_none`.
 |      :param search_after: The string after which terms in the index should be returned.
 |          It allows for a form of pagination if the last result from one request is
 |          passed as the `search_after` parameter for a subsequent request.
 |      :param size: The number of matching terms to return.
 |      :param string: The string to match at the start of indexed terms. If it is not
 |          provided, all terms in the field are considered. > info > The prefix string
 |          cannot be larger than the largest possible keyword value, which is Lucene's
 |          term byte-length limit of 32766.
 |      :param timeout: The maximum length of time to spend collecting results. If the
 |          timeout is exceeded the `complete` flag set to `false` in the response and
 |          the results may be partial or empty.
 |
 |  termvectors(self, *, index: str, id: Optional[str] = None, doc: Optional[Mapping[str, Any]] = None, error_trace: Optional[bool] = None, field_statistics: Optional[bool] = None, fields: Optional[Sequence[str]] = None, filter: Optional[Mapping[str, Any]] = None, filter_path: Union[str, Sequence[str], NoneType] = None, human: Optional[bool] = None, offsets: Optional[bool] = None, payloads: Optional[bool] = None, per_field_analyzer: Optional[Mapping[str, str]] = None, positions: Optional[bool] = None, preference: Optional[str] = None, pretty: Optional[bool] = None, realtime: Optional[bool] = None, routing: Union[str, Sequence[str], NoneType] = None, term_statistics: Optional[bool] = None, version: Optional[int] = None, version_type: Union[str, Literal['external', 'external_gte', 'internal'], NoneType] = None, body: Optional[Dict[str, Any]] = None) -> elastic_transport.ObjectApiResponse[typing.Any]
 |      .. raw:: html
 |
 |        <p>Get term vector information.</p>
 |        <p>Get information and statistics about terms in the fields of a particular document.</p>
 |        <p>You can retrieve term vectors for documents stored in the index or for artificial documents passed in the body of the request.
 |        You can specify the fields you are interested in through the <code>fields</code> parameter or by adding the fields to the request body.
 |        For example:</p>
 |        <pre><code>GET /my-index-000001/_termvectors/1?fields=message
 |        </code></pre>
 |        <p>Fields can be specified using wildcards, similar to the multi match query.</p>
 |        <p>Term vectors are real-time by default, not near real-time.
 |        This can be changed by setting <code>realtime</code> parameter to <code>false</code>.</p>
 |        <p>You can request three types of values: <em>term information</em>, <em>term statistics</em>, and <em>field statistics</em>.
 |        By default, all term information and field statistics are returned for all fields but term statistics are excluded.</p>
 |        <p><strong>Term information</strong></p>
 |        <ul>
 |        <li>term frequency in the field (always returned)</li>
 |        <li>term positions (<code>positions: true</code>)</li>
 |        <li>start and end offsets (<code>offsets: true</code>)</li>
 |        <li>term payloads (<code>payloads: true</code>), as base64 encoded bytes</li>
 |        </ul>
 |        <p>If the requested information wasn't stored in the index, it will be computed on the fly if possible.
 |        Additionally, term vectors could be computed for documents not even existing in the index, but instead provided by the user.</p>
 |        <blockquote>
 |        <p>warn
 |        Start and end offsets assume UTF-16 encoding is being used. If you want to use these offsets in order to get the original text that produced this token, you should make sure that the string you are taking a sub-string of is also encoded using UTF-16.</p>
 |        </blockquote>
 |        <p><strong>Behaviour</strong></p>
 |        <p>The term and field statistics are not accurate.
 |        Deleted documents are not taken into account.
 |        The information is only retrieved for the shard the requested document resides in.
 |        The term and field statistics are therefore only useful as relative measures whereas the absolute numbers have no meaning in this context.
 |        By default, when requesting term vectors of artificial documents, a shard to get the statistics from is randomly selected.
 |        Use <code>routing</code> only to hit a particular shard.
 |        Refer to the linked documentation for detailed examples of how to use this API.</p>
 |
 |
 |      `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-termvectors>`_
 |
 |      :param index: The name of the index that contains the document.
 |      :param id: A unique identifier for the document.
 |      :param doc: An artificial document (a document not present in the index) for
 |          which you want to retrieve term vectors.
 |      :param field_statistics: If `true`, the response includes: * The document count
 |          (how many documents contain this field). * The sum of document frequencies
 |          (the sum of document frequencies for all terms in this field). * The sum
 |          of total term frequencies (the sum of total term frequencies of each term
 |          in this field).
 |      :param fields: A list of fields to include in the statistics. It is used as the
 |          default list unless a specific field list is provided in the `completion_fields`
 |          or `fielddata_fields` parameters.
 |      :param filter: Filter terms based on their tf-idf scores. This could be useful
 |          in order find out a good characteristic vector of a document. This feature
 |          works in a similar manner to the second phase of the More Like This Query.
 |      :param offsets: If `true`, the response includes term offsets.
 |      :param payloads: If `true`, the response includes term payloads.
 |      :param per_field_analyzer: Override the default per-field analyzer. This is useful
 |          in order to generate term vectors in any fashion, especially when using artificial
 |          documents. When providing an analyzer for a field that already stores term
 |          vectors, the term vectors will be regenerated.
 |      :param positions: If `true`, the response includes term positions.
 |      :param preference: The node or shard the operation should be performed on. It
 |          is random by default.
 |      :param realtime: If true, the request is real-time as opposed to near-real-time.
 |      :param routing: A custom value that is used to route operations to a specific
 |          shard.
 |      :param term_statistics: If `true`, the response includes: * The total term frequency
 |          (how often a term occurs in all documents). * The document frequency (the
 |          number of documents containing the current term). By default these values
 |          are not returned since term statistics can have a serious performance impact.
 |      :param version: If `true`, returns the document version as part of a hit.
 |      :param version_type: The version type.
 |
 |  update(self, *, index: str, id: str, detect_noop: Optional[bool] = None, doc: Optional[Mapping[str, Any]] = None, doc_as_upsert: Optional[bool] = None, error_trace: Optional[bool] = None, filter_path: Union[str, Sequence[str], NoneType] = None, human: Optional[bool] = None, if_primary_term: Optional[int] = None, if_seq_no: Optional[int] = None, include_source_on_error: Optional[bool] = None, lang: Optional[str] = None, pretty: Optional[bool] = None, refresh: Union[bool, str, Literal['false', 'true', 'wait_for'], NoneType] = None, require_alias: Optional[bool] = None, retry_on_conflict: Optional[int] = None, routing: Union[str, Sequence[str], NoneType] = None, script: Optional[Mapping[str, Any]] = None, scripted_upsert: Optional[bool] = None, source: Union[bool, Mapping[str, Any], NoneType] = None, source_excludes: Union[str, Sequence[str], NoneType] = None, source_includes: Union[str, Sequence[str], NoneType] = None, timeout: Union[str, Literal[-1], Literal[0], NoneType] = None, upsert: Optional[Mapping[str, Any]] = None, wait_for_active_shards: Union[int, str, Literal['all', 'index-setting'], NoneType] = None, body: Optional[Dict[str, Any]] = None) -> elastic_transport.ObjectApiResponse[typing.Any]
 |      .. raw:: html
 |
 |        <p>Update a document.</p>
 |        <p>Update a document by running a script or passing a partial document.</p>
 |        <p>If the Elasticsearch security features are enabled, you must have the <code>index</code> or <code>write</code> index privilege for the target index or index alias.</p>
 |        <p>The script can update, delete, or skip modifying the document.
 |        The API also supports passing a partial document, which is merged into the existing document.
 |        To fully replace an existing document, use the index API.
 |        This operation:</p>
 |        <ul>
 |        <li>Gets the document (collocated with the shard) from the index.</li>
 |        <li>Runs the specified script.</li>
 |        <li>Indexes the result.</li>
 |        </ul>
 |        <p>The document must still be reindexed, but using this API removes some network roundtrips and reduces chances of version conflicts between the GET and the index operation.</p>
 |        <p>The <code>_source</code> field must be enabled to use this API.
 |        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).
 |        For usage examples such as partial updates, upserts, and scripted updates, see the External documentation.</p>
 |
 |
 |      `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-update>`_
 |
 |      :param index: The name of the target index. By default, the index is created
 |          automatically if it doesn't exist.
 |      :param id: A unique identifier for the document to be updated.
 |      :param detect_noop: If `true`, the `result` in the response is set to `noop`
 |          (no operation) when there are no changes to the document.
 |      :param doc: A partial update to an existing document. If both `doc` and `script`
 |          are specified, `doc` is ignored.
 |      :param doc_as_upsert: If `true`, use the contents of 'doc' as the value of 'upsert'.
 |          NOTE: Using ingest pipelines with `doc_as_upsert` is not supported.
 |      :param if_primary_term: Only perform the operation if the document has this primary
 |          term.
 |      :param if_seq_no: Only perform the operation if the document has this sequence
 |          number.
 |      :param include_source_on_error: True or false if to include the document source
 |          in the error message in case of parsing errors.
 |      :param lang: The script language.
 |      :param refresh: If 'true', Elasticsearch refreshes the affected shards to make
 |          this operation visible to search. If 'wait_for', it waits for a refresh to
 |          make this operation visible to search. If 'false', it does nothing with refreshes.
 |      :param require_alias: If `true`, the destination must be an index alias.
 |      :param retry_on_conflict: The number of times the operation should be retried
 |          when a conflict occurs.
 |      :param routing: A custom value used to route operations to a specific shard.
 |      :param script: The script to run to update the document.
 |      :param scripted_upsert: If `true`, run the script whether or not the document
 |          exists.
 |      :param source: If `false`, turn off source retrieval. You can also specify a
 |          comma-separated list of the fields you want to retrieve.
 |      :param source_excludes: The source fields you want to exclude.
 |      :param source_includes: The source fields you want to retrieve.
 |      :param timeout: The period to wait for the following operations: dynamic mapping
 |          updates and waiting for active shards. Elasticsearch waits for at least the
 |          timeout period before failing. The actual wait time could be longer, particularly
 |          when multiple waits occur.
 |      :param upsert: If the document does not already exist, the contents of 'upsert'
 |          are inserted as a new document. If the document exists, the 'script' is run.
 |      :param wait_for_active_shards: The number of copies of each shard that must be
 |          active before proceeding with the operation. Set to 'all' or any positive
 |          integer up to the total number of shards in the index (`number_of_replicas`+1).
 |          The default value of `1` means it waits for each primary shard to be active.
 |
 |  update_by_query(self, *, index: Union[str, Sequence[str]], allow_no_indices: Optional[bool] = None, analyze_wildcard: Optional[bool] = None, analyzer: Optional[str] = None, conflicts: Union[str, Literal['abort', 'proceed'], NoneType] = None, default_operator: Union[str, Literal['and', 'or'], NoneType] = None, df: Optional[str] = None, error_trace: Optional[bool] = None, expand_wildcards: Union[Sequence[Union[str, Literal['all', 'closed', 'hidden', 'none', 'open']]], str, Literal['all', 'closed', 'hidden', 'none', 'open'], NoneType] = None, filter_path: Union[str, Sequence[str], NoneType] = None, from_: Optional[int] = None, human: Optional[bool] = None, ignore_unavailable: Optional[bool] = None, lenient: Optional[bool] = None, max_docs: Optional[int] = None, pipeline: Optional[str] = None, preference: Optional[str] = None, pretty: Optional[bool] = None, q: Optional[str] = None, query: Optional[Mapping[str, Any]] = None, refresh: Optional[bool] = None, request_cache: Optional[bool] = None, requests_per_second: Optional[float] = None, routing: Union[str, Sequence[str], NoneType] = None, script: Optional[Mapping[str, Any]] = None, scroll: Union[str, Literal[-1], Literal[0], NoneType] = None, scroll_size: Optional[int] = None, search_timeout: Union[str, Literal[-1], Literal[0], NoneType] = None, search_type: Union[str, Literal['dfs_query_then_fetch', 'query_then_fetch'], NoneType] = None, slice: Optional[Mapping[str, Any]] = None, slices: Union[int, str, Literal['auto'], NoneType] = None, sort: Optional[Sequence[str]] = None, stats: Optional[Sequence[str]] = None, terminate_after: Optional[int] = None, timeout: Union[str, Literal[-1], Literal[0], NoneType] = None, version: Optional[bool] = None, version_type: Optional[bool] = None, wait_for_active_shards: Union[int, str, Literal['all', 'index-setting'], NoneType] = None, wait_for_completion: Optional[bool] = None, body: Optional[Dict[str, Any]] = None) -> elastic_transport.ObjectApiResponse[typing.Any]
 |      .. raw:: html
 |
 |        <p>Update documents.</p>
 |        <p>Updates documents that match the specified query.
 |        If no query is specified, performs an update on every document in the data stream or index without modifying the source, which is useful for picking up mapping changes.</p>
 |        <p>If the Elasticsearch security features are enabled, you must have the following index privileges for the target data stream, index, or alias:</p>
 |        <ul>
 |        <li><code>read</code></li>
 |        <li><code>index</code> or <code>write</code></li>
 |        </ul>
 |        <p>You can specify the query criteria in the request URI or the request body using the same syntax as the search API.</p>
 |        <p>When you submit an update by query request, Elasticsearch gets a snapshot of the data stream or index when it begins processing the request and updates matching documents using internal versioning.
 |        When the versions match, the document is updated and the version number is incremented.
 |        If a document changes between the time that the snapshot is taken and the update operation is processed, it results in a version conflict and the operation fails.
 |        You can opt to count version conflicts instead of halting and returning by setting <code>conflicts</code> to <code>proceed</code>.
 |        Note that if you opt to count version conflicts, the operation could attempt to update more documents from the source than <code>max_docs</code> until it has successfully updated <code>max_docs</code> documents or it has gone through every document in the source query.</p>
 |        <p>NOTE: Documents with a version equal to 0 cannot be updated using update by query because internal versioning does not support 0 as a valid version number.</p>
 |        <p>While processing an update by query request, Elasticsearch performs multiple search requests sequentially to find all of the matching documents.
 |        A bulk update request is performed for each batch of matching documents.
 |        Any query or update failures cause the update by query request to fail and the failures are shown in the response.
 |        Any update requests that completed successfully still stick, they are not rolled back.</p>
 |        <p><strong>Refreshing shards</strong></p>
 |        <p>Specifying the <code>refresh</code> parameter refreshes all shards once the request completes.
 |        This is different to the update API's <code>refresh</code> parameter, which causes only the shard
 |        that received the request to be refreshed. Unlike the update API, it does not support
 |        <code>wait_for</code>.</p>
 |        <p><strong>Running update by query asynchronously</strong></p>
 |        <p>If the request contains <code>wait_for_completion=false</code>, Elasticsearch
 |        performs some preflight checks, launches the request, and returns a
 |        <a href="https://www.elastic.co/docs/api/doc/elasticsearch/group/endpoint-tasks">task</a> you can use to cancel or get the status of the task.
 |        Elasticsearch creates a record of this task as a document at <code>.tasks/task/${taskId}</code>.</p>
 |        <p><strong>Waiting for active shards</strong></p>
 |        <p><code>wait_for_active_shards</code> controls how many copies of a shard must be active
 |        before proceeding with the request. See <a href="https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-create#operation-create-wait_for_active_shards"><code>wait_for_active_shards</code></a>
 |        for details. <code>timeout</code> controls how long each write request waits for unavailable
 |        shards to become available. Both work exactly the way they work in the
 |        <a href="https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-bulk">Bulk API</a>. Update by query uses scrolled searches, so you can also
 |        specify the <code>scroll</code> parameter to control how long it keeps the search context
 |        alive, for example <code>?scroll=10m</code>. The default is 5 minutes.</p>
 |        <p><strong>Throttling update requests</strong></p>
 |        <p>To control the rate at which update by query issues batches of update operations, you can set <code>requests_per_second</code> to any positive decimal number.
 |        This pads each batch with a wait time to throttle the rate.
 |        Set <code>requests_per_second</code> to <code>-1</code> to turn off throttling.</p>
 |        <p>Throttling uses a wait time between batches so that the internal scroll requests can be given a timeout that takes the request padding into account.
 |        The padding time is the difference between the batch size divided by the <code>requests_per_second</code> and the time spent writing.
 |        By default the batch size is 1000, so if <code>requests_per_second</code> is set to <code>500</code>:</p>
 |        <pre><code>target_time = 1000 / 500 per second = 2 seconds
 |        wait_time = target_time - write_time = 2 seconds - .5 seconds = 1.5 seconds
 |        </code></pre>
 |        <p>Since the batch is issued as a single _bulk request, large batch sizes cause Elasticsearch to create many requests and wait before starting the next set.
 |        This is &quot;bursty&quot; instead of &quot;smooth&quot;.</p>
 |        <p><strong>Slicing</strong></p>
 |        <p>Update by query supports sliced scroll to parallelize the update process.
 |        This can improve efficiency and provide a convenient way to break the request down into smaller parts.</p>
 |        <p>Setting <code>slices</code> to <code>auto</code> chooses a reasonable number for most data streams and indices.
 |        This setting will use one slice per shard, up to a certain limit.
 |        If there are multiple source data streams or indices, it will choose the number of slices based on the index or backing index with the smallest number of shards.</p>
 |        <p>Adding <code>slices</code> to <code>_update_by_query</code> just automates the manual process of creating sub-requests, which means it has some quirks:</p>
 |        <ul>
 |        <li>You can see these requests in the tasks APIs. These sub-requests are &quot;child&quot; tasks of the task for the request with slices.</li>
 |        <li>Fetching the status of the task for the request with <code>slices</code> only contains the status of completed slices.</li>
 |        <li>These sub-requests are individually addressable for things like cancellation and rethrottling.</li>
 |        <li>Rethrottling the request with <code>slices</code> will rethrottle the unfinished sub-request proportionally.</li>
 |        <li>Canceling the request with slices will cancel each sub-request.</li>
 |        <li>Due to the nature of slices each sub-request won't get a perfectly even portion of the documents. All documents will be addressed, but some slices may be larger than others. Expect larger slices to have a more even distribution.</li>
 |        <li>Parameters like <code>requests_per_second</code> and <code>max_docs</code> on a request with slices are distributed proportionally to each sub-request. Combine that with the point above about distribution being uneven and you should conclude that using <code>max_docs</code> with <code>slices</code> might not result in exactly <code>max_docs</code> documents being updated.</li>
 |        <li>Each sub-request gets a slightly different snapshot of the source data stream or index though these are all taken at approximately the same time.</li>
 |        </ul>
 |        <p>If you're slicing manually or otherwise tuning automatic slicing, keep in mind that:</p>
 |        <ul>
 |        <li>Query performance is most efficient when the number of slices is equal to the number of shards in the index or backing index. If that number is large (for example, 500), choose a lower number as too many slices hurts performance. Setting slices higher than the number of shards generally does not improve efficiency and adds overhead.</li>
 |        <li>Update performance scales linearly across available resources with the number of slices.</li>
 |        </ul>
 |        <p>Whether query or update performance dominates the runtime depends on the documents being reindexed and cluster resources.
 |        Refer to the linked documentation for examples of how to update documents using the <code>_update_by_query</code> API:</p>
 |
 |
 |      `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-update-by-query>`_
 |
 |      :param index: A comma-separated list of data streams, indices, and aliases to
 |          search. It supports wildcards (`*`). To search all data streams or indices,
 |          omit this parameter or use `*` or `_all`.
 |      :param allow_no_indices: A setting that does two separate checks on the index
 |          expression. If `false`, the request returns an error (1) if any wildcard
 |          expression (including `_all` and `*`) resolves to zero matching indices or
 |          (2) if the complete set of resolved indices, aliases or data streams is empty
 |          after all expressions are evaluated. If `true`, index expressions that resolve
 |          to no indices are allowed and the request returns an empty result.
 |      :param analyze_wildcard: If `true`, wildcard and prefix queries are analyzed.
 |          This parameter can be used only when the `q` query string parameter is specified.
 |      :param analyzer: The analyzer to use for the query string. This parameter can
 |          be used only when the `q` query string parameter is specified.
 |      :param conflicts: The preferred behavior when update by query hits version conflicts:
 |          `abort` or `proceed`.
 |      :param default_operator: The default operator for query string query: `and` or
 |          `or`. This parameter can be used only when the `q` query string parameter
 |          is specified.
 |      :param df: The field to use as default where no field prefix is given in the
 |          query string. This parameter can be used only when the `q` query string parameter
 |          is specified.
 |      :param expand_wildcards: The type of index that wildcard patterns can match.
 |          If the request can target data streams, this argument determines whether
 |          wildcard expressions match hidden data streams. It supports comma-separated
 |          values, such as `open,hidden`.
 |      :param from_: Skips the specified number of documents.
 |      :param ignore_unavailable: If `false`, the request returns an error if it targets
 |          a concrete (non-wildcarded) index, alias, or data stream that is missing,
 |          closed, or otherwise unavailable. If `true`, unavailable concrete targets
 |          are silently ignored.
 |      :param lenient: If `true`, format-based query failures (such as providing text
 |          to a numeric field) in the query string will be ignored. This parameter can
 |          be used only when the `q` query string parameter is specified.
 |      :param max_docs: The maximum number of documents to update.
 |      :param pipeline: The ID of the pipeline to use to preprocess incoming documents.
 |          If the index has a default ingest pipeline specified, then setting the value
 |          to `_none` disables the default ingest pipeline for this request. If a final
 |          pipeline is configured it will always run, regardless of the value of this
 |          parameter.
 |      :param preference: The node or shard the operation should be performed on. It
 |          is random by default.
 |      :param q: A query in the Lucene query string syntax.
 |      :param query: The documents to update using the Query DSL.
 |      :param refresh: If `true`, Elasticsearch refreshes affected shards to make the
 |          operation visible to search after the request completes. This is different
 |          than the update API's `refresh` parameter, which causes just the shard that
 |          received the request to be refreshed.
 |      :param request_cache: If `true`, the request cache is used for this request.
 |          It defaults to the index-level setting.
 |      :param requests_per_second: The throttle for this request in sub-requests per
 |          second.
 |      :param routing: A custom value used to route operations to a specific shard.
 |      :param script: The script to run to update the document source or metadata when
 |          updating.
 |      :param scroll: The period to retain the search context for scrolling.
 |      :param scroll_size: The size of the scroll request that powers the operation.
 |      :param search_timeout: An explicit timeout for each search request. By default,
 |          there is no timeout.
 |      :param search_type: The type of the search operation. Available options include
 |          `query_then_fetch` and `dfs_query_then_fetch`.
 |      :param slice: Slice the request manually using the provided slice ID and total
 |          number of slices.
 |      :param slices: The number of slices this task should be divided into.
 |      :param sort: A comma-separated list of <field>:<direction> pairs.
 |      :param stats: The specific `tag` of the request for logging and statistical purposes.
 |      :param terminate_after: The maximum number of documents to collect for each shard.
 |          If a query reaches this limit, Elasticsearch terminates the query early.
 |          Elasticsearch collects documents before sorting. IMPORTANT: Use with caution.
 |          Elasticsearch applies this parameter to each shard handling the request.
 |          When possible, let Elasticsearch perform early termination automatically.
 |          Avoid specifying this parameter for requests that target data streams with
 |          backing indices across multiple data tiers.
 |      :param timeout: The period each update request waits for the following operations:
 |          dynamic mapping updates, waiting for active shards. By default, it is one
 |          minute. This guarantees Elasticsearch waits for at least the timeout before
 |          failing. The actual wait time could be longer, particularly when multiple
 |          waits occur.
 |      :param version: If `true`, returns the document version as part of a hit.
 |      :param version_type: Should the document increment the version number (internal)
 |          on hit or not (reindex)
 |      :param wait_for_active_shards: The number of shard copies that must be active
 |          before proceeding with the operation. Set to `all` or any positive integer
 |          up to the total number of shards in the index (`number_of_replicas+1`). The
 |          `timeout` parameter controls how long each write request waits for unavailable
 |          shards to become available. Both work exactly the way they work in the bulk
 |          API.
 |      :param wait_for_completion: If `true`, the request blocks until the operation
 |          is complete. If `false`, Elasticsearch performs some preflight checks, launches
 |          the request, and returns a task ID that you can use to cancel or get the
 |          status of the task. Elasticsearch creates a record of this task as a document
 |          at `.tasks/task/${taskId}`.
 |
 |  update_by_query_rethrottle(self, *, task_id: str, requests_per_second: float, error_trace: Optional[bool] = None, filter_path: Union[str, Sequence[str], NoneType] = None, human: Optional[bool] = None, pretty: Optional[bool] = None) -> elastic_transport.ObjectApiResponse[typing.Any]
 |      .. raw:: html
 |
 |        <p>Throttle an update by query operation.</p>
 |        <p>Change the number of requests per second for a particular update by query operation.
 |        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>
 |
 |
 |      `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-update-by-query-rethrottle>`_
 |
 |      :param task_id: The ID for the task.
 |      :param requests_per_second: The throttle for this request in sub-requests per
 |          second. To turn off throttling, set it to `-1`.
 |
 |  ----------------------------------------------------------------------
 |  Methods inherited from elasticsearch._sync.client._base.BaseClient:
 |
 |  perform_request(self, method: str, path: str, *, params: Optional[Mapping[str, Any]] = None, headers: Optional[Mapping[str, str]] = None, body: Optional[Any] = None, endpoint_id: Optional[str] = None, path_parts: Optional[Mapping[str, Any]] = None) -> elastic_transport.ApiResponse[typing.Any]
 |
 |  ----------------------------------------------------------------------
 |  Readonly properties inherited from elasticsearch._sync.client._base.BaseClient:
 |
 |  transport
 |
 |  ----------------------------------------------------------------------
 |  Data descriptors inherited from elasticsearch._sync.client._base.BaseClient:
 |
 |  __dict__
 |      dictionary for instance variables
 |
 |  __weakref__
 |      list of weak references to the object
elasticsearch.ElasticsearchDeprecationWarning
Python Library Documentation: class ElasticsearchWarning in module elasticsearch

class ElasticsearchWarning(elastic_transport.TransportWarning)
 |  Warning that is raised when a deprecated option
 |  or incorrect usage is flagged via the 'Warning' HTTP header.
 |
 |  Method resolution order:
 |      ElasticsearchWarning
 |      elastic_transport.TransportWarning
 |      builtins.Warning
 |      builtins.Exception
 |      builtins.BaseException
 |      builtins.object
 |
 |  Data descriptors inherited from elastic_transport.TransportWarning:
 |
 |  __weakref__
 |      list of weak references to the object
 |
 |  ----------------------------------------------------------------------
 |  Methods inherited from builtins.Warning:
 |
 |  __init__(self, /, *args, **kwargs)
 |      Initialize self.  See help(type(self)) for accurate signature.
 |
 |  ----------------------------------------------------------------------
 |  Static methods inherited from builtins.Warning:
 |
 |  __new__(*args, **kwargs) class method of builtins.Warning
 |      Create and return a new object.  See help(type) for accurate signature.
 |
 |  ----------------------------------------------------------------------
 |  Methods inherited from builtins.BaseException:
 |
 |  __getattribute__(self, name, /)
 |      Return getattr(self, name).
 |
 |  __reduce__(...)
 |      Helper for pickle.
 |
 |  __repr__(self, /)
 |      Return repr(self).
 |
 |  __setstate__(...)
 |
 |  __str__(self, /)
 |      Return str(self).
 |
 |  add_note(...)
 |      Exception.add_note(note) --
 |      add a note to the exception
 |
 |  with_traceback(...)
 |      Exception.with_traceback(tb) --
 |      set self.__traceback__ to tb and return self.
 |
 |  ----------------------------------------------------------------------
 |  Data descriptors inherited from builtins.BaseException:
 |
 |  __cause__
 |      exception cause
 |
 |  __context__
 |      exception context
 |
 |  __dict__
 |
 |  __suppress_context__
 |
 |  __traceback__
 |
 |  args
elasticsearch.ElasticsearchWarning
Python Library Documentation: class ElasticsearchWarning in module elasticsearch

class ElasticsearchWarning(elastic_transport.TransportWarning)
 |  Warning that is raised when a deprecated option
 |  or incorrect usage is flagged via the 'Warning' HTTP header.
 |
 |  Method resolution order:
 |      ElasticsearchWarning
 |      elastic_transport.TransportWarning
 |      builtins.Warning
 |      builtins.Exception
 |      builtins.BaseException
 |      builtins.object
 |
 |  Data descriptors inherited from elastic_transport.TransportWarning:
 |
 |  __weakref__
 |      list of weak references to the object
 |
 |  ----------------------------------------------------------------------
 |  Methods inherited from builtins.Warning:
 |
 |  __init__(self, /, *args, **kwargs)
 |      Initialize self.  See help(type(self)) for accurate signature.
 |
 |  ----------------------------------------------------------------------
 |  Static methods inherited from builtins.Warning:
 |
 |  __new__(*args, **kwargs) class method of builtins.Warning
 |      Create and return a new object.  See help(type) for accurate signature.
 |
 |  ----------------------------------------------------------------------
 |  Methods inherited from builtins.BaseException:
 |
 |  __getattribute__(self, name, /)
 |      Return getattr(self, name).
 |
 |  __reduce__(...)
 |      Helper for pickle.
 |
 |  __repr__(self, /)
 |      Return repr(self).
 |
 |  __setstate__(...)
 |
 |  __str__(self, /)
 |      Return str(self).
 |
 |  add_note(...)
 |      Exception.add_note(note) --
 |      add a note to the exception
 |
 |  with_traceback(...)
 |      Exception.with_traceback(tb) --
 |      set self.__traceback__ to tb and return self.
 |
 |  ----------------------------------------------------------------------
 |  Data descriptors inherited from builtins.BaseException:
 |
 |  __cause__
 |      exception cause
 |
 |  __context__
 |      exception context
 |
 |  __dict__
 |
 |  __suppress_context__
 |
 |  __traceback__
 |
 |  args
elasticsearch.JSONSerializer
Python Library Documentation: class JsonSerializer in module elasticsearch

class JsonSerializer(elastic_transport.JsonSerializer)
 |  Method resolution order:
 |      JsonSerializer
 |      elastic_transport.JsonSerializer
 |      elastic_transport.Serializer
 |      builtins.object
 |
 |  Methods defined here:
 |
 |  default(self, data: Any) -> Any
 |
 |  ----------------------------------------------------------------------
 |  Data and other attributes defined here:
 |
 |  __annotations__ = {'mimetype': typing.ClassVar[str]}
 |
 |  mimetype = 'application/json'
 |
 |  ----------------------------------------------------------------------
 |  Methods inherited from elastic_transport.JsonSerializer:
 |
 |  dumps(self, data: Any) -> bytes
 |
 |  json_dumps(self, data: Any) -> bytes
 |
 |  json_loads(self, data: bytes) -> Any
 |
 |  loads(self, data: bytes) -> Any
 |
 |  ----------------------------------------------------------------------
 |  Data descriptors inherited from elastic_transport.Serializer:
 |
 |  __dict__
 |      dictionary for instance variables
 |
 |  __weakref__
 |      list of weak references to the object
elasticsearch.JsonSerializer
Python Library Documentation: class JsonSerializer in module elasticsearch

class JsonSerializer(elastic_transport.JsonSerializer)
 |  Method resolution order:
 |      JsonSerializer
 |      elastic_transport.JsonSerializer
 |      elastic_transport.Serializer
 |      builtins.object
 |
 |  Methods defined here:
 |
 |  default(self, data: Any) -> Any
 |
 |  ----------------------------------------------------------------------
 |  Data and other attributes defined here:
 |
 |  __annotations__ = {'mimetype': typing.ClassVar[str]}
 |
 |  mimetype = 'application/json'
 |
 |  ----------------------------------------------------------------------
 |  Methods inherited from elastic_transport.JsonSerializer:
 |
 |  dumps(self, data: Any) -> bytes
 |
 |  json_dumps(self, data: Any) -> bytes
 |
 |  json_loads(self, data: bytes) -> Any
 |
 |  loads(self, data: bytes) -> Any
 |
 |  ----------------------------------------------------------------------
 |  Data descriptors inherited from elastic_transport.Serializer:
 |
 |  __dict__
 |      dictionary for instance variables
 |
 |  __weakref__
 |      list of weak references to the object
elasticsearch.NotFoundError
Python Library Documentation: class NotFoundError in module elasticsearch

class NotFoundError(ApiError)
 |  NotFoundError(message: str, meta: elastic_transport.ApiResponseMeta, body: Any, errors: Tuple[Exception, ...] = ())
 |
 |  Exception representing a 404 status code.
 |
 |  Method resolution order:
 |      NotFoundError
 |      ApiError
 |      elastic_transport.ApiError
 |      builtins.Exception
 |      builtins.BaseException
 |      builtins.object
 |
 |  Methods inherited from ApiError:
 |
 |  __str__(self) -> str
 |      Return str(self).
 |
 |  ----------------------------------------------------------------------
 |  Readonly properties inherited from ApiError:
 |
 |  error
 |      Backwards-compatible way to access ``self.message``
 |
 |  info
 |      Backwards-compatible way to access ``self.body``
 |
 |  status_code
 |      Backwards-compatible way to access ``self.meta.status``
 |
 |  ----------------------------------------------------------------------
 |  Methods inherited from elastic_transport.ApiError:
 |
 |  __init__(self, message: str, meta: elastic_transport.ApiResponseMeta, body: Any, errors: Tuple[Exception, ...] = ())
 |      Initialize self.  See help(type(self)) for accurate signature.
 |
 |  __repr__(self) -> str
 |      Return repr(self).
 |
 |  ----------------------------------------------------------------------
 |  Data descriptors inherited from elastic_transport.ApiError:
 |
 |  __weakref__
 |      list of weak references to the object
 |
 |  ----------------------------------------------------------------------
 |  Static methods inherited from builtins.Exception:
 |
 |  __new__(*args, **kwargs) class method of builtins.Exception
 |      Create and return a new object.  See help(type) for accurate signature.
 |
 |  ----------------------------------------------------------------------
 |  Methods inherited from builtins.BaseException:
 |
 |  __getattribute__(self, name, /)
 |      Return getattr(self, name).
 |
 |  __reduce__(...)
 |      Helper for pickle.
 |
 |  __setstate__(...)
 |
 |  add_note(...)
 |      Exception.add_note(note) --
 |      add a note to the exception
 |
 |  with_traceback(...)
 |      Exception.with_traceback(tb) --
 |      set self.__traceback__ to tb and return self.
 |
 |  ----------------------------------------------------------------------
 |  Data descriptors inherited from builtins.BaseException:
 |
 |  __cause__
 |      exception cause
 |
 |  __context__
 |      exception context
 |
 |  __dict__
 |
 |  __suppress_context__
 |
 |  __traceback__
 |
 |  args
elasticsearch.OrjsonSerializer
Python Library Documentation: class OrjsonSerializer in module elasticsearch

class OrjsonSerializer(JsonSerializer, elastic_transport.OrjsonSerializer)
 |  Method resolution order:
 |      OrjsonSerializer
 |      JsonSerializer
 |      elastic_transport.OrjsonSerializer
 |      elastic_transport.JsonSerializer
 |      elastic_transport.Serializer
 |      builtins.object
 |
 |  Methods defined here:
 |
 |  default(self, data: Any) -> Any
 |
 |  ----------------------------------------------------------------------
 |  Data and other attributes defined here:
 |
 |  __annotations__ = {}
 |
 |  ----------------------------------------------------------------------
 |  Data and other attributes inherited from JsonSerializer:
 |
 |  mimetype = 'application/json'
 |
 |  ----------------------------------------------------------------------
 |  Methods inherited from elastic_transport.OrjsonSerializer:
 |
 |  json_dumps(self, data: Any) -> bytes
 |
 |  json_loads(self, data: bytes) -> Any
 |
 |  ----------------------------------------------------------------------
 |  Methods inherited from elastic_transport.JsonSerializer:
 |
 |  dumps(self, data: Any) -> bytes
 |
 |  loads(self, data: bytes) -> Any
 |
 |  ----------------------------------------------------------------------
 |  Data descriptors inherited from elastic_transport.Serializer:
 |
 |  __dict__
 |      dictionary for instance variables
 |
 |  __weakref__
 |      list of weak references to the object
elasticsearch.RequestError
Python Library Documentation: class BadRequestError in module elasticsearch

class BadRequestError(ApiError)
 |  BadRequestError(message: str, meta: elastic_transport.ApiResponseMeta, body: Any, errors: Tuple[Exception, ...] = ())
 |
 |  Exception representing a 400 status code.
 |
 |  Method resolution order:
 |      BadRequestError
 |      ApiError
 |      elastic_transport.ApiError
 |      builtins.Exception
 |      builtins.BaseException
 |      builtins.object
 |
 |  Methods inherited from ApiError:
 |
 |  __str__(self) -> str
 |      Return str(self).
 |
 |  ----------------------------------------------------------------------
 |  Readonly properties inherited from ApiError:
 |
 |  error
 |      Backwards-compatible way to access ``self.message``
 |
 |  info
 |      Backwards-compatible way to access ``self.body``
 |
 |  status_code
 |      Backwards-compatible way to access ``self.meta.status``
 |
 |  ----------------------------------------------------------------------
 |  Methods inherited from elastic_transport.ApiError:
 |
 |  __init__(self, message: str, meta: elastic_transport.ApiResponseMeta, body: Any, errors: Tuple[Exception, ...] = ())
 |      Initialize self.  See help(type(self)) for accurate signature.
 |
 |  __repr__(self) -> str
 |      Return repr(self).
 |
 |  ----------------------------------------------------------------------
 |  Data descriptors inherited from elastic_transport.ApiError:
 |
 |  __weakref__
 |      list of weak references to the object
 |
 |  ----------------------------------------------------------------------
 |  Static methods inherited from builtins.Exception:
 |
 |  __new__(*args, **kwargs) class method of builtins.Exception
 |      Create and return a new object.  See help(type) for accurate signature.
 |
 |  ----------------------------------------------------------------------
 |  Methods inherited from builtins.BaseException:
 |
 |  __getattribute__(self, name, /)
 |      Return getattr(self, name).
 |
 |  __reduce__(...)
 |      Helper for pickle.
 |
 |  __setstate__(...)
 |
 |  add_note(...)
 |      Exception.add_note(note) --
 |      add a note to the exception
 |
 |  with_traceback(...)
 |      Exception.with_traceback(tb) --
 |      set self.__traceback__ to tb and return self.
 |
 |  ----------------------------------------------------------------------
 |  Data descriptors inherited from builtins.BaseException:
 |
 |  __cause__
 |      exception cause
 |
 |  __context__
 |      exception context
 |
 |  __dict__
 |
 |  __suppress_context__
 |
 |  __traceback__
 |
 |  args
elasticsearch.SSLError
Python Library Documentation: class TlsError in module elastic_transport

class TlsError(ConnectionError)
 |  TlsError(message: Any, errors: Tuple[Exception, ...] = ())
 |
 |  Error raised by during the TLS handshake
 |
 |  Method resolution order:
 |      TlsError
 |      ConnectionError
 |      TransportError
 |      builtins.Exception
 |      builtins.BaseException
 |      builtins.object
 |
 |  Methods defined here:
 |
 |  __str__(self) -> str
 |      Return str(self).
 |
 |  ----------------------------------------------------------------------
 |  Methods inherited from TransportError:
 |
 |  __init__(self, message: Any, errors: Tuple[Exception, ...] = ())
 |      Initialize self.  See help(type(self)) for accurate signature.
 |
 |  __repr__(self) -> str
 |      Return repr(self).
 |
 |  ----------------------------------------------------------------------
 |  Data descriptors inherited from TransportError:
 |
 |  __weakref__
 |      list of weak references to the object
 |
 |  ----------------------------------------------------------------------
 |  Static methods inherited from builtins.Exception:
 |
 |  __new__(*args, **kwargs) class method of builtins.Exception
 |      Create and return a new object.  See help(type) for accurate signature.
 |
 |  ----------------------------------------------------------------------
 |  Methods inherited from builtins.BaseException:
 |
 |  __getattribute__(self, name, /)
 |      Return getattr(self, name).
 |
 |  __reduce__(...)
 |      Helper for pickle.
 |
 |  __setstate__(...)
 |
 |  add_note(...)
 |      Exception.add_note(note) --
 |      add a note to the exception
 |
 |  with_traceback(...)
 |      Exception.with_traceback(tb) --
 |      set self.__traceback__ to tb and return self.
 |
 |  ----------------------------------------------------------------------
 |  Data descriptors inherited from builtins.BaseException:
 |
 |  __cause__
 |      exception cause
 |
 |  __context__
 |      exception context
 |
 |  __dict__
 |
 |  __suppress_context__
 |
 |  __traceback__
 |
 |  args
elasticsearch.SerializationError
Python Library Documentation: class SerializationError in module elastic_transport

class SerializationError(TransportError)
 |  SerializationError(message: Any, errors: Tuple[Exception, ...] = ())
 |
 |  Error that occurred during the serialization or
 |  deserialization of an HTTP message body
 |
 |  Method resolution order:
 |      SerializationError
 |      TransportError
 |      builtins.Exception
 |      builtins.BaseException
 |      builtins.object
 |
 |  Methods inherited from TransportError:
 |
 |  __init__(self, message: Any, errors: Tuple[Exception, ...] = ())
 |      Initialize self.  See help(type(self)) for accurate signature.
 |
 |  __repr__(self) -> str
 |      Return repr(self).
 |
 |  __str__(self) -> str
 |      Return str(self).
 |
 |  ----------------------------------------------------------------------
 |  Data descriptors inherited from TransportError:
 |
 |  __weakref__
 |      list of weak references to the object
 |
 |  ----------------------------------------------------------------------
 |  Static methods inherited from builtins.Exception:
 |
 |  __new__(*args, **kwargs) class method of builtins.Exception
 |      Create and return a new object.  See help(type) for accurate signature.
 |
 |  ----------------------------------------------------------------------
 |  Methods inherited from builtins.BaseException:
 |
 |  __getattribute__(self, name, /)
 |      Return getattr(self, name).
 |
 |  __reduce__(...)
 |      Helper for pickle.
 |
 |  __setstate__(...)
 |
 |  add_note(...)
 |      Exception.add_note(note) --
 |      add a note to the exception
 |
 |  with_traceback(...)
 |      Exception.with_traceback(tb) --
 |      set self.__traceback__ to tb and return self.
 |
 |  ----------------------------------------------------------------------
 |  Data descriptors inherited from builtins.BaseException:
 |
 |  __cause__
 |      exception cause
 |
 |  __context__
 |      exception context
 |
 |  __dict__
 |
 |  __suppress_context__
 |
 |  __traceback__
 |
 |  args
elasticsearch.TransportError
Python Library Documentation: class TransportError in module elastic_transport

class TransportError(builtins.Exception)
 |  TransportError(message: Any, errors: Tuple[Exception, ...] = ())
 |
 |  Generic exception for the 'elastic-transport' package.
 |
 |  For the 'errors' attribute, errors are ordered from
 |  most recently raised (index=0) to least recently raised (index=N)
 |
 |  If an HTTP status code is available with the error it
 |  will be stored under 'status'. If HTTP headers are available
 |  they are stored under 'headers'.
 |
 |  Method resolution order:
 |      TransportError
 |      builtins.Exception
 |      builtins.BaseException
 |      builtins.object
 |
 |  Methods defined here:
 |
 |  __init__(self, message: Any, errors: Tuple[Exception, ...] = ())
 |      Initialize self.  See help(type(self)) for accurate signature.
 |
 |  __repr__(self) -> str
 |      Return repr(self).
 |
 |  __str__(self) -> str
 |      Return str(self).
 |
 |  ----------------------------------------------------------------------
 |  Data descriptors defined here:
 |
 |  __weakref__
 |      list of weak references to the object
 |
 |  ----------------------------------------------------------------------
 |  Static methods inherited from builtins.Exception:
 |
 |  __new__(*args, **kwargs) class method of builtins.Exception
 |      Create and return a new object.  See help(type) for accurate signature.
 |
 |  ----------------------------------------------------------------------
 |  Methods inherited from builtins.BaseException:
 |
 |  __getattribute__(self, name, /)
 |      Return getattr(self, name).
 |
 |  __reduce__(...)
 |      Helper for pickle.
 |
 |  __setstate__(...)
 |
 |  add_note(...)
 |      Exception.add_note(note) --
 |      add a note to the exception
 |
 |  with_traceback(...)
 |      Exception.with_traceback(tb) --
 |      set self.__traceback__ to tb and return self.
 |
 |  ----------------------------------------------------------------------
 |  Data descriptors inherited from builtins.BaseException:
 |
 |  __cause__
 |      exception cause
 |
 |  __context__
 |      exception context
 |
 |  __dict__
 |
 |  __suppress_context__
 |
 |  __traceback__
 |
 |  args
elasticsearch.UnsupportedProductError
Python Library Documentation: class UnsupportedProductError in module elasticsearch

class UnsupportedProductError(ApiError)
 |  UnsupportedProductError(message: str, meta: elastic_transport.ApiResponseMeta, body: Any, errors: Tuple[Exception, ...] = ())
 |
 |  Error which is raised when the client detects
 |  it's not connected to a supported product.
 |
 |  Method resolution order:
 |      UnsupportedProductError
 |      ApiError
 |      elastic_transport.ApiError
 |      builtins.Exception
 |      builtins.BaseException
 |      builtins.object
 |
 |  Methods defined here:
 |
 |  __str__(self) -> str
 |      Return str(self).
 |
 |  ----------------------------------------------------------------------
 |  Readonly properties inherited from ApiError:
 |
 |  error
 |      Backwards-compatible way to access ``self.message``
 |
 |  info
 |      Backwards-compatible way to access ``self.body``
 |
 |  status_code
 |      Backwards-compatible way to access ``self.meta.status``
 |
 |  ----------------------------------------------------------------------
 |  Methods inherited from elastic_transport.ApiError:
 |
 |  __init__(self, message: str, meta: elastic_transport.ApiResponseMeta, body: Any, errors: Tuple[Exception, ...] = ())
 |      Initialize self.  See help(type(self)) for accurate signature.
 |
 |  __repr__(self) -> str
 |      Return repr(self).
 |
 |  ----------------------------------------------------------------------
 |  Data descriptors inherited from elastic_transport.ApiError:
 |
 |  __weakref__
 |      list of weak references to the object
 |
 |  ----------------------------------------------------------------------
 |  Static methods inherited from builtins.Exception:
 |
 |  __new__(*args, **kwargs) class method of builtins.Exception
 |      Create and return a new object.  See help(type) for accurate signature.
 |
 |  ----------------------------------------------------------------------
 |  Methods inherited from builtins.BaseException:
 |
 |  __getattribute__(self, name, /)
 |      Return getattr(self, name).
 |
 |  __reduce__(...)
 |      Helper for pickle.
 |
 |  __setstate__(...)
 |
 |  add_note(...)
 |      Exception.add_note(note) --
 |      add a note to the exception
 |
 |  with_traceback(...)
 |      Exception.with_traceback(tb) --
 |      set self.__traceback__ to tb and return self.
 |
 |  ----------------------------------------------------------------------
 |  Data descriptors inherited from builtins.BaseException:
 |
 |  __cause__
 |      exception cause
 |
 |  __context__
 |      exception context
 |
 |  __dict__
 |
 |  __suppress_context__
 |
 |  __traceback__
 |
 |  args
elasticsearch.VERSION
Python Library Documentation: tuple object

class tuple(object)
 |  tuple(iterable=(), /)
 |
 |  Built-in immutable sequence.
 |
 |  If no argument is given, the constructor returns an empty tuple.
 |  If iterable is specified the tuple is initialized from iterable's items.
 |
 |  If the argument is a tuple, the return value is the same object.
 |
 |  Built-in subclasses:
 |      AFDGroupAttributes
 |      AFDPollOpAttributes
 |      AFDWaitersAttributes
 |      asyncgen_hooks
 |      ... and 71 other subclasses
 |
 |  Methods defined here:
 |
 |  __add__(self, value, /)
 |      Return self+value.
 |
 |  __contains__(self, key, /)
 |      Return bool(key in self).
 |
 |  __eq__(self, value, /)
 |      Return self==value.
 |
 |  __ge__(self, value, /)
 |      Return self>=value.
 |
 |  __getattribute__(self, name, /)
 |      Return getattr(self, name).
 |
 |  __getitem__(self, key, /)
 |      Return self[key].
 |
 |  __getnewargs__(self, /)
 |
 |  __gt__(self, value, /)
 |      Return self>value.
 |
 |  __hash__(self, /)
 |      Return hash(self).
 |
 |  __iter__(self, /)
 |      Implement iter(self).
 |
 |  __le__(self, value, /)
 |      Return self<=value.
 |
 |  __len__(self, /)
 |      Return len(self).
 |
 |  __lt__(self, value, /)
 |      Return self<value.
 |
 |  __mul__(self, value, /)
 |      Return self*value.
 |
 |  __ne__(self, value, /)
 |      Return self!=value.
 |
 |  __repr__(self, /)
 |      Return repr(self).
 |
 |  __rmul__(self, value, /)
 |      Return value*self.
 |
 |  count(self, value, /)
 |      Return number of occurrences of value.
 |
 |  index(self, value, start=0, stop=9223372036854775807, /)
 |      Return first index of value.
 |
 |      Raises ValueError if the value is not present.
 |
 |  ----------------------------------------------------------------------
 |  Class methods defined here:
 |
 |  __class_getitem__(...)
 |      See PEP 585
 |
 |  ----------------------------------------------------------------------
 |  Static methods defined here:
 |
 |  __new__(*args, **kwargs)
 |      Create and return a new object.  See help(type) for accurate signature.
elasticsearch.compat
Python Library Documentation: module elasticsearch.compat in elasticsearch

NAME
    elasticsearch.compat

DESCRIPTION
    #  Licensed to Elasticsearch B.V. under one or more contributor
    #  license agreements. See the NOTICE file distributed with
    #  this work for additional information regarding copyright
    #  ownership. Elasticsearch B.V. licenses this file to you under
    #  the Apache License, Version 2.0 (the "License"); you may
    #  not use this file except in compliance with the License.
    #  You may obtain a copy of the License at
    #
    #       http://www.apache.org/licenses/LICENSE-2.0
    #
    #  Unless required by applicable law or agreed to in writing,
    #  software distributed under the License is distributed on an
    #  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    #  KIND, either express or implied.  See the License for the
    #  specific language governing permissions and limitations
    #  under the License.

FUNCTIONS
    safe_thread(target: Callable[..., Any], *args: Any, **kwargs: Any) -> Iterator[threading.Thread]
        Run a thread within a context manager block.

        The thread is automatically joined when the block ends. If the thread raised
        an exception, it is raised in the caller's context.

    to_bytes(x: Union[str, bytes], encoding: str = 'ascii') -> bytes

    to_str(x: Union[str, bytes], encoding: str = 'ascii') -> str

    warn_stacklevel() -> int
        Dynamically determine warning stacklevel for warnings based on the call stack

DATA
    __all__ = ['string_types', 'to_str', 'to_bytes', 'warn_stacklevel', 's...
    __annotations__ = {'string_types': typing.Tuple[typing.Type[str], typi...
    string_types = (<class 'str'>, <class 'bytes'>)

FILE
    c:\users\youse\appdata\local\programs\python\python312\lib\site-packages\elasticsearch\compat.py

elasticsearch.exceptions
Python Library Documentation: module elasticsearch.exceptions in elasticsearch

NAME
    elasticsearch.exceptions

DESCRIPTION
    #  Licensed to Elasticsearch B.V. under one or more contributor
    #  license agreements. See the NOTICE file distributed with
    #  this work for additional information regarding copyright
    #  ownership. Elasticsearch B.V. licenses this file to you under
    #  the Apache License, Version 2.0 (the "License"); you may
    #  not use this file except in compliance with the License.
    #  You may obtain a copy of the License at
    #
    #       http://www.apache.org/licenses/LICENSE-2.0
    #
    #  Unless required by applicable law or agreed to in writing,
    #  software distributed under the License is distributed on an
    #  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    #  KIND, either express or implied.  See the License for the
    #  specific language governing permissions and limitations
    #  under the License.

CLASSES
    builtins.Exception(builtins.BaseException)
        elastic_transport.TransportError
            elastic_transport.ConnectionError
                elastic_transport.TlsError
            elastic_transport.ConnectionTimeout
            elastic_transport.SerializationError
    elasticsearch.ApiError(elastic_transport.ApiError)
        elasticsearch.AuthenticationException
        elasticsearch.AuthorizationException
        elasticsearch.BadRequestError
        elasticsearch.ConflictError
        elasticsearch.NotFoundError

    class AuthenticationException(ApiError)
     |  AuthenticationException(message: str, meta: elastic_transport.ApiResponseMeta, body: Any, errors: Tuple[Exception, ...] = ())
     |
     |  Exception representing a 401 status code.
     |
     |  Method resolution order:
     |      AuthenticationException
     |      ApiError
     |      elastic_transport.ApiError
     |      builtins.Exception
     |      builtins.BaseException
     |      builtins.object
     |
     |  Methods inherited from ApiError:
     |
     |  __str__(self) -> str
     |      Return str(self).
     |
     |  ----------------------------------------------------------------------
     |  Readonly properties inherited from ApiError:
     |
     |  error
     |      Backwards-compatible way to access ``self.message``
     |
     |  info
     |      Backwards-compatible way to access ``self.body``
     |
     |  status_code
     |      Backwards-compatible way to access ``self.meta.status``
     |
     |  ----------------------------------------------------------------------
     |  Methods inherited from elastic_transport.ApiError:
     |
     |  __init__(self, message: str, meta: elastic_transport.ApiResponseMeta, body: Any, errors: Tuple[Exception, ...] = ())
     |      Initialize self.  See help(type(self)) for accurate signature.
     |
     |  __repr__(self) -> str
     |      Return repr(self).
     |
     |  ----------------------------------------------------------------------
     |  Data descriptors inherited from elastic_transport.ApiError:
     |
     |  __weakref__
     |      list of weak references to the object
     |
     |  ----------------------------------------------------------------------
     |  Static methods inherited from builtins.Exception:
     |
     |  __new__(*args, **kwargs) class method of builtins.Exception
     |      Create and return a new object.  See help(type) for accurate signature.
     |
     |  ----------------------------------------------------------------------
     |  Methods inherited from builtins.BaseException:
     |
     |  __getattribute__(self, name, /)
     |      Return getattr(self, name).
     |
     |  __reduce__(...)
     |      Helper for pickle.
     |
     |  __setstate__(...)
     |
     |  add_note(...)
     |      Exception.add_note(note) --
     |      add a note to the exception
     |
     |  with_traceback(...)
     |      Exception.with_traceback(tb) --
     |      set self.__traceback__ to tb and return self.
     |
     |  ----------------------------------------------------------------------
     |  Data descriptors inherited from builtins.BaseException:
     |
     |  __cause__
     |      exception cause
     |
     |  __context__
     |      exception context
     |
     |  __dict__
     |
     |  __suppress_context__
     |
     |  __traceback__
     |
     |  args

    class AuthorizationException(ApiError)
     |  AuthorizationException(message: str, meta: elastic_transport.ApiResponseMeta, body: Any, errors: Tuple[Exception, ...] = ())
     |
     |  Exception representing a 403 status code.
     |
     |  Method resolution order:
     |      AuthorizationException
     |      ApiError
     |      elastic_transport.ApiError
     |      builtins.Exception
     |      builtins.BaseException
     |      builtins.object
     |
     |  Methods inherited from ApiError:
     |
     |  __str__(self) -> str
     |      Return str(self).
     |
     |  ----------------------------------------------------------------------
     |  Readonly properties inherited from ApiError:
     |
     |  error
     |      Backwards-compatible way to access ``self.message``
     |
     |  info
     |      Backwards-compatible way to access ``self.body``
     |
     |  status_code
     |      Backwards-compatible way to access ``self.meta.status``
     |
     |  ----------------------------------------------------------------------
     |  Methods inherited from elastic_transport.ApiError:
     |
     |  __init__(self, message: str, meta: elastic_transport.ApiResponseMeta, body: Any, errors: Tuple[Exception, ...] = ())
     |      Initialize self.  See help(type(self)) for accurate signature.
     |
     |  __repr__(self) -> str
     |      Return repr(self).
     |
     |  ----------------------------------------------------------------------
     |  Data descriptors inherited from elastic_transport.ApiError:
     |
     |  __weakref__
     |      list of weak references to the object
     |
     |  ----------------------------------------------------------------------
     |  Static methods inherited from builtins.Exception:
     |
     |  __new__(*args, **kwargs) class method of builtins.Exception
     |      Create and return a new object.  See help(type) for accurate signature.
     |
     |  ----------------------------------------------------------------------
     |  Methods inherited from builtins.BaseException:
     |
     |  __getattribute__(self, name, /)
     |      Return getattr(self, name).
     |
     |  __reduce__(...)
     |      Helper for pickle.
     |
     |  __setstate__(...)
     |
     |  add_note(...)
     |      Exception.add_note(note) --
     |      add a note to the exception
     |
     |  with_traceback(...)
     |      Exception.with_traceback(tb) --
     |      set self.__traceback__ to tb and return self.
     |
     |  ----------------------------------------------------------------------
     |  Data descriptors inherited from builtins.BaseException:
     |
     |  __cause__
     |      exception cause
     |
     |  __context__
     |      exception context
     |
     |  __dict__
     |
     |  __suppress_context__
     |
     |  __traceback__
     |
     |  args

    class BadRequestError(ApiError)
     |  BadRequestError(message: str, meta: elastic_transport.ApiResponseMeta, body: Any, errors: Tuple[Exception, ...] = ())
     |
     |  Exception representing a 400 status code.
     |
     |  Method resolution order:
     |      BadRequestError
     |      ApiError
     |      elastic_transport.ApiError
     |      builtins.Exception
     |      builtins.BaseException
     |      builtins.object
     |
     |  Methods inherited from ApiError:
     |
     |  __str__(self) -> str
     |      Return str(self).
     |
     |  ----------------------------------------------------------------------
     |  Readonly properties inherited from ApiError:
     |
     |  error
     |      Backwards-compatible way to access ``self.message``
     |
     |  info
     |      Backwards-compatible way to access ``self.body``
     |
     |  status_code
     |      Backwards-compatible way to access ``self.meta.status``
     |
     |  ----------------------------------------------------------------------
     |  Methods inherited from elastic_transport.ApiError:
     |
     |  __init__(self, message: str, meta: elastic_transport.ApiResponseMeta, body: Any, errors: Tuple[Exception, ...] = ())
     |      Initialize self.  See help(type(self)) for accurate signature.
     |
     |  __repr__(self) -> str
     |      Return repr(self).
     |
     |  ----------------------------------------------------------------------
     |  Data descriptors inherited from elastic_transport.ApiError:
     |
     |  __weakref__
     |      list of weak references to the object
     |
     |  ----------------------------------------------------------------------
     |  Static methods inherited from builtins.Exception:
     |
     |  __new__(*args, **kwargs) class method of builtins.Exception
     |      Create and return a new object.  See help(type) for accurate signature.
     |
     |  ----------------------------------------------------------------------
     |  Methods inherited from builtins.BaseException:
     |
     |  __getattribute__(self, name, /)
     |      Return getattr(self, name).
     |
     |  __reduce__(...)
     |      Helper for pickle.
     |
     |  __setstate__(...)
     |
     |  add_note(...)
     |      Exception.add_note(note) --
     |      add a note to the exception
     |
     |  with_traceback(...)
     |      Exception.with_traceback(tb) --
     |      set self.__traceback__ to tb and return self.
     |
     |  ----------------------------------------------------------------------
     |  Data descriptors inherited from builtins.BaseException:
     |
     |  __cause__
     |      exception cause
     |
     |  __context__
     |      exception context
     |
     |  __dict__
     |
     |  __suppress_context__
     |
     |  __traceback__
     |
     |  args

    class ConflictError(ApiError)
     |  ConflictError(message: str, meta: elastic_transport.ApiResponseMeta, body: Any, errors: Tuple[Exception, ...] = ())
     |
     |  Exception representing a 409 status code.
     |
     |  Method resolution order:
     |      ConflictError
     |      ApiError
     |      elastic_transport.ApiError
     |      builtins.Exception
     |      builtins.BaseException
     |      builtins.object
     |
     |  Methods inherited from ApiError:
     |
     |  __str__(self) -> str
     |      Return str(self).
     |
     |  ----------------------------------------------------------------------
     |  Readonly properties inherited from ApiError:
     |
     |  error
     |      Backwards-compatible way to access ``self.message``
     |
     |  info
     |      Backwards-compatible way to access ``self.body``
     |
     |  status_code
     |      Backwards-compatible way to access ``self.meta.status``
     |
     |  ----------------------------------------------------------------------
     |  Methods inherited from elastic_transport.ApiError:
     |
     |  __init__(self, message: str, meta: elastic_transport.ApiResponseMeta, body: Any, errors: Tuple[Exception, ...] = ())
     |      Initialize self.  See help(type(self)) for accurate signature.
     |
     |  __repr__(self) -> str
     |      Return repr(self).
     |
     |  ----------------------------------------------------------------------
     |  Data descriptors inherited from elastic_transport.ApiError:
     |
     |  __weakref__
     |      list of weak references to the object
     |
     |  ----------------------------------------------------------------------
     |  Static methods inherited from builtins.Exception:
     |
     |  __new__(*args, **kwargs) class method of builtins.Exception
     |      Create and return a new object.  See help(type) for accurate signature.
     |
     |  ----------------------------------------------------------------------
     |  Methods inherited from builtins.BaseException:
     |
     |  __getattribute__(self, name, /)
     |      Return getattr(self, name).
     |
     |  __reduce__(...)
     |      Helper for pickle.
     |
     |  __setstate__(...)
     |
     |  add_note(...)
     |      Exception.add_note(note) --
     |      add a note to the exception
     |
     |  with_traceback(...)
     |      Exception.with_traceback(tb) --
     |      set self.__traceback__ to tb and return self.
     |
     |  ----------------------------------------------------------------------
     |  Data descriptors inherited from builtins.BaseException:
     |
     |  __cause__
     |      exception cause
     |
     |  __context__
     |      exception context
     |
     |  __dict__
     |
     |  __suppress_context__
     |
     |  __traceback__
     |
     |  args

    class ConnectionError(TransportError)
     |  ConnectionError(message: Any, errors: Tuple[Exception, ...] = ())
     |
     |  Error raised by the HTTP connection
     |
     |  Method resolution order:
     |      ConnectionError
     |      TransportError
     |      builtins.Exception
     |      builtins.BaseException
     |      builtins.object
     |
     |  Methods defined here:
     |
     |  __str__(self) -> str
     |      Return str(self).
     |
     |  ----------------------------------------------------------------------
     |  Methods inherited from TransportError:
     |
     |  __init__(self, message: Any, errors: Tuple[Exception, ...] = ())
     |      Initialize self.  See help(type(self)) for accurate signature.
     |
     |  __repr__(self) -> str
     |      Return repr(self).
     |
     |  ----------------------------------------------------------------------
     |  Data descriptors inherited from TransportError:
     |
     |  __weakref__
     |      list of weak references to the object
     |
     |  ----------------------------------------------------------------------
     |  Static methods inherited from builtins.Exception:
     |
     |  __new__(*args, **kwargs) class method of builtins.Exception
     |      Create and return a new object.  See help(type) for accurate signature.
     |
     |  ----------------------------------------------------------------------
     |  Methods inherited from builtins.BaseException:
     |
     |  __getattribute__(self, name, /)
     |      Return getattr(self, name).
     |
     |  __reduce__(...)
     |      Helper for pickle.
     |
     |  __setstate__(...)
     |
     |  add_note(...)
     |      Exception.add_note(note) --
     |      add a note to the exception
     |
     |  with_traceback(...)
     |      Exception.with_traceback(tb) --
     |      set self.__traceback__ to tb and return self.
     |
     |  ----------------------------------------------------------------------
     |  Data descriptors inherited from builtins.BaseException:
     |
     |  __cause__
     |      exception cause
     |
     |  __context__
     |      exception context
     |
     |  __dict__
     |
     |  __suppress_context__
     |
     |  __traceback__
     |
     |  args

    class ConnectionTimeout(TransportError)
     |  ConnectionTimeout(message: Any, errors: Tuple[Exception, ...] = ())
     |
     |  Connection timed out during an operation
     |
     |  Method resolution order:
     |      ConnectionTimeout
     |      TransportError
     |      builtins.Exception
     |      builtins.BaseException
     |      builtins.object
     |
     |  Methods defined here:
     |
     |  __str__(self) -> str
     |      Return str(self).
     |
     |  ----------------------------------------------------------------------
     |  Methods inherited from TransportError:
     |
     |  __init__(self, message: Any, errors: Tuple[Exception, ...] = ())
     |      Initialize self.  See help(type(self)) for accurate signature.
     |
     |  __repr__(self) -> str
     |      Return repr(self).
     |
     |  ----------------------------------------------------------------------
     |  Data descriptors inherited from TransportError:
     |
     |  __weakref__
     |      list of weak references to the object
     |
     |  ----------------------------------------------------------------------
     |  Static methods inherited from builtins.Exception:
     |
     |  __new__(*args, **kwargs) class method of builtins.Exception
     |      Create and return a new object.  See help(type) for accurate signature.
     |
     |  ----------------------------------------------------------------------
     |  Methods inherited from builtins.BaseException:
     |
     |  __getattribute__(self, name, /)
     |      Return getattr(self, name).
     |
     |  __reduce__(...)
     |      Helper for pickle.
     |
     |  __setstate__(...)
     |
     |  add_note(...)
     |      Exception.add_note(note) --
     |      add a note to the exception
     |
     |  with_traceback(...)
     |      Exception.with_traceback(tb) --
     |      set self.__traceback__ to tb and return self.
     |
     |  ----------------------------------------------------------------------
     |  Data descriptors inherited from builtins.BaseException:
     |
     |  __cause__
     |      exception cause
     |
     |  __context__
     |      exception context
     |
     |  __dict__
     |
     |  __suppress_context__
     |
     |  __traceback__
     |
     |  args

    class NotFoundError(ApiError)
     |  NotFoundError(message: str, meta: elastic_transport.ApiResponseMeta, body: Any, errors: Tuple[Exception, ...] = ())
     |
     |  Exception representing a 404 status code.
     |
     |  Method resolution order:
     |      NotFoundError
     |      ApiError
     |      elastic_transport.ApiError
     |      builtins.Exception
     |      builtins.BaseException
     |      builtins.object
     |
     |  Methods inherited from ApiError:
     |
     |  __str__(self) -> str
     |      Return str(self).
     |
     |  ----------------------------------------------------------------------
     |  Readonly properties inherited from ApiError:
     |
     |  error
     |      Backwards-compatible way to access ``self.message``
     |
     |  info
     |      Backwards-compatible way to access ``self.body``
     |
     |  status_code
     |      Backwards-compatible way to access ``self.meta.status``
     |
     |  ----------------------------------------------------------------------
     |  Methods inherited from elastic_transport.ApiError:
     |
     |  __init__(self, message: str, meta: elastic_transport.ApiResponseMeta, body: Any, errors: Tuple[Exception, ...] = ())
     |      Initialize self.  See help(type(self)) for accurate signature.
     |
     |  __repr__(self) -> str
     |      Return repr(self).
     |
     |  ----------------------------------------------------------------------
     |  Data descriptors inherited from elastic_transport.ApiError:
     |
     |  __weakref__
     |      list of weak references to the object
     |
     |  ----------------------------------------------------------------------
     |  Static methods inherited from builtins.Exception:
     |
     |  __new__(*args, **kwargs) class method of builtins.Exception
     |      Create and return a new object.  See help(type) for accurate signature.
     |
     |  ----------------------------------------------------------------------
     |  Methods inherited from builtins.BaseException:
     |
     |  __getattribute__(self, name, /)
     |      Return getattr(self, name).
     |
     |  __reduce__(...)
     |      Helper for pickle.
     |
     |  __setstate__(...)
     |
     |  add_note(...)
     |      Exception.add_note(note) --
     |      add a note to the exception
     |
     |  with_traceback(...)
     |      Exception.with_traceback(tb) --
     |      set self.__traceback__ to tb and return self.
     |
     |  ----------------------------------------------------------------------
     |  Data descriptors inherited from builtins.BaseException:
     |
     |  __cause__
     |      exception cause
     |
     |  __context__
     |      exception context
     |
     |  __dict__
     |
     |  __suppress_context__
     |
     |  __traceback__
     |
     |  args

    SSLError = class TlsError(ConnectionError)
     |  SSLError(message: Any, errors: Tuple[Exception, ...] = ())
     |
     |  Error raised by during the TLS handshake
     |
     |  Method resolution order:
     |      TlsError
     |      ConnectionError
     |      TransportError
     |      builtins.Exception
     |      builtins.BaseException
     |      builtins.object
     |
     |  Methods defined here:
     |
     |  __str__(self) -> str
     |      Return str(self).
     |
     |  ----------------------------------------------------------------------
     |  Methods inherited from TransportError:
     |
     |  __init__(self, message: Any, errors: Tuple[Exception, ...] = ())
     |      Initialize self.  See help(type(self)) for accurate signature.
     |
     |  __repr__(self) -> str
     |      Return repr(self).
     |
     |  ----------------------------------------------------------------------
     |  Data descriptors inherited from TransportError:
     |
     |  __weakref__
     |      list of weak references to the object
     |
     |  ----------------------------------------------------------------------
     |  Static methods inherited from builtins.Exception:
     |
     |  __new__(*args, **kwargs) class method of builtins.Exception
     |      Create and return a new object.  See help(type) for accurate signature.
     |
     |  ----------------------------------------------------------------------
     |  Methods inherited from builtins.BaseException:
     |
     |  __getattribute__(self, name, /)
     |      Return getattr(self, name).
     |
     |  __reduce__(...)
     |      Helper for pickle.
     |
     |  __setstate__(...)
     |
     |  add_note(...)
     |      Exception.add_note(note) --
     |      add a note to the exception
     |
     |  with_traceback(...)
     |      Exception.with_traceback(tb) --
     |      set self.__traceback__ to tb and return self.
     |
     |  ----------------------------------------------------------------------
     |  Data descriptors inherited from builtins.BaseException:
     |
     |  __cause__
     |      exception cause
     |
     |  __context__
     |      exception context
     |
     |  __dict__
     |
     |  __suppress_context__
     |
     |  __traceback__
     |
     |  args

    class SerializationError(TransportError)
     |  SerializationError(message: Any, errors: Tuple[Exception, ...] = ())
     |
     |  Error that occurred during the serialization or
     |  deserialization of an HTTP message body
     |
     |  Method resolution order:
     |      SerializationError
     |      TransportError
     |      builtins.Exception
     |      builtins.BaseException
     |      builtins.object
     |
     |  Methods inherited from TransportError:
     |
     |  __init__(self, message: Any, errors: Tuple[Exception, ...] = ())
     |      Initialize self.  See help(type(self)) for accurate signature.
     |
     |  __repr__(self) -> str
     |      Return repr(self).
     |
     |  __str__(self) -> str
     |      Return str(self).
     |
     |  ----------------------------------------------------------------------
     |  Data descriptors inherited from TransportError:
     |
     |  __weakref__
     |      list of weak references to the object
     |
     |  ----------------------------------------------------------------------
     |  Static methods inherited from builtins.Exception:
     |
     |  __new__(*args, **kwargs) class method of builtins.Exception
     |      Create and return a new object.  See help(type) for accurate signature.
     |
     |  ----------------------------------------------------------------------
     |  Methods inherited from builtins.BaseException:
     |
     |  __getattribute__(self, name, /)
     |      Return getattr(self, name).
     |
     |  __reduce__(...)
     |      Helper for pickle.
     |
     |  __setstate__(...)
     |
     |  add_note(...)
     |      Exception.add_note(note) --
     |      add a note to the exception
     |
     |  with_traceback(...)
     |      Exception.with_traceback(tb) --
     |      set self.__traceback__ to tb and return self.
     |
     |  ----------------------------------------------------------------------
     |  Data descriptors inherited from builtins.BaseException:
     |
     |  __cause__
     |      exception cause
     |
     |  __context__
     |      exception context
     |
     |  __dict__
     |
     |  __suppress_context__
     |
     |  __traceback__
     |
     |  args

    class TransportError(builtins.Exception)
     |  TransportError(message: Any, errors: Tuple[Exception, ...] = ())
     |
     |  Generic exception for the 'elastic-transport' package.
     |
     |  For the 'errors' attribute, errors are ordered from
     |  most recently raised (index=0) to least recently raised (index=N)
     |
     |  If an HTTP status code is available with the error it
     |  will be stored under 'status'. If HTTP headers are available
     |  they are stored under 'headers'.
     |
     |  Method resolution order:
     |      TransportError
     |      builtins.Exception
     |      builtins.BaseException
     |      builtins.object
     |
     |  Methods defined here:
     |
     |  __init__(self, message: Any, errors: Tuple[Exception, ...] = ())
     |      Initialize self.  See help(type(self)) for accurate signature.
     |
     |  __repr__(self) -> str
     |      Return repr(self).
     |
     |  __str__(self) -> str
     |      Return str(self).
     |
     |  ----------------------------------------------------------------------
     |  Data descriptors defined here:
     |
     |  __weakref__
     |      list of weak references to the object
     |
     |  ----------------------------------------------------------------------
     |  Static methods inherited from builtins.Exception:
     |
     |  __new__(*args, **kwargs) class method of builtins.Exception
     |      Create and return a new object.  See help(type) for accurate signature.
     |
     |  ----------------------------------------------------------------------
     |  Methods inherited from builtins.BaseException:
     |
     |  __getattribute__(self, name, /)
     |      Return getattr(self, name).
     |
     |  __reduce__(...)
     |      Helper for pickle.
     |
     |  __setstate__(...)
     |
     |  add_note(...)
     |      Exception.add_note(note) --
     |      add a note to the exception
     |
     |  with_traceback(...)
     |      Exception.with_traceback(tb) --
     |      set self.__traceback__ to tb and return self.
     |
     |  ----------------------------------------------------------------------
     |  Data descriptors inherited from builtins.BaseException:
     |
     |  __cause__
     |      exception cause
     |
     |  __context__
     |      exception context
     |
     |  __dict__
     |
     |  __suppress_context__
     |
     |  __traceback__
     |
     |  args

DATA
    __all__ = ['SerializationError', 'TransportError', 'ConnectionError', ...
    __annotations__ = {'HTTP_EXCEPTIONS': typing.Dict[int, typing.Type[ela...

FILE
    c:\users\youse\appdata\local\programs\python\python312\lib\site-packages\elasticsearch\exceptions.py

elasticsearch.logger
Python Library Documentation: Logger in module logging object

class Logger(Filterer)
 |  Logger(name, level=0)
 |
 |  Instances of the Logger class represent a single logging channel. A
 |  "logging channel" indicates an area of an application. Exactly how an
 |  "area" is defined is up to the application developer. Since an
 |  application can have any number of areas, logging channels are identified
 |  by a unique string. Application areas can be nested (e.g. an area
 |  of "input processing" might include sub-areas "read CSV files", "read
 |  XLS files" and "read Gnumeric files"). To cater for this natural nesting,
 |  channel names are organized into a namespace hierarchy where levels are
 |  separated by periods, much like the Java or Python package namespace. So
 |  in the instance given above, channel names might be "input" for the upper
 |  level, and "input.csv", "input.xls" and "input.gnu" for the sub-levels.
 |  There is no arbitrary limit to the depth of nesting.
 |
 |  Method resolution order:
 |      Logger
 |      Filterer
 |      builtins.object
 |
 |  Methods defined here:
 |
 |  __init__(self, name, level=0)
 |      Initialize the logger with a name and an optional level.
 |
 |  __reduce__(self)
 |      Helper for pickle.
 |
 |  __repr__(self)
 |      Return repr(self).
 |
 |  addHandler(self, hdlr)
 |      Add the specified handler to this logger.
 |
 |  callHandlers(self, record)
 |      Pass a record to all relevant handlers.
 |
 |      Loop through all handlers for this logger and its parents in the
 |      logger hierarchy. If no handler was found, output a one-off error
 |      message to sys.stderr. Stop searching up the hierarchy whenever a
 |      logger with the "propagate" attribute set to zero is found - that
 |      will be the last logger whose handlers are called.
 |
 |  critical(self, msg, *args, **kwargs)
 |      Log 'msg % args' with severity 'CRITICAL'.
 |
 |      To pass exception information, use the keyword argument exc_info with
 |      a true value, e.g.
 |
 |      logger.critical("Houston, we have a %s", "major disaster", exc_info=True)
 |
 |  debug(self, msg, *args, **kwargs)
 |      Log 'msg % args' with severity 'DEBUG'.
 |
 |      To pass exception information, use the keyword argument exc_info with
 |      a true value, e.g.
 |
 |      logger.debug("Houston, we have a %s", "thorny problem", exc_info=True)
 |
 |  error(self, msg, *args, **kwargs)
 |      Log 'msg % args' with severity 'ERROR'.
 |
 |      To pass exception information, use the keyword argument exc_info with
 |      a true value, e.g.
 |
 |      logger.error("Houston, we have a %s", "major problem", exc_info=True)
 |
 |  exception(self, msg, *args, exc_info=True, **kwargs)
 |      Convenience method for logging an ERROR with exception information.
 |
 |  fatal(self, msg, *args, **kwargs)
 |      Don't use this method, use critical() instead.
 |
 |  findCaller(self, stack_info=False, stacklevel=1)
 |      Find the stack frame of the caller so that we can note the source
 |      file name, line number and function name.
 |
 |  getChild(self, suffix)
 |      Get a logger which is a descendant to this one.
 |
 |      This is a convenience method, such that
 |
 |      logging.getLogger('abc').getChild('def.ghi')
 |
 |      is the same as
 |
 |      logging.getLogger('abc.def.ghi')
 |
 |      It's useful, for example, when the parent logger is named using
 |      __name__ rather than a literal string.
 |
 |  getChildren(self)
 |
 |  getEffectiveLevel(self)
 |      Get the effective level for this logger.
 |
 |      Loop through this logger and its parents in the logger hierarchy,
 |      looking for a non-zero logging level. Return the first one found.
 |
 |  handle(self, record)
 |      Call the handlers for the specified record.
 |
 |      This method is used for unpickled records received from a socket, as
 |      well as those created locally. Logger-level filtering is applied.
 |
 |  hasHandlers(self)
 |      See if this logger has any handlers configured.
 |
 |      Loop through all handlers for this logger and its parents in the
 |      logger hierarchy. Return True if a handler was found, else False.
 |      Stop searching up the hierarchy whenever a logger with the "propagate"
 |      attribute set to zero is found - that will be the last logger which
 |      is checked for the existence of handlers.
 |
 |  info(self, msg, *args, **kwargs)
 |      Log 'msg % args' with severity 'INFO'.
 |
 |      To pass exception information, use the keyword argument exc_info with
 |      a true value, e.g.
 |
 |      logger.info("Houston, we have a %s", "notable problem", exc_info=True)
 |
 |  isEnabledFor(self, level)
 |      Is this logger enabled for level 'level'?
 |
 |  log(self, level, msg, *args, **kwargs)
 |      Log 'msg % args' with the integer severity 'level'.
 |
 |      To pass exception information, use the keyword argument exc_info with
 |      a true value, e.g.
 |
 |      logger.log(level, "We have a %s", "mysterious problem", exc_info=True)
 |
 |  makeRecord(self, name, level, fn, lno, msg, args, exc_info, func=None, extra=None, sinfo=None)
 |      A factory method which can be overridden in subclasses to create
 |      specialized LogRecords.
 |
 |  removeHandler(self, hdlr)
 |      Remove the specified handler from this logger.
 |
 |  setLevel(self, level)
 |      Set the logging level of this logger.  level must be an int or a str.
 |
 |  warn(self, msg, *args, **kwargs)
 |
 |  warning(self, msg, *args, **kwargs)
 |      Log 'msg % args' with severity 'WARNING'.
 |
 |      To pass exception information, use the keyword argument exc_info with
 |      a true value, e.g.
 |
 |      logger.warning("Houston, we have a %s", "bit of a problem", exc_info=True)
 |
 |  ----------------------------------------------------------------------
 |  Data and other attributes defined here:
 |
 |  manager = <logging.Manager object>
 |
 |  root = <RootLogger root (WARNING)>
 |
 |  ----------------------------------------------------------------------
 |  Methods inherited from Filterer:
 |
 |  addFilter(self, filter)
 |      Add the specified filter to this handler.
 |
 |  filter(self, record)
 |      Determine if a record is loggable by consulting all the filters.
 |
 |      The default is to allow the record to be logged; any filter can veto
 |      this by returning a false value.
 |      If a filter attached to a handler returns a log record instance,
 |      then that instance is used in place of the original log record in
 |      any further processing of the event by that handler.
 |      If a filter returns any other true value, the original log record
 |      is used in any further processing of the event by that handler.
 |
 |      If none of the filters return false values, this method returns
 |      a log record.
 |      If any of the filters return a false value, this method returns
 |      a false value.
 |
 |      .. versionchanged:: 3.2
 |
 |         Allow filters to be just callables.
 |
 |      .. versionchanged:: 3.12
 |         Allow filters to return a LogRecord instead of
 |         modifying it in place.
 |
 |  removeFilter(self, filter)
 |      Remove the specified filter from this handler.
 |
 |  ----------------------------------------------------------------------
 |  Data descriptors inherited from Filterer:
 |
 |  __dict__
 |      dictionary for instance variables
 |
 |  __weakref__
 |      list of weak references to the object
elasticsearch.logging
Python Library Documentation: package logging

NAME
    logging

MODULE REFERENCE
    https://docs.python.org/3.12/library/logging.html

    The following documentation is automatically generated from the Python
    source files.  It may be incomplete, incorrect or include features that
    are considered implementation detail and may vary between Python
    implementations.  When in doubt, consult the module reference at the
    location listed above.

DESCRIPTION
    Logging package for Python. Based on PEP 282 and comments thereto in
    comp.lang.python.

    Copyright (C) 2001-2022 Vinay Sajip. All Rights Reserved.

    To use, simply 'import logging' and log away!

PACKAGE CONTENTS
    config
    handlers

CLASSES
    builtins.object
        BufferingFormatter
        Filter
        Formatter
        LogRecord
        LoggerAdapter
    Filterer(builtins.object)
        Handler
            NullHandler
            StreamHandler
                FileHandler
        Logger

    class BufferingFormatter(builtins.object)
     |  BufferingFormatter(linefmt=None)
     |
     |  A formatter suitable for formatting a number of records.
     |
     |  Methods defined here:
     |
     |  __init__(self, linefmt=None)
     |      Optionally specify a formatter which will be used to format each
     |      individual record.
     |
     |  format(self, records)
     |      Format the specified records and return the result as a string.
     |
     |  formatFooter(self, records)
     |      Return the footer string for the specified records.
     |
     |  formatHeader(self, records)
     |      Return the header string for the specified records.
     |
     |  ----------------------------------------------------------------------
     |  Data descriptors defined here:
     |
     |  __dict__
     |      dictionary for instance variables
     |
     |  __weakref__
     |      list of weak references to the object

    class FileHandler(StreamHandler)
     |  FileHandler(filename, mode='a', encoding=None, delay=False, errors=None)
     |
     |  A handler class which writes formatted logging records to disk files.
     |
     |  Method resolution order:
     |      FileHandler
     |      StreamHandler
     |      Handler
     |      Filterer
     |      builtins.object
     |
     |  Methods defined here:
     |
     |  __init__(self, filename, mode='a', encoding=None, delay=False, errors=None)
     |      Open the specified file and use it as the stream for logging.
     |
     |  __repr__(self)
     |      Return repr(self).
     |
     |  close(self)
     |      Closes the stream.
     |
     |  emit(self, record)
     |      Emit a record.
     |
     |      If the stream was not opened because 'delay' was specified in the
     |      constructor, open it before calling the superclass's emit.
     |
     |      If stream is not open, current mode is 'w' and `_closed=True`, record
     |      will not be emitted (see Issue #42378).
     |
     |  ----------------------------------------------------------------------
     |  Methods inherited from StreamHandler:
     |
     |  flush(self)
     |      Flushes the stream.
     |
     |  setStream(self, stream)
     |      Sets the StreamHandler's stream to the specified value,
     |      if it is different.
     |
     |      Returns the old stream, if the stream was changed, or None
     |      if it wasn't.
     |
     |  ----------------------------------------------------------------------
     |  Class methods inherited from StreamHandler:
     |
     |  __class_getitem__ = GenericAlias(...)
     |      Represent a PEP 585 generic type
     |
     |      E.g. for t = list[int], t.__origin__ is list and t.__args__ is (int,).
     |
     |  ----------------------------------------------------------------------
     |  Data and other attributes inherited from StreamHandler:
     |
     |  terminator = '\n'
     |
     |  ----------------------------------------------------------------------
     |  Methods inherited from Handler:
     |
     |  acquire(self)
     |      Acquire the I/O thread lock.
     |
     |  createLock(self)
     |      Acquire a thread lock for serializing access to the underlying I/O.
     |
     |  format(self, record)
     |      Format the specified record.
     |
     |      If a formatter is set, use it. Otherwise, use the default formatter
     |      for the module.
     |
     |  get_name(self)
     |
     |  handle(self, record)
     |      Conditionally emit the specified logging record.
     |
     |      Emission depends on filters which may have been added to the handler.
     |      Wrap the actual emission of the record with acquisition/release of
     |      the I/O thread lock.
     |
     |      Returns an instance of the log record that was emitted
     |      if it passed all filters, otherwise a false value is returned.
     |
     |  handleError(self, record)
     |      Handle errors which occur during an emit() call.
     |
     |      This method should be called from handlers when an exception is
     |      encountered during an emit() call. If raiseExceptions is false,
     |      exceptions get silently ignored. This is what is mostly wanted
     |      for a logging system - most users will not care about errors in
     |      the logging system, they are more interested in application errors.
     |      You could, however, replace this with a custom handler if you wish.
     |      The record which was being processed is passed in to this method.
     |
     |  release(self)
     |      Release the I/O thread lock.
     |
     |  setFormatter(self, fmt)
     |      Set the formatter for this handler.
     |
     |  setLevel(self, level)
     |      Set the logging level of this handler.  level must be an int or a str.
     |
     |  set_name(self, name)
     |
     |  ----------------------------------------------------------------------
     |  Data descriptors inherited from Handler:
     |
     |  name
     |
     |  ----------------------------------------------------------------------
     |  Methods inherited from Filterer:
     |
     |  addFilter(self, filter)
     |      Add the specified filter to this handler.
     |
     |  filter(self, record)
     |      Determine if a record is loggable by consulting all the filters.
     |
     |      The default is to allow the record to be logged; any filter can veto
     |      this by returning a false value.
     |      If a filter attached to a handler returns a log record instance,
     |      then that instance is used in place of the original log record in
     |      any further processing of the event by that handler.
     |      If a filter returns any other true value, the original log record
     |      is used in any further processing of the event by that handler.
     |
     |      If none of the filters return false values, this method returns
     |      a log record.
     |      If any of the filters return a false value, this method returns
     |      a false value.
     |
     |      .. versionchanged:: 3.2
     |
     |         Allow filters to be just callables.
     |
     |      .. versionchanged:: 3.12
     |         Allow filters to return a LogRecord instead of
     |         modifying it in place.
     |
     |  removeFilter(self, filter)
     |      Remove the specified filter from this handler.
     |
     |  ----------------------------------------------------------------------
     |  Data descriptors inherited from Filterer:
     |
     |  __dict__
     |      dictionary for instance variables
     |
     |  __weakref__
     |      list of weak references to the object

    class Filter(builtins.object)
     |  Filter(name='')
     |
     |  Filter instances are used to perform arbitrary filtering of LogRecords.
     |
     |  Loggers and Handlers can optionally use Filter instances to filter
     |  records as desired. The base filter class only allows events which are
     |  below a certain point in the logger hierarchy. For example, a filter
     |  initialized with "A.B" will allow events logged by loggers "A.B",
     |  "A.B.C", "A.B.C.D", "A.B.D" etc. but not "A.BB", "B.A.B" etc. If
     |  initialized with the empty string, all events are passed.
     |
     |  Methods defined here:
     |
     |  __init__(self, name='')
     |      Initialize a filter.
     |
     |      Initialize with the name of the logger which, together with its
     |      children, will have its events allowed through the filter. If no
     |      name is specified, allow every event.
     |
     |  filter(self, record)
     |      Determine if the specified record is to be logged.
     |
     |      Returns True if the record should be logged, or False otherwise.
     |      If deemed appropriate, the record may be modified in-place.
     |
     |  ----------------------------------------------------------------------
     |  Data descriptors defined here:
     |
     |  __dict__
     |      dictionary for instance variables
     |
     |  __weakref__
     |      list of weak references to the object

    class Formatter(builtins.object)
     |  Formatter(fmt=None, datefmt=None, style='%', validate=True, *, defaults=None)
     |
     |  Formatter instances are used to convert a LogRecord to text.
     |
     |  Formatters need to know how a LogRecord is constructed. They are
     |  responsible for converting a LogRecord to (usually) a string which can
     |  be interpreted by either a human or an external system. The base Formatter
     |  allows a formatting string to be specified. If none is supplied, the
     |  style-dependent default value, "%(message)s", "{message}", or
     |  "${message}", is used.
     |
     |  The Formatter can be initialized with a format string which makes use of
     |  knowledge of the LogRecord attributes - e.g. the default value mentioned
     |  above makes use of the fact that the user's message and arguments are pre-
     |  formatted into a LogRecord's message attribute. Currently, the useful
     |  attributes in a LogRecord are described by:
     |
     |  %(name)s            Name of the logger (logging channel)
     |  %(levelno)s         Numeric logging level for the message (DEBUG, INFO,
     |                      WARNING, ERROR, CRITICAL)
     |  %(levelname)s       Text logging level for the message ("DEBUG", "INFO",
     |                      "WARNING", "ERROR", "CRITICAL")
     |  %(pathname)s        Full pathname of the source file where the logging
     |                      call was issued (if available)
     |  %(filename)s        Filename portion of pathname
     |  %(module)s          Module (name portion of filename)
     |  %(lineno)d          Source line number where the logging call was issued
     |                      (if available)
     |  %(funcName)s        Function name
     |  %(created)f         Time when the LogRecord was created (time.time()
     |                      return value)
     |  %(asctime)s         Textual time when the LogRecord was created
     |  %(msecs)d           Millisecond portion of the creation time
     |  %(relativeCreated)d Time in milliseconds when the LogRecord was created,
     |                      relative to the time the logging module was loaded
     |                      (typically at application startup time)
     |  %(thread)d          Thread ID (if available)
     |  %(threadName)s      Thread name (if available)
     |  %(taskName)s        Task name (if available)
     |  %(process)d         Process ID (if available)
     |  %(message)s         The result of record.getMessage(), computed just as
     |                      the record is emitted
     |
     |  Methods defined here:
     |
     |  __init__(self, fmt=None, datefmt=None, style='%', validate=True, *, defaults=None)
     |      Initialize the formatter with specified format strings.
     |
     |      Initialize the formatter either with the specified format string, or a
     |      default as described above. Allow for specialized date formatting with
     |      the optional datefmt argument. If datefmt is omitted, you get an
     |      ISO8601-like (or RFC 3339-like) format.
     |
     |      Use a style parameter of '%', '{' or '$' to specify that you want to
     |      use one of %-formatting, :meth:`str.format` (``{}``) formatting or
     |      :class:`string.Template` formatting in your format string.
     |
     |      .. versionchanged:: 3.2
     |         Added the ``style`` parameter.
     |
     |  format(self, record)
     |      Format the specified record as text.
     |
     |      The record's attribute dictionary is used as the operand to a
     |      string formatting operation which yields the returned string.
     |      Before formatting the dictionary, a couple of preparatory steps
     |      are carried out. The message attribute of the record is computed
     |      using LogRecord.getMessage(). If the formatting string uses the
     |      time (as determined by a call to usesTime(), formatTime() is
     |      called to format the event time. If there is exception information,
     |      it is formatted using formatException() and appended to the message.
     |
     |  formatException(self, ei)
     |      Format and return the specified exception information as a string.
     |
     |      This default implementation just uses
     |      traceback.print_exception()
     |
     |  formatMessage(self, record)
     |
     |  formatStack(self, stack_info)
     |      This method is provided as an extension point for specialized
     |      formatting of stack information.
     |
     |      The input data is a string as returned from a call to
     |      :func:`traceback.print_stack`, but with the last trailing newline
     |      removed.
     |
     |      The base implementation just returns the value passed in.
     |
     |  formatTime(self, record, datefmt=None)
     |      Return the creation time of the specified LogRecord as formatted text.
     |
     |      This method should be called from format() by a formatter which
     |      wants to make use of a formatted time. This method can be overridden
     |      in formatters to provide for any specific requirement, but the
     |      basic behaviour is as follows: if datefmt (a string) is specified,
     |      it is used with time.strftime() to format the creation time of the
     |      record. Otherwise, an ISO8601-like (or RFC 3339-like) format is used.
     |      The resulting string is returned. This function uses a user-configurable
     |      function to convert the creation time to a tuple. By default,
     |      time.localtime() is used; to change this for a particular formatter
     |      instance, set the 'converter' attribute to a function with the same
     |      signature as time.localtime() or time.gmtime(). To change it for all
     |      formatters, for example if you want all logging times to be shown in GMT,
     |      set the 'converter' attribute in the Formatter class.
     |
     |  usesTime(self)
     |      Check if the format uses the creation time of the record.
     |
     |  ----------------------------------------------------------------------
     |  Static methods defined here:
     |
     |  converter = localtime(...)
     |      localtime([seconds]) -> (tm_year,tm_mon,tm_mday,tm_hour,tm_min,
     |                                tm_sec,tm_wday,tm_yday,tm_isdst)
     |
     |      Convert seconds since the Epoch to a time tuple expressing local time.
     |      When 'seconds' is not passed in, convert the current time instead.
     |
     |  ----------------------------------------------------------------------
     |  Data descriptors defined here:
     |
     |  __dict__
     |      dictionary for instance variables
     |
     |  __weakref__
     |      list of weak references to the object
     |
     |  ----------------------------------------------------------------------
     |  Data and other attributes defined here:
     |
     |  default_msec_format = '%s,%03d'
     |
     |  default_time_format = '%Y-%m-%d %H:%M:%S'

    class Handler(Filterer)
     |  Handler(level=0)
     |
     |  Handler instances dispatch logging events to specific destinations.
     |
     |  The base handler class. Acts as a placeholder which defines the Handler
     |  interface. Handlers can optionally use Formatter instances to format
     |  records as desired. By default, no formatter is specified; in this case,
     |  the 'raw' message as determined by record.message is logged.
     |
     |  Method resolution order:
     |      Handler
     |      Filterer
     |      builtins.object
     |
     |  Methods defined here:
     |
     |  __init__(self, level=0)
     |      Initializes the instance - basically setting the formatter to None
     |      and the filter list to empty.
     |
     |  __repr__(self)
     |      Return repr(self).
     |
     |  acquire(self)
     |      Acquire the I/O thread lock.
     |
     |  close(self)
     |      Tidy up any resources used by the handler.
     |
     |      This version removes the handler from an internal map of handlers,
     |      _handlers, which is used for handler lookup by name. Subclasses
     |      should ensure that this gets called from overridden close()
     |      methods.
     |
     |  createLock(self)
     |      Acquire a thread lock for serializing access to the underlying I/O.
     |
     |  emit(self, record)
     |      Do whatever it takes to actually log the specified logging record.
     |
     |      This version is intended to be implemented by subclasses and so
     |      raises a NotImplementedError.
     |
     |  flush(self)
     |      Ensure all logging output has been flushed.
     |
     |      This version does nothing and is intended to be implemented by
     |      subclasses.
     |
     |  format(self, record)
     |      Format the specified record.
     |
     |      If a formatter is set, use it. Otherwise, use the default formatter
     |      for the module.
     |
     |  get_name(self)
     |
     |  handle(self, record)
     |      Conditionally emit the specified logging record.
     |
     |      Emission depends on filters which may have been added to the handler.
     |      Wrap the actual emission of the record with acquisition/release of
     |      the I/O thread lock.
     |
     |      Returns an instance of the log record that was emitted
     |      if it passed all filters, otherwise a false value is returned.
     |
     |  handleError(self, record)
     |      Handle errors which occur during an emit() call.
     |
     |      This method should be called from handlers when an exception is
     |      encountered during an emit() call. If raiseExceptions is false,
     |      exceptions get silently ignored. This is what is mostly wanted
     |      for a logging system - most users will not care about errors in
     |      the logging system, they are more interested in application errors.
     |      You could, however, replace this with a custom handler if you wish.
     |      The record which was being processed is passed in to this method.
     |
     |  release(self)
     |      Release the I/O thread lock.
     |
     |  setFormatter(self, fmt)
     |      Set the formatter for this handler.
     |
     |  setLevel(self, level)
     |      Set the logging level of this handler.  level must be an int or a str.
     |
     |  set_name(self, name)
     |
     |  ----------------------------------------------------------------------
     |  Data descriptors defined here:
     |
     |  name
     |
     |  ----------------------------------------------------------------------
     |  Methods inherited from Filterer:
     |
     |  addFilter(self, filter)
     |      Add the specified filter to this handler.
     |
     |  filter(self, record)
     |      Determine if a record is loggable by consulting all the filters.
     |
     |      The default is to allow the record to be logged; any filter can veto
     |      this by returning a false value.
     |      If a filter attached to a handler returns a log record instance,
     |      then that instance is used in place of the original log record in
     |      any further processing of the event by that handler.
     |      If a filter returns any other true value, the original log record
     |      is used in any further processing of the event by that handler.
     |
     |      If none of the filters return false values, this method returns
     |      a log record.
     |      If any of the filters return a false value, this method returns
     |      a false value.
     |
     |      .. versionchanged:: 3.2
     |
     |         Allow filters to be just callables.
     |
     |      .. versionchanged:: 3.12
     |         Allow filters to return a LogRecord instead of
     |         modifying it in place.
     |
     |  removeFilter(self, filter)
     |      Remove the specified filter from this handler.
     |
     |  ----------------------------------------------------------------------
     |  Data descriptors inherited from Filterer:
     |
     |  __dict__
     |      dictionary for instance variables
     |
     |  __weakref__
     |      list of weak references to the object

    class LogRecord(builtins.object)
     |  LogRecord(name, level, pathname, lineno, msg, args, exc_info, func=None, sinfo=None, **kwargs)
     |
     |  A LogRecord instance represents an event being logged.
     |
     |  LogRecord instances are created every time something is logged. They
     |  contain all the information pertinent to the event being logged. The
     |  main information passed in is in msg and args, which are combined
     |  using str(msg) % args to create the message field of the record. The
     |  record also includes information such as when the record was created,
     |  the source line where the logging call was made, and any exception
     |  information to be logged.
     |
     |  Methods defined here:
     |
     |  __init__(self, name, level, pathname, lineno, msg, args, exc_info, func=None, sinfo=None, **kwargs)
     |      Initialize a logging record with interesting information.
     |
     |  __repr__(self)
     |      Return repr(self).
     |
     |  getMessage(self)
     |      Return the message for this LogRecord.
     |
     |      Return the message for this LogRecord after merging any user-supplied
     |      arguments with the message.
     |
     |  ----------------------------------------------------------------------
     |  Data descriptors defined here:
     |
     |  __dict__
     |      dictionary for instance variables
     |
     |  __weakref__
     |      list of weak references to the object

    class Logger(Filterer)
     |  Logger(name, level=0)
     |
     |  Instances of the Logger class represent a single logging channel. A
     |  "logging channel" indicates an area of an application. Exactly how an
     |  "area" is defined is up to the application developer. Since an
     |  application can have any number of areas, logging channels are identified
     |  by a unique string. Application areas can be nested (e.g. an area
     |  of "input processing" might include sub-areas "read CSV files", "read
     |  XLS files" and "read Gnumeric files"). To cater for this natural nesting,
     |  channel names are organized into a namespace hierarchy where levels are
     |  separated by periods, much like the Java or Python package namespace. So
     |  in the instance given above, channel names might be "input" for the upper
     |  level, and "input.csv", "input.xls" and "input.gnu" for the sub-levels.
     |  There is no arbitrary limit to the depth of nesting.
     |
     |  Method resolution order:
     |      Logger
     |      Filterer
     |      builtins.object
     |
     |  Methods defined here:
     |
     |  __init__(self, name, level=0)
     |      Initialize the logger with a name and an optional level.
     |
     |  __reduce__(self)
     |      Helper for pickle.
     |
     |  __repr__(self)
     |      Return repr(self).
     |
     |  addHandler(self, hdlr)
     |      Add the specified handler to this logger.
     |
     |  callHandlers(self, record)
     |      Pass a record to all relevant handlers.
     |
     |      Loop through all handlers for this logger and its parents in the
     |      logger hierarchy. If no handler was found, output a one-off error
     |      message to sys.stderr. Stop searching up the hierarchy whenever a
     |      logger with the "propagate" attribute set to zero is found - that
     |      will be the last logger whose handlers are called.
     |
     |  critical(self, msg, *args, **kwargs)
     |      Log 'msg % args' with severity 'CRITICAL'.
     |
     |      To pass exception information, use the keyword argument exc_info with
     |      a true value, e.g.
     |
     |      logger.critical("Houston, we have a %s", "major disaster", exc_info=True)
     |
     |  debug(self, msg, *args, **kwargs)
     |      Log 'msg % args' with severity 'DEBUG'.
     |
     |      To pass exception information, use the keyword argument exc_info with
     |      a true value, e.g.
     |
     |      logger.debug("Houston, we have a %s", "thorny problem", exc_info=True)
     |
     |  error(self, msg, *args, **kwargs)
     |      Log 'msg % args' with severity 'ERROR'.
     |
     |      To pass exception information, use the keyword argument exc_info with
     |      a true value, e.g.
     |
     |      logger.error("Houston, we have a %s", "major problem", exc_info=True)
     |
     |  exception(self, msg, *args, exc_info=True, **kwargs)
     |      Convenience method for logging an ERROR with exception information.
     |
     |  fatal(self, msg, *args, **kwargs)
     |      Don't use this method, use critical() instead.
     |
     |  findCaller(self, stack_info=False, stacklevel=1)
     |      Find the stack frame of the caller so that we can note the source
     |      file name, line number and function name.
     |
     |  getChild(self, suffix)
     |      Get a logger which is a descendant to this one.
     |
     |      This is a convenience method, such that
     |
     |      logging.getLogger('abc').getChild('def.ghi')
     |
     |      is the same as
     |
     |      logging.getLogger('abc.def.ghi')
     |
     |      It's useful, for example, when the parent logger is named using
     |      __name__ rather than a literal string.
     |
     |  getChildren(self)
     |
     |  getEffectiveLevel(self)
     |      Get the effective level for this logger.
     |
     |      Loop through this logger and its parents in the logger hierarchy,
     |      looking for a non-zero logging level. Return the first one found.
     |
     |  handle(self, record)
     |      Call the handlers for the specified record.
     |
     |      This method is used for unpickled records received from a socket, as
     |      well as those created locally. Logger-level filtering is applied.
     |
     |  hasHandlers(self)
     |      See if this logger has any handlers configured.
     |
     |      Loop through all handlers for this logger and its parents in the
     |      logger hierarchy. Return True if a handler was found, else False.
     |      Stop searching up the hierarchy whenever a logger with the "propagate"
     |      attribute set to zero is found - that will be the last logger which
     |      is checked for the existence of handlers.
     |
     |  info(self, msg, *args, **kwargs)
     |      Log 'msg % args' with severity 'INFO'.
     |
     |      To pass exception information, use the keyword argument exc_info with
     |      a true value, e.g.
     |
     |      logger.info("Houston, we have a %s", "notable problem", exc_info=True)
     |
     |  isEnabledFor(self, level)
     |      Is this logger enabled for level 'level'?
     |
     |  log(self, level, msg, *args, **kwargs)
     |      Log 'msg % args' with the integer severity 'level'.
     |
     |      To pass exception information, use the keyword argument exc_info with
     |      a true value, e.g.
     |
     |      logger.log(level, "We have a %s", "mysterious problem", exc_info=True)
     |
     |  makeRecord(self, name, level, fn, lno, msg, args, exc_info, func=None, extra=None, sinfo=None)
     |      A factory method which can be overridden in subclasses to create
     |      specialized LogRecords.
     |
     |  removeHandler(self, hdlr)
     |      Remove the specified handler from this logger.
     |
     |  setLevel(self, level)
     |      Set the logging level of this logger.  level must be an int or a str.
     |
     |  warn(self, msg, *args, **kwargs)
     |
     |  warning(self, msg, *args, **kwargs)
     |      Log 'msg % args' with severity 'WARNING'.
     |
     |      To pass exception information, use the keyword argument exc_info with
     |      a true value, e.g.
     |
     |      logger.warning("Houston, we have a %s", "bit of a problem", exc_info=True)
     |
     |  ----------------------------------------------------------------------
     |  Data and other attributes defined here:
     |
     |  manager = <logging.Manager object>
     |
     |  root = <RootLogger root (WARNING)>
     |
     |  ----------------------------------------------------------------------
     |  Methods inherited from Filterer:
     |
     |  addFilter(self, filter)
     |      Add the specified filter to this handler.
     |
     |  filter(self, record)
     |      Determine if a record is loggable by consulting all the filters.
     |
     |      The default is to allow the record to be logged; any filter can veto
     |      this by returning a false value.
     |      If a filter attached to a handler returns a log record instance,
     |      then that instance is used in place of the original log record in
     |      any further processing of the event by that handler.
     |      If a filter returns any other true value, the original log record
     |      is used in any further processing of the event by that handler.
     |
     |      If none of the filters return false values, this method returns
     |      a log record.
     |      If any of the filters return a false value, this method returns
     |      a false value.
     |
     |      .. versionchanged:: 3.2
     |
     |         Allow filters to be just callables.
     |
     |      .. versionchanged:: 3.12
     |         Allow filters to return a LogRecord instead of
     |         modifying it in place.
     |
     |  removeFilter(self, filter)
     |      Remove the specified filter from this handler.
     |
     |  ----------------------------------------------------------------------
     |  Data descriptors inherited from Filterer:
     |
     |  __dict__
     |      dictionary for instance variables
     |
     |  __weakref__
     |      list of weak references to the object

    class LoggerAdapter(builtins.object)
     |  LoggerAdapter(logger, extra=None)
     |
     |  An adapter for loggers which makes it easier to specify contextual
     |  information in logging output.
     |
     |  Methods defined here:
     |
     |  __init__(self, logger, extra=None)
     |      Initialize the adapter with a logger and a dict-like object which
     |      provides contextual information. This constructor signature allows
     |      easy stacking of LoggerAdapters, if so desired.
     |
     |      You can effectively pass keyword arguments as shown in the
     |      following example:
     |
     |      adapter = LoggerAdapter(someLogger, dict(p1=v1, p2="v2"))
     |
     |  __repr__(self)
     |      Return repr(self).
     |
     |  critical(self, msg, *args, **kwargs)
     |      Delegate a critical call to the underlying logger.
     |
     |  debug(self, msg, *args, **kwargs)
     |      Delegate a debug call to the underlying logger.
     |
     |  error(self, msg, *args, **kwargs)
     |      Delegate an error call to the underlying logger.
     |
     |  exception(self, msg, *args, exc_info=True, **kwargs)
     |      Delegate an exception call to the underlying logger.
     |
     |  getEffectiveLevel(self)
     |      Get the effective level for the underlying logger.
     |
     |  hasHandlers(self)
     |      See if the underlying logger has any handlers.
     |
     |  info(self, msg, *args, **kwargs)
     |      Delegate an info call to the underlying logger.
     |
     |  isEnabledFor(self, level)
     |      Is this logger enabled for level 'level'?
     |
     |  log(self, level, msg, *args, **kwargs)
     |      Delegate a log call to the underlying logger, after adding
     |      contextual information from this adapter instance.
     |
     |  process(self, msg, kwargs)
     |      Process the logging message and keyword arguments passed in to
     |      a logging call to insert contextual information. You can either
     |      manipulate the message itself, the keyword args or both. Return
     |      the message and kwargs modified (or not) to suit your needs.
     |
     |      Normally, you'll only need to override this one method in a
     |      LoggerAdapter subclass for your specific needs.
     |
     |  setLevel(self, level)
     |      Set the specified level on the underlying logger.
     |
     |  warn(self, msg, *args, **kwargs)
     |
     |  warning(self, msg, *args, **kwargs)
     |      Delegate a warning call to the underlying logger.
     |
     |  ----------------------------------------------------------------------
     |  Class methods defined here:
     |
     |  __class_getitem__ = GenericAlias(...)
     |      Represent a PEP 585 generic type
     |
     |      E.g. for t = list[int], t.__origin__ is list and t.__args__ is (int,).
     |
     |  ----------------------------------------------------------------------
     |  Readonly properties defined here:
     |
     |  name
     |
     |  ----------------------------------------------------------------------
     |  Data descriptors defined here:
     |
     |  __dict__
     |      dictionary for instance variables
     |
     |  __weakref__
     |      list of weak references to the object
     |
     |  manager

    class NullHandler(Handler)
     |  NullHandler(level=0)
     |
     |  This handler does nothing. It's intended to be used to avoid the
     |  "No handlers could be found for logger XXX" one-off warning. This is
     |  important for library code, which may contain code to log events. If a user
     |  of the library does not configure logging, the one-off warning might be
     |  produced; to avoid this, the library developer simply needs to instantiate
     |  a NullHandler and add it to the top-level logger of the library module or
     |  package.
     |
     |  Method resolution order:
     |      NullHandler
     |      Handler
     |      Filterer
     |      builtins.object
     |
     |  Methods defined here:
     |
     |  createLock(self)
     |      Acquire a thread lock for serializing access to the underlying I/O.
     |
     |  emit(self, record)
     |      Stub.
     |
     |  handle(self, record)
     |      Stub.
     |
     |  ----------------------------------------------------------------------
     |  Methods inherited from Handler:
     |
     |  __init__(self, level=0)
     |      Initializes the instance - basically setting the formatter to None
     |      and the filter list to empty.
     |
     |  __repr__(self)
     |      Return repr(self).
     |
     |  acquire(self)
     |      Acquire the I/O thread lock.
     |
     |  close(self)
     |      Tidy up any resources used by the handler.
     |
     |      This version removes the handler from an internal map of handlers,
     |      _handlers, which is used for handler lookup by name. Subclasses
     |      should ensure that this gets called from overridden close()
     |      methods.
     |
     |  flush(self)
     |      Ensure all logging output has been flushed.
     |
     |      This version does nothing and is intended to be implemented by
     |      subclasses.
     |
     |  format(self, record)
     |      Format the specified record.
     |
     |      If a formatter is set, use it. Otherwise, use the default formatter
     |      for the module.
     |
     |  get_name(self)
     |
     |  handleError(self, record)
     |      Handle errors which occur during an emit() call.
     |
     |      This method should be called from handlers when an exception is
     |      encountered during an emit() call. If raiseExceptions is false,
     |      exceptions get silently ignored. This is what is mostly wanted
     |      for a logging system - most users will not care about errors in
     |      the logging system, they are more interested in application errors.
     |      You could, however, replace this with a custom handler if you wish.
     |      The record which was being processed is passed in to this method.
     |
     |  release(self)
     |      Release the I/O thread lock.
     |
     |  setFormatter(self, fmt)
     |      Set the formatter for this handler.
     |
     |  setLevel(self, level)
     |      Set the logging level of this handler.  level must be an int or a str.
     |
     |  set_name(self, name)
     |
     |  ----------------------------------------------------------------------
     |  Data descriptors inherited from Handler:
     |
     |  name
     |
     |  ----------------------------------------------------------------------
     |  Methods inherited from Filterer:
     |
     |  addFilter(self, filter)
     |      Add the specified filter to this handler.
     |
     |  filter(self, record)
     |      Determine if a record is loggable by consulting all the filters.
     |
     |      The default is to allow the record to be logged; any filter can veto
     |      this by returning a false value.
     |      If a filter attached to a handler returns a log record instance,
     |      then that instance is used in place of the original log record in
     |      any further processing of the event by that handler.
     |      If a filter returns any other true value, the original log record
     |      is used in any further processing of the event by that handler.
     |
     |      If none of the filters return false values, this method returns
     |      a log record.
     |      If any of the filters return a false value, this method returns
     |      a false value.
     |
     |      .. versionchanged:: 3.2
     |
     |         Allow filters to be just callables.
     |
     |      .. versionchanged:: 3.12
     |         Allow filters to return a LogRecord instead of
     |         modifying it in place.
     |
     |  removeFilter(self, filter)
     |      Remove the specified filter from this handler.
     |
     |  ----------------------------------------------------------------------
     |  Data descriptors inherited from Filterer:
     |
     |  __dict__
     |      dictionary for instance variables
     |
     |  __weakref__
     |      list of weak references to the object

    class StreamHandler(Handler)
     |  StreamHandler(stream=None)
     |
     |  A handler class which writes logging records, appropriately formatted,
     |  to a stream. Note that this class does not close the stream, as
     |  sys.stdout or sys.stderr may be used.
     |
     |  Method resolution order:
     |      StreamHandler
     |      Handler
     |      Filterer
     |      builtins.object
     |
     |  Methods defined here:
     |
     |  __init__(self, stream=None)
     |      Initialize the handler.
     |
     |      If stream is not specified, sys.stderr is used.
     |
     |  __repr__(self)
     |      Return repr(self).
     |
     |  emit(self, record)
     |      Emit a record.
     |
     |      If a formatter is specified, it is used to format the record.
     |      The record is then written to the stream with a trailing newline.  If
     |      exception information is present, it is formatted using
     |      traceback.print_exception and appended to the stream.  If the stream
     |      has an 'encoding' attribute, it is used to determine how to do the
     |      output to the stream.
     |
     |  flush(self)
     |      Flushes the stream.
     |
     |  setStream(self, stream)
     |      Sets the StreamHandler's stream to the specified value,
     |      if it is different.
     |
     |      Returns the old stream, if the stream was changed, or None
     |      if it wasn't.
     |
     |  ----------------------------------------------------------------------
     |  Class methods defined here:
     |
     |  __class_getitem__ = GenericAlias(...)
     |      Represent a PEP 585 generic type
     |
     |      E.g. for t = list[int], t.__origin__ is list and t.__args__ is (int,).
     |
     |  ----------------------------------------------------------------------
     |  Data and other attributes defined here:
     |
     |  terminator = '\n'
     |
     |  ----------------------------------------------------------------------
     |  Methods inherited from Handler:
     |
     |  acquire(self)
     |      Acquire the I/O thread lock.
     |
     |  close(self)
     |      Tidy up any resources used by the handler.
     |
     |      This version removes the handler from an internal map of handlers,
     |      _handlers, which is used for handler lookup by name. Subclasses
     |      should ensure that this gets called from overridden close()
     |      methods.
     |
     |  createLock(self)
     |      Acquire a thread lock for serializing access to the underlying I/O.
     |
     |  format(self, record)
     |      Format the specified record.
     |
     |      If a formatter is set, use it. Otherwise, use the default formatter
     |      for the module.
     |
     |  get_name(self)
     |
     |  handle(self, record)
     |      Conditionally emit the specified logging record.
     |
     |      Emission depends on filters which may have been added to the handler.
     |      Wrap the actual emission of the record with acquisition/release of
     |      the I/O thread lock.
     |
     |      Returns an instance of the log record that was emitted
     |      if it passed all filters, otherwise a false value is returned.
     |
     |  handleError(self, record)
     |      Handle errors which occur during an emit() call.
     |
     |      This method should be called from handlers when an exception is
     |      encountered during an emit() call. If raiseExceptions is false,
     |      exceptions get silently ignored. This is what is mostly wanted
     |      for a logging system - most users will not care about errors in
     |      the logging system, they are more interested in application errors.
     |      You could, however, replace this with a custom handler if you wish.
     |      The record which was being processed is passed in to this method.
     |
     |  release(self)
     |      Release the I/O thread lock.
     |
     |  setFormatter(self, fmt)
     |      Set the formatter for this handler.
     |
     |  setLevel(self, level)
     |      Set the logging level of this handler.  level must be an int or a str.
     |
     |  set_name(self, name)
     |
     |  ----------------------------------------------------------------------
     |  Data descriptors inherited from Handler:
     |
     |  name
     |
     |  ----------------------------------------------------------------------
     |  Methods inherited from Filterer:
     |
     |  addFilter(self, filter)
     |      Add the specified filter to this handler.
     |
     |  filter(self, record)
     |      Determine if a record is loggable by consulting all the filters.
     |
     |      The default is to allow the record to be logged; any filter can veto
     |      this by returning a false value.
     |      If a filter attached to a handler returns a log record instance,
     |      then that instance is used in place of the original log record in
     |      any further processing of the event by that handler.
     |      If a filter returns any other true value, the original log record
     |      is used in any further processing of the event by that handler.
     |
     |      If none of the filters return false values, this method returns
     |      a log record.
     |      If any of the filters return a false value, this method returns
     |      a false value.
     |
     |      .. versionchanged:: 3.2
     |
     |         Allow filters to be just callables.
     |
     |      .. versionchanged:: 3.12
     |         Allow filters to return a LogRecord instead of
     |         modifying it in place.
     |
     |  removeFilter(self, filter)
     |      Remove the specified filter from this handler.
     |
     |  ----------------------------------------------------------------------
     |  Data descriptors inherited from Filterer:
     |
     |  __dict__
     |      dictionary for instance variables
     |
     |  __weakref__
     |      list of weak references to the object

FUNCTIONS
    addLevelName(level, levelName)
        Associate 'levelName' with 'level'.

        This is used when converting levels to text during message formatting.

    basicConfig(**kwargs)
        Do basic configuration for the logging system.

        This function does nothing if the root logger already has handlers
        configured, unless the keyword argument *force* is set to ``True``.
        It is a convenience method intended for use by simple scripts
        to do one-shot configuration of the logging package.

        The default behaviour is to create a StreamHandler which writes to
        sys.stderr, set a formatter using the BASIC_FORMAT format string, and
        add the handler to the root logger.

        A number of optional keyword arguments may be specified, which can alter
        the default behaviour.

        filename  Specifies that a FileHandler be created, using the specified
                  filename, rather than a StreamHandler.
        filemode  Specifies the mode to open the file, if filename is specified
                  (if filemode is unspecified, it defaults to 'a').
        format    Use the specified format string for the handler.
        datefmt   Use the specified date/time format.
        style     If a format string is specified, use this to specify the
                  type of format string (possible values '%', '{', '$', for
                  %-formatting, :meth:`str.format` and :class:`string.Template`
                  - defaults to '%').
        level     Set the root logger level to the specified level.
        stream    Use the specified stream to initialize the StreamHandler. Note
                  that this argument is incompatible with 'filename' - if both
                  are present, 'stream' is ignored.
        handlers  If specified, this should be an iterable of already created
                  handlers, which will be added to the root logger. Any handler
                  in the list which does not have a formatter assigned will be
                  assigned the formatter created in this function.
        force     If this keyword  is specified as true, any existing handlers
                  attached to the root logger are removed and closed, before
                  carrying out the configuration as specified by the other
                  arguments.
        encoding  If specified together with a filename, this encoding is passed to
                  the created FileHandler, causing it to be used when the file is
                  opened.
        errors    If specified together with a filename, this value is passed to the
                  created FileHandler, causing it to be used when the file is
                  opened in text mode. If not specified, the default value is
                  `backslashreplace`.

        Note that you could specify a stream created using open(filename, mode)
        rather than passing the filename and mode in. However, it should be
        remembered that StreamHandler does not close its stream (since it may be
        using sys.stdout or sys.stderr), whereas FileHandler closes its stream
        when the handler is closed.

        .. versionchanged:: 3.2
           Added the ``style`` parameter.

        .. versionchanged:: 3.3
           Added the ``handlers`` parameter. A ``ValueError`` is now thrown for
           incompatible arguments (e.g. ``handlers`` specified together with
           ``filename``/``filemode``, or ``filename``/``filemode`` specified
           together with ``stream``, or ``handlers`` specified together with
           ``stream``.

        .. versionchanged:: 3.8
           Added the ``force`` parameter.

        .. versionchanged:: 3.9
           Added the ``encoding`` and ``errors`` parameters.

    captureWarnings(capture)
        If capture is true, redirect all warnings to the logging package.
        If capture is False, ensure that warnings are not redirected to logging
        but to their original destinations.

    critical(msg, *args, **kwargs)
        Log a message with severity 'CRITICAL' on the root logger. If the logger
        has no handlers, call basicConfig() to add a console handler with a
        pre-defined format.

    debug(msg, *args, **kwargs)
        Log a message with severity 'DEBUG' on the root logger. If the logger has
        no handlers, call basicConfig() to add a console handler with a pre-defined
        format.

    disable(level=50)
        Disable all logging calls of severity 'level' and below.

    error(msg, *args, **kwargs)
        Log a message with severity 'ERROR' on the root logger. If the logger has
        no handlers, call basicConfig() to add a console handler with a pre-defined
        format.

    exception(msg, *args, exc_info=True, **kwargs)
        Log a message with severity 'ERROR' on the root logger, with exception
        information. If the logger has no handlers, basicConfig() is called to add
        a console handler with a pre-defined format.

    fatal(msg, *args, **kwargs)
        Don't use this function, use critical() instead.

    getHandlerByName(name)
        Get a handler with the specified *name*, or None if there isn't one with
        that name.

    getHandlerNames()
        Return all known handler names as an immutable set.

    getLevelName(level)
        Return the textual or numeric representation of logging level 'level'.

        If the level is one of the predefined levels (CRITICAL, ERROR, WARNING,
        INFO, DEBUG) then you get the corresponding string. If you have
        associated levels with names using addLevelName then the name you have
        associated with 'level' is returned.

        If a numeric value corresponding to one of the defined levels is passed
        in, the corresponding string representation is returned.

        If a string representation of the level is passed in, the corresponding
        numeric value is returned.

        If no matching numeric or string value is passed in, the string
        'Level %s' % level is returned.

    getLevelNamesMapping()

    getLogRecordFactory()
        Return the factory to be used when instantiating a log record.

    getLogger(name=None)
        Return a logger with the specified name, creating it if necessary.

        If no name is specified, return the root logger.

    getLoggerClass()
        Return the class to be used when instantiating a logger.

    info(msg, *args, **kwargs)
        Log a message with severity 'INFO' on the root logger. If the logger has
        no handlers, call basicConfig() to add a console handler with a pre-defined
        format.

    log(level, msg, *args, **kwargs)
        Log 'msg % args' with the integer severity 'level' on the root logger. If
        the logger has no handlers, call basicConfig() to add a console handler
        with a pre-defined format.

    makeLogRecord(dict)
        Make a LogRecord whose attributes are defined by the specified dictionary,
        This function is useful for converting a logging event received over
        a socket connection (which is sent as a dictionary) into a LogRecord
        instance.

    setLogRecordFactory(factory)
        Set the factory to be used when instantiating a log record.

        :param factory: A callable which will be called to instantiate
        a log record.

    setLoggerClass(klass)
        Set the class to be used when instantiating a logger. The class should
        define __init__() such that only a name argument is required, and the
        __init__() should call Logger.__init__()

    shutdown(handlerList=[<weakref at 0x000001A0F84E6890; to '_StderrHandler' at 0x000001A0F84E2960>, <weakref at 0x000001A0F9ECAB60; to 'NullHandler' at 0x000001A0F9F9D550>, <weakref at 0x000001A0FB944C70; to 'StreamHandler' at 0x000001A0FB9394F0>, <weakref at 0x000001A0FB987B00; to 'NullHandler' at 0x000001A0FB938E00>, <weakref at 0x000001A0FB99F920; to 'NullHandler' at 0x000001A0FB967AA0>, <weakref at 0x000001A0F84E6E80; to 'NullHandler' at 0x000001A0F9EC4DA0>, <weakref at 0x000001A0F8081BC0; to 'NullHandler' at 0x000001A0F84C6570>])
        Perform any cleanup actions in the logging system (e.g. flushing
        buffers).

        Should be called at application exit.

    warn(msg, *args, **kwargs)

    warning(msg, *args, **kwargs)
        Log a message with severity 'WARNING' on the root logger. If the logger has
        no handlers, call basicConfig() to add a console handler with a pre-defined
        format.

DATA
    BASIC_FORMAT = '%(levelname)s:%(name)s:%(message)s'
    CRITICAL = 50
    DEBUG = 10
    ERROR = 40
    FATAL = 50
    INFO = 20
    NOTSET = 0
    WARN = 30
    WARNING = 30
    __all__ = ['BASIC_FORMAT', 'BufferingFormatter', 'CRITICAL', 'DEBUG', ...
    __status__ = 'production'
    lastResort = <_StderrHandler <stderr> (WARNING)>
    raiseExceptions = True

VERSION
    0.5.1.2

DATE
    07 February 2010

AUTHOR
    Vinay Sajip <vinay_sajip@red-dove.com>

FILE
    c:\users\youse\appdata\local\programs\python\python312\lib\logging\__init__.py

elasticsearch.re
Python Library Documentation: package re

NAME
    re - Support for regular expressions (RE).

MODULE REFERENCE
    https://docs.python.org/3.12/library/re.html

    The following documentation is automatically generated from the Python
    source files.  It may be incomplete, incorrect or include features that
    are considered implementation detail and may vary between Python
    implementations.  When in doubt, consult the module reference at the
    location listed above.

DESCRIPTION
    This module provides regular expression matching operations similar to
    those found in Perl.  It supports both 8-bit and Unicode strings; both
    the pattern and the strings being processed can contain null bytes and
    characters outside the US ASCII range.

    Regular expressions can contain both special and ordinary characters.
    Most ordinary characters, like "A", "a", or "0", are the simplest
    regular expressions; they simply match themselves.  You can
    concatenate ordinary characters, so last matches the string 'last'.

    The special characters are:
        "."      Matches any character except a newline.
        "^"      Matches the start of the string.
        "$"      Matches the end of the string or just before the newline at
                 the end of the string.
        "*"      Matches 0 or more (greedy) repetitions of the preceding RE.
                 Greedy means that it will match as many repetitions as possible.
        "+"      Matches 1 or more (greedy) repetitions of the preceding RE.
        "?"      Matches 0 or 1 (greedy) of the preceding RE.
        *?,+?,?? Non-greedy versions of the previous three special characters.
        {m,n}    Matches from m to n repetitions of the preceding RE.
        {m,n}?   Non-greedy version of the above.
        "\\"     Either escapes special characters or signals a special sequence.
        []       Indicates a set of characters.
                 A "^" as the first character indicates a complementing set.
        "|"      A|B, creates an RE that will match either A or B.
        (...)    Matches the RE inside the parentheses.
                 The contents can be retrieved or matched later in the string.
        (?aiLmsux) The letters set the corresponding flags defined below.
        (?:...)  Non-grouping version of regular parentheses.
        (?P<name>...) The substring matched by the group is accessible by name.
        (?P=name)     Matches the text matched earlier by the group named name.
        (?#...)  A comment; ignored.
        (?=...)  Matches if ... matches next, but doesn't consume the string.
        (?!...)  Matches if ... doesn't match next.
        (?<=...) Matches if preceded by ... (must be fixed length).
        (?<!...) Matches if not preceded by ... (must be fixed length).
        (?(id/name)yes|no) Matches yes pattern if the group with id/name matched,
                           the (optional) no pattern otherwise.

    The special sequences consist of "\\" and a character from the list
    below.  If the ordinary character is not on the list, then the
    resulting RE will match the second character.
        \number  Matches the contents of the group of the same number.
        \A       Matches only at the start of the string.
        \Z       Matches only at the end of the string.
        \b       Matches the empty string, but only at the start or end of a word.
        \B       Matches the empty string, but not at the start or end of a word.
        \d       Matches any decimal digit; equivalent to the set [0-9] in
                 bytes patterns or string patterns with the ASCII flag.
                 In string patterns without the ASCII flag, it will match the whole
                 range of Unicode digits.
        \D       Matches any non-digit character; equivalent to [^\d].
        \s       Matches any whitespace character; equivalent to [ \t\n\r\f\v] in
                 bytes patterns or string patterns with the ASCII flag.
                 In string patterns without the ASCII flag, it will match the whole
                 range of Unicode whitespace characters.
        \S       Matches any non-whitespace character; equivalent to [^\s].
        \w       Matches any alphanumeric character; equivalent to [a-zA-Z0-9_]
                 in bytes patterns or string patterns with the ASCII flag.
                 In string patterns without the ASCII flag, it will match the
                 range of Unicode alphanumeric characters (letters plus digits
                 plus underscore).
                 With LOCALE, it will match the set [0-9_] plus characters defined
                 as letters for the current locale.
        \W       Matches the complement of \w.
        \\       Matches a literal backslash.

    This module exports the following functions:
        match     Match a regular expression pattern to the beginning of a string.
        fullmatch Match a regular expression pattern to all of a string.
        search    Search a string for the presence of a pattern.
        sub       Substitute occurrences of a pattern found in a string.
        subn      Same as sub, but also return the number of substitutions made.
        split     Split a string by the occurrences of a pattern.
        findall   Find all occurrences of a pattern in a string.
        finditer  Return an iterator yielding a Match object for each match.
        compile   Compile a pattern into a Pattern object.
        purge     Clear the regular expression cache.
        escape    Backslash all non-alphanumerics in a string.

    Each function other than purge and escape can take an optional 'flags' argument
    consisting of one or more of the following module constants, joined by "|".
    A, L, and U are mutually exclusive.
        A  ASCII       For string patterns, make \w, \W, \b, \B, \d, \D
                       match the corresponding ASCII character categories
                       (rather than the whole Unicode categories, which is the
                       default).
                       For bytes patterns, this flag is the only available
                       behaviour and needn't be specified.
        I  IGNORECASE  Perform case-insensitive matching.
        L  LOCALE      Make \w, \W, \b, \B, dependent on the current locale.
        M  MULTILINE   "^" matches the beginning of lines (after a newline)
                       as well as the string.
                       "$" matches the end of lines (before a newline) as well
                       as the end of the string.
        S  DOTALL      "." matches any character at all, including the newline.
        X  VERBOSE     Ignore whitespace and comments for nicer looking RE's.
        U  UNICODE     For compatibility only. Ignored for string patterns (it
                       is the default), and forbidden for bytes patterns.

    This module also defines an exception 'error'.

PACKAGE CONTENTS
    _casefix
    _compiler
    _constants
    _parser

CLASSES
    builtins.Exception(builtins.BaseException)
        error
    builtins.object
        Match
        Pattern
    enum.IntFlag(builtins.int, enum.ReprEnum, enum.Flag)
        RegexFlag

    class Match(builtins.object)
     |  The result of re.match() and re.search().
     |  Match objects always have a boolean value of True.
     |
     |  Methods defined here:
     |
     |  __copy__(self, /)
     |
     |  __deepcopy__(self, memo, /)
     |
     |  __getitem__(self, key, /)
     |      Return self[key].
     |
     |  __repr__(self, /)
     |      Return repr(self).
     |
     |  end(self, group=0, /)
     |      Return index of the end of the substring matched by group.
     |
     |  expand(self, /, template)
     |      Return the string obtained by doing backslash substitution on the string template, as done by the sub() method.
     |
     |  group(...)
     |      group([group1, ...]) -> str or tuple.
     |      Return subgroup(s) of the match by indices or names.
     |      For 0 returns the entire match.
     |
     |  groupdict(self, /, default=None)
     |      Return a dictionary containing all the named subgroups of the match, keyed by the subgroup name.
     |
     |      default
     |        Is used for groups that did not participate in the match.
     |
     |  groups(self, /, default=None)
     |      Return a tuple containing all the subgroups of the match, from 1.
     |
     |      default
     |        Is used for groups that did not participate in the match.
     |
     |  span(self, group=0, /)
     |      For match object m, return the 2-tuple (m.start(group), m.end(group)).
     |
     |  start(self, group=0, /)
     |      Return index of the start of the substring matched by group.
     |
     |  ----------------------------------------------------------------------
     |  Class methods defined here:
     |
     |  __class_getitem__(...)
     |      See PEP 585
     |
     |  ----------------------------------------------------------------------
     |  Data descriptors defined here:
     |
     |  endpos
     |      The index into the string beyond which the RE engine will not go.
     |
     |  lastgroup
     |      The name of the last matched capturing group.
     |
     |  lastindex
     |      The integer index of the last matched capturing group.
     |
     |  pos
     |      The index into the string at which the RE engine started looking for a match.
     |
     |  re
     |      The regular expression object.
     |
     |  regs
     |
     |  string
     |      The string passed to match() or search().

    class Pattern(builtins.object)
     |  Compiled regular expression object.
     |
     |  Methods defined here:
     |
     |  __copy__(self, /)
     |
     |  __deepcopy__(self, memo, /)
     |
     |  __eq__(self, value, /)
     |      Return self==value.
     |
     |  __ge__(self, value, /)
     |      Return self>=value.
     |
     |  __gt__(self, value, /)
     |      Return self>value.
     |
     |  __hash__(self, /)
     |      Return hash(self).
     |
     |  __le__(self, value, /)
     |      Return self<=value.
     |
     |  __lt__(self, value, /)
     |      Return self<value.
     |
     |  __ne__(self, value, /)
     |      Return self!=value.
     |
     |  __repr__(self, /)
     |      Return repr(self).
     |
     |  findall(self, /, string, pos=0, endpos=9223372036854775807)
     |      Return a list of all non-overlapping matches of pattern in string.
     |
     |  finditer(self, /, string, pos=0, endpos=9223372036854775807)
     |      Return an iterator over all non-overlapping matches for the RE pattern in string.
     |
     |      For each match, the iterator returns a match object.
     |
     |  fullmatch(self, /, string, pos=0, endpos=9223372036854775807)
     |      Matches against all of the string.
     |
     |  match(self, /, string, pos=0, endpos=9223372036854775807)
     |      Matches zero or more characters at the beginning of the string.
     |
     |  scanner(self, /, string, pos=0, endpos=9223372036854775807)
     |
     |  search(self, /, string, pos=0, endpos=9223372036854775807)
     |      Scan through string looking for a match, and return a corresponding match object instance.
     |
     |      Return None if no position in the string matches.
     |
     |  split(self, /, string, maxsplit=0)
     |      Split string by the occurrences of pattern.
     |
     |  sub(self, /, repl, string, count=0)
     |      Return the string obtained by replacing the leftmost non-overlapping occurrences of pattern in string by the replacement repl.
     |
     |  subn(self, /, repl, string, count=0)
     |      Return the tuple (new_string, number_of_subs_made) found by replacing the leftmost non-overlapping occurrences of pattern with the replacement repl.
     |
     |  ----------------------------------------------------------------------
     |  Class methods defined here:
     |
     |  __class_getitem__(...)
     |      See PEP 585
     |
     |  ----------------------------------------------------------------------
     |  Data descriptors defined here:
     |
     |  flags
     |      The regex matching flags.
     |
     |  groupindex
     |      A dictionary mapping group names to group numbers.
     |
     |  groups
     |      The number of capturing groups in the pattern.
     |
     |  pattern
     |      The pattern string from which the RE object was compiled.

    class RegexFlag(enum.IntFlag)
     |  RegexFlag(*values)
     |
     |  An enumeration.
     |
     |  Method resolution order:
     |      RegexFlag
     |      enum.IntFlag
     |      builtins.int
     |      enum.ReprEnum
     |      enum.Flag
     |      enum.Enum
     |      builtins.object
     |
     |  Methods defined here:
     |
     |  __and__(self, other) from enum.Flag
     |
     |  __format__(self, format_spec, /) from builtins.int
     |      Convert to a string according to format_spec.
     |
     |  __invert__(self) from enum.Flag
     |
     |  __new__(cls, value) from enum.Enum
     |      Create and return a new object.  See help(type) for accurate signature.
     |
     |  __or__(self, other) from enum.Flag
     |      Return self|value.
     |
     |  __rand__ = __and__(self, other)
     |
     |  __repr__ = global_flag_repr(self) from enum
     |      use module.flag_name instead of class.flag_name
     |
     |      the module is the last module in case of a multi-module name
     |
     |  __ror__ = __or__(self, other)
     |
     |  __rxor__ = __xor__(self, other)
     |
     |  __str__(self, /) from builtins.object
     |      Return str(self).
     |
     |  __xor__(self, other) from enum.Flag
     |
     |  ----------------------------------------------------------------------
     |  Data and other attributes defined here:
     |
     |  ASCII = re.ASCII
     |
     |  DEBUG = re.DEBUG
     |
     |  DOTALL = re.DOTALL
     |
     |  IGNORECASE = re.IGNORECASE
     |
     |  LOCALE = re.LOCALE
     |
     |  MULTILINE = re.MULTILINE
     |
     |  TEMPLATE = re.TEMPLATE
     |
     |  UNICODE = re.UNICODE
     |
     |  VERBOSE = re.VERBOSE
     |
     |  ----------------------------------------------------------------------
     |  Methods inherited from builtins.int:
     |
     |  __abs__(self, /)
     |      abs(self)
     |
     |  __add__(self, value, /)
     |      Return self+value.
     |
     |  __bool__(self, /)
     |      True if self else False
     |
     |  __ceil__(...)
     |      Ceiling of an Integral returns itself.
     |
     |  __divmod__(self, value, /)
     |      Return divmod(self, value).
     |
     |  __eq__(self, value, /)
     |      Return self==value.
     |
     |  __float__(self, /)
     |      float(self)
     |
     |  __floor__(...)
     |      Flooring an Integral returns itself.
     |
     |  __floordiv__(self, value, /)
     |      Return self//value.
     |
     |  __ge__(self, value, /)
     |      Return self>=value.
     |
     |  __getattribute__(self, name, /)
     |      Return getattr(self, name).
     |
     |  __getnewargs__(self, /)
     |
     |  __gt__(self, value, /)
     |      Return self>value.
     |
     |  __hash__(self, /)
     |      Return hash(self).
     |
     |  __index__(self, /)
     |      Return self converted to an integer, if self is suitable for use as an index into a list.
     |
     |  __int__(self, /)
     |      int(self)
     |
     |  __le__(self, value, /)
     |      Return self<=value.
     |
     |  __lshift__(self, value, /)
     |      Return self<<value.
     |
     |  __lt__(self, value, /)
     |      Return self<value.
     |
     |  __mod__(self, value, /)
     |      Return self%value.
     |
     |  __mul__(self, value, /)
     |      Return self*value.
     |
     |  __ne__(self, value, /)
     |      Return self!=value.
     |
     |  __neg__(self, /)
     |      -self
     |
     |  __pos__(self, /)
     |      +self
     |
     |  __pow__(self, value, mod=None, /)
     |      Return pow(self, value, mod).
     |
     |  __radd__(self, value, /)
     |      Return value+self.
     |
     |  __rdivmod__(self, value, /)
     |      Return divmod(value, self).
     |
     |  __rfloordiv__(self, value, /)
     |      Return value//self.
     |
     |  __rlshift__(self, value, /)
     |      Return value<<self.
     |
     |  __rmod__(self, value, /)
     |      Return value%self.
     |
     |  __rmul__(self, value, /)
     |      Return value*self.
     |
     |  __round__(...)
     |      Rounding an Integral returns itself.
     |
     |      Rounding with an ndigits argument also returns an integer.
     |
     |  __rpow__(self, value, mod=None, /)
     |      Return pow(value, self, mod).
     |
     |  __rrshift__(self, value, /)
     |      Return value>>self.
     |
     |  __rshift__(self, value, /)
     |      Return self>>value.
     |
     |  __rsub__(self, value, /)
     |      Return value-self.
     |
     |  __rtruediv__(self, value, /)
     |      Return value/self.
     |
     |  __sizeof__(self, /)
     |      Returns size in memory, in bytes.
     |
     |  __sub__(self, value, /)
     |      Return self-value.
     |
     |  __truediv__(self, value, /)
     |      Return self/value.
     |
     |  __trunc__(...)
     |      Truncating an Integral returns itself.
     |
     |  as_integer_ratio(self, /)
     |      Return a pair of integers, whose ratio is equal to the original int.
     |
     |      The ratio is in lowest terms and has a positive denominator.
     |
     |      >>> (10).as_integer_ratio()
     |      (10, 1)
     |      >>> (-10).as_integer_ratio()
     |      (-10, 1)
     |      >>> (0).as_integer_ratio()
     |      (0, 1)
     |
     |  bit_count(self, /)
     |      Number of ones in the binary representation of the absolute value of self.
     |
     |      Also known as the population count.
     |
     |      >>> bin(13)
     |      '0b1101'
     |      >>> (13).bit_count()
     |      3
     |
     |  bit_length(self, /)
     |      Number of bits necessary to represent self in binary.
     |
     |      >>> bin(37)
     |      '0b100101'
     |      >>> (37).bit_length()
     |      6
     |
     |  conjugate(...)
     |      Returns self, the complex conjugate of any int.
     |
     |  is_integer(self, /)
     |      Returns True. Exists for duck type compatibility with float.is_integer.
     |
     |  to_bytes(self, /, length=1, byteorder='big', *, signed=False)
     |      Return an array of bytes representing an integer.
     |
     |      length
     |        Length of bytes object to use.  An OverflowError is raised if the
     |        integer is not representable with the given number of bytes.  Default
     |        is length 1.
     |      byteorder
     |        The byte order used to represent the integer.  If byteorder is 'big',
     |        the most significant byte is at the beginning of the byte array.  If
     |        byteorder is 'little', the most significant byte is at the end of the
     |        byte array.  To request the native byte order of the host system, use
     |        `sys.byteorder' as the byte order value.  Default is to use 'big'.
     |      signed
     |        Determines whether two's complement is used to represent the integer.
     |        If signed is False and a negative integer is given, an OverflowError
     |        is raised.
     |
     |  ----------------------------------------------------------------------
     |  Class methods inherited from builtins.int:
     |
     |  from_bytes(bytes, byteorder='big', *, signed=False)
     |      Return the integer represented by the given array of bytes.
     |
     |      bytes
     |        Holds the array of bytes to convert.  The argument must either
     |        support the buffer protocol or be an iterable object producing bytes.
     |        Bytes and bytearray are examples of built-in objects that support the
     |        buffer protocol.
     |      byteorder
     |        The byte order used to represent the integer.  If byteorder is 'big',
     |        the most significant byte is at the beginning of the byte array.  If
     |        byteorder is 'little', the most significant byte is at the end of the
     |        byte array.  To request the native byte order of the host system, use
     |        `sys.byteorder' as the byte order value.  Default is to use 'big'.
     |      signed
     |        Indicates whether two's complement is used to represent the integer.
     |
     |  ----------------------------------------------------------------------
     |  Data descriptors inherited from builtins.int:
     |
     |  denominator
     |      the denominator of a rational number in lowest terms
     |
     |  imag
     |      the imaginary part of a complex number
     |
     |  numerator
     |      the numerator of a rational number in lowest terms
     |
     |  real
     |      the real part of a complex number
     |
     |  ----------------------------------------------------------------------
     |  Methods inherited from enum.Flag:
     |
     |  __contains__(self, other)
     |      Returns True if self has at least the same flags set as other.
     |
     |  __iter__(self)
     |      Returns flags in definition order.
     |
     |  __len__(self)
     |      Return the number of members (no aliases)
     |
     |  ----------------------------------------------------------------------
     |  Methods inherited from enum.Enum:
     |
     |  __dir__(self)
     |      Returns public methods and other interesting attributes.
     |
     |  __init__(self, *args, **kwds)
     |      Initialize self.  See help(type(self)) for accurate signature.
     |
     |  __reduce_ex__(self, proto)
     |      Helper for pickle.
     |
     |  ----------------------------------------------------------------------
     |  Data descriptors inherited from enum.Enum:
     |
     |  name
     |      The name of the Enum member.
     |
     |  value
     |      The value of the Enum member.
     |
     |  ----------------------------------------------------------------------
     |  Static methods inherited from enum.EnumType:
     |
     |  __getitem__(name)
     |      Return the member matching `name`.
     |
     |  ----------------------------------------------------------------------
     |  Readonly properties inherited from enum.EnumType:
     |
     |  __members__
     |      Returns a mapping of member name->value.
     |
     |      This mapping lists all enum members, including aliases. Note that this
     |      is a read-only view of the internal mapping.

    class error(builtins.Exception)
     |  error(msg, pattern=None, pos=None)
     |
     |  Exception raised for invalid regular expressions.
     |
     |  Attributes:
     |
     |      msg: The unformatted error message
     |      pattern: The regular expression pattern
     |      pos: The index in the pattern where compilation failed (may be None)
     |      lineno: The line corresponding to pos (may be None)
     |      colno: The column corresponding to pos (may be None)
     |
     |  Method resolution order:
     |      error
     |      builtins.Exception
     |      builtins.BaseException
     |      builtins.object
     |
     |  Methods defined here:
     |
     |  __init__(self, msg, pattern=None, pos=None) from re._constants.error
     |      Initialize self.  See help(type(self)) for accurate signature.
     |
     |  ----------------------------------------------------------------------
     |  Data descriptors defined here:
     |
     |  __weakref__
     |      list of weak references to the object
     |
     |  ----------------------------------------------------------------------
     |  Static methods inherited from builtins.Exception:
     |
     |  __new__(*args, **kwargs) class method of builtins.Exception
     |      Create and return a new object.  See help(type) for accurate signature.
     |
     |  ----------------------------------------------------------------------
     |  Methods inherited from builtins.BaseException:
     |
     |  __getattribute__(self, name, /)
     |      Return getattr(self, name).
     |
     |  __reduce__(...)
     |      Helper for pickle.
     |
     |  __repr__(self, /)
     |      Return repr(self).
     |
     |  __setstate__(...)
     |
     |  __str__(self, /)
     |      Return str(self).
     |
     |  add_note(...)
     |      Exception.add_note(note) --
     |      add a note to the exception
     |
     |  with_traceback(...)
     |      Exception.with_traceback(tb) --
     |      set self.__traceback__ to tb and return self.
     |
     |  ----------------------------------------------------------------------
     |  Data descriptors inherited from builtins.BaseException:
     |
     |  __cause__
     |      exception cause
     |
     |  __context__
     |      exception context
     |
     |  __dict__
     |
     |  __suppress_context__
     |
     |  __traceback__
     |
     |  args

FUNCTIONS
    compile(pattern, flags=0)
        Compile a regular expression pattern, returning a Pattern object.

    escape(pattern)
        Escape special characters in a string.

    findall(pattern, string, flags=0)
        Return a list of all non-overlapping matches in the string.

        If one or more capturing groups are present in the pattern, return
        a list of groups; this will be a list of tuples if the pattern
        has more than one group.

        Empty matches are included in the result.

    finditer(pattern, string, flags=0)
        Return an iterator over all non-overlapping matches in the
        string.  For each match, the iterator returns a Match object.

        Empty matches are included in the result.

    fullmatch(pattern, string, flags=0)
        Try to apply the pattern to all of the string, returning
        a Match object, or None if no match was found.

    match(pattern, string, flags=0)
        Try to apply the pattern at the start of the string, returning
        a Match object, or None if no match was found.

    purge()
        Clear the regular expression caches

    search(pattern, string, flags=0)
        Scan through string looking for a match to the pattern, returning
        a Match object, or None if no match was found.

    split(pattern, string, maxsplit=0, flags=0)
        Split the source string by the occurrences of the pattern,
        returning a list containing the resulting substrings.  If
        capturing parentheses are used in pattern, then the text of all
        groups in the pattern are also returned as part of the resulting
        list.  If maxsplit is nonzero, at most maxsplit splits occur,
        and the remainder of the string is returned as the final element
        of the list.

    sub(pattern, repl, string, count=0, flags=0)
        Return the string obtained by replacing the leftmost
        non-overlapping occurrences of the pattern in string by the
        replacement repl.  repl can be either a string or a callable;
        if a string, backslash escapes in it are processed.  If it is
        a callable, it's passed the Match object and must return
        a replacement string to be used.

    subn(pattern, repl, string, count=0, flags=0)
        Return a 2-tuple containing (new_string, number).
        new_string is the string obtained by replacing the leftmost
        non-overlapping occurrences of the pattern in the source
        string by the replacement repl.  number is the number of
        substitutions that were made. repl can be either a string or a
        callable; if a string, backslash escapes in it are processed.
        If it is a callable, it's passed the Match object and must
        return a replacement string to be used.

    template(pattern, flags=0)
        Compile a template pattern, returning a Pattern object, deprecated

DATA
    A = re.ASCII
    ASCII = re.ASCII
    DOTALL = re.DOTALL
    I = re.IGNORECASE
    IGNORECASE = re.IGNORECASE
    L = re.LOCALE
    LOCALE = re.LOCALE
    M = re.MULTILINE
    MULTILINE = re.MULTILINE
    NOFLAG = re.NOFLAG
    S = re.DOTALL
    U = re.UNICODE
    UNICODE = re.UNICODE
    VERBOSE = re.VERBOSE
    X = re.VERBOSE
    __all__ = ['match', 'fullmatch', 'search', 'sub', 'subn', 'split', 'fi...

VERSION
    2.2.1

FILE
    c:\users\youse\appdata\local\programs\python\python312\lib\re\__init__.py

elasticsearch.serializer
Python Library Documentation: module elasticsearch.serializer in elasticsearch

NAME
    elasticsearch.serializer

DESCRIPTION
    #  Licensed to Elasticsearch B.V. under one or more contributor
    #  license agreements. See the NOTICE file distributed with
    #  this work for additional information regarding copyright
    #  ownership. Elasticsearch B.V. licenses this file to you under
    #  the Apache License, Version 2.0 (the "License"); you may
    #  not use this file except in compliance with the License.
    #  You may obtain a copy of the License at
    #
    #       http://www.apache.org/licenses/LICENSE-2.0
    #
    #  Unless required by applicable law or agreed to in writing,
    #  software distributed under the License is distributed on an
    #  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    #  KIND, either express or implied.  See the License for the
    #  specific language governing permissions and limitations
    #  under the License.

CLASSES
    builtins.object
        elastic_transport.Serializer
            elastic_transport.TextSerializer
            MapboxVectorTileSerializer
            PyArrowSerializer
    elastic_transport.JsonSerializer(elastic_transport.Serializer)
        elasticsearch.JsonSerializer
            elasticsearch.OrjsonSerializer(elasticsearch.JsonSerializer, elastic_transport.OrjsonSerializer)
            CompatibilityModeJsonSerializer
            NdjsonSerializer(elasticsearch.JsonSerializer, elastic_transport.NdjsonSerializer)
                CompatibilityModeNdjsonSerializer

    class CompatibilityModeJsonSerializer(elasticsearch.JsonSerializer)
     |  Method resolution order:
     |      CompatibilityModeJsonSerializer
     |      elasticsearch.JsonSerializer
     |      elastic_transport.JsonSerializer
     |      elastic_transport.Serializer
     |      builtins.object
     |
     |  Data and other attributes defined here:
     |
     |  __annotations__ = {'mimetype': typing.ClassVar[str]}
     |
     |  mimetype = 'application/vnd.elasticsearch+json'
     |
     |  ----------------------------------------------------------------------
     |  Methods inherited from elasticsearch.JsonSerializer:
     |
     |  default(self, data: Any) -> Any
     |
     |  ----------------------------------------------------------------------
     |  Methods inherited from elastic_transport.JsonSerializer:
     |
     |  dumps(self, data: Any) -> bytes
     |
     |  json_dumps(self, data: Any) -> bytes
     |
     |  json_loads(self, data: bytes) -> Any
     |
     |  loads(self, data: bytes) -> Any
     |
     |  ----------------------------------------------------------------------
     |  Data descriptors inherited from elastic_transport.Serializer:
     |
     |  __dict__
     |      dictionary for instance variables
     |
     |  __weakref__
     |      list of weak references to the object

    class CompatibilityModeNdjsonSerializer(NdjsonSerializer)
     |  Method resolution order:
     |      CompatibilityModeNdjsonSerializer
     |      NdjsonSerializer
     |      elasticsearch.JsonSerializer
     |      elastic_transport.NdjsonSerializer
     |      elastic_transport.JsonSerializer
     |      elastic_transport.Serializer
     |      builtins.object
     |
     |  Data and other attributes defined here:
     |
     |  __annotations__ = {'mimetype': typing.ClassVar[str]}
     |
     |  mimetype = 'application/vnd.elasticsearch+x-ndjson'
     |
     |  ----------------------------------------------------------------------
     |  Methods inherited from NdjsonSerializer:
     |
     |  default(self, data: Any) -> Any
     |
     |  ----------------------------------------------------------------------
     |  Methods inherited from elastic_transport.NdjsonSerializer:
     |
     |  dumps(self, data: Any) -> bytes
     |
     |  loads(self, data: bytes) -> Any
     |
     |  ----------------------------------------------------------------------
     |  Methods inherited from elastic_transport.JsonSerializer:
     |
     |  json_dumps(self, data: Any) -> bytes
     |
     |  json_loads(self, data: bytes) -> Any
     |
     |  ----------------------------------------------------------------------
     |  Data descriptors inherited from elastic_transport.Serializer:
     |
     |  __dict__
     |      dictionary for instance variables
     |
     |  __weakref__
     |      list of weak references to the object

    class JsonSerializer(elastic_transport.JsonSerializer)
     |  Method resolution order:
     |      JsonSerializer
     |      elastic_transport.JsonSerializer
     |      elastic_transport.Serializer
     |      builtins.object
     |
     |  Methods defined here:
     |
     |  default(self, data: Any) -> Any
     |
     |  ----------------------------------------------------------------------
     |  Data and other attributes defined here:
     |
     |  __annotations__ = {'mimetype': typing.ClassVar[str]}
     |
     |  mimetype = 'application/json'
     |
     |  ----------------------------------------------------------------------
     |  Methods inherited from elastic_transport.JsonSerializer:
     |
     |  dumps(self, data: Any) -> bytes
     |
     |  json_dumps(self, data: Any) -> bytes
     |
     |  json_loads(self, data: bytes) -> Any
     |
     |  loads(self, data: bytes) -> Any
     |
     |  ----------------------------------------------------------------------
     |  Data descriptors inherited from elastic_transport.Serializer:
     |
     |  __dict__
     |      dictionary for instance variables
     |
     |  __weakref__
     |      list of weak references to the object

    class MapboxVectorTileSerializer(elastic_transport.Serializer)
     |  Method resolution order:
     |      MapboxVectorTileSerializer
     |      elastic_transport.Serializer
     |      builtins.object
     |
     |  Methods defined here:
     |
     |  dumps(self, data: bytes) -> bytes
     |
     |  loads(self, data: bytes) -> bytes
     |
     |  ----------------------------------------------------------------------
     |  Data and other attributes defined here:
     |
     |  __annotations__ = {'mimetype': typing.ClassVar[str]}
     |
     |  mimetype = 'application/vnd.mapbox-vector-tile'
     |
     |  ----------------------------------------------------------------------
     |  Data descriptors inherited from elastic_transport.Serializer:
     |
     |  __dict__
     |      dictionary for instance variables
     |
     |  __weakref__
     |      list of weak references to the object

    class NdjsonSerializer(elasticsearch.JsonSerializer, elastic_transport.NdjsonSerializer)
     |  Method resolution order:
     |      NdjsonSerializer
     |      elasticsearch.JsonSerializer
     |      elastic_transport.NdjsonSerializer
     |      elastic_transport.JsonSerializer
     |      elastic_transport.Serializer
     |      builtins.object
     |
     |  Methods defined here:
     |
     |  default(self, data: Any) -> Any
     |
     |  ----------------------------------------------------------------------
     |  Data and other attributes defined here:
     |
     |  __annotations__ = {'mimetype': typing.ClassVar[str]}
     |
     |  mimetype = 'application/x-ndjson'
     |
     |  ----------------------------------------------------------------------
     |  Methods inherited from elastic_transport.NdjsonSerializer:
     |
     |  dumps(self, data: Any) -> bytes
     |
     |  loads(self, data: bytes) -> Any
     |
     |  ----------------------------------------------------------------------
     |  Methods inherited from elastic_transport.JsonSerializer:
     |
     |  json_dumps(self, data: Any) -> bytes
     |
     |  json_loads(self, data: bytes) -> Any
     |
     |  ----------------------------------------------------------------------
     |  Data descriptors inherited from elastic_transport.Serializer:
     |
     |  __dict__
     |      dictionary for instance variables
     |
     |  __weakref__
     |      list of weak references to the object

    class OrjsonSerializer(JsonSerializer, elastic_transport.OrjsonSerializer)
     |  Method resolution order:
     |      OrjsonSerializer
     |      JsonSerializer
     |      elastic_transport.OrjsonSerializer
     |      elastic_transport.JsonSerializer
     |      elastic_transport.Serializer
     |      builtins.object
     |
     |  Methods defined here:
     |
     |  default(self, data: Any) -> Any
     |
     |  ----------------------------------------------------------------------
     |  Data and other attributes defined here:
     |
     |  __annotations__ = {}
     |
     |  ----------------------------------------------------------------------
     |  Data and other attributes inherited from JsonSerializer:
     |
     |  mimetype = 'application/json'
     |
     |  ----------------------------------------------------------------------
     |  Methods inherited from elastic_transport.OrjsonSerializer:
     |
     |  json_dumps(self, data: Any) -> bytes
     |
     |  json_loads(self, data: bytes) -> Any
     |
     |  ----------------------------------------------------------------------
     |  Methods inherited from elastic_transport.JsonSerializer:
     |
     |  dumps(self, data: Any) -> bytes
     |
     |  loads(self, data: bytes) -> Any
     |
     |  ----------------------------------------------------------------------
     |  Data descriptors inherited from elastic_transport.Serializer:
     |
     |  __dict__
     |      dictionary for instance variables
     |
     |  __weakref__
     |      list of weak references to the object

    class PyArrowSerializer(elastic_transport.Serializer)
     |  PyArrow serializer for deserializing Arrow Stream data.
     |
     |  Method resolution order:
     |      PyArrowSerializer
     |      elastic_transport.Serializer
     |      builtins.object
     |
     |  Methods defined here:
     |
     |  dumps(self, data: Any) -> bytes
     |
     |  loads(self, data: bytes) -> pyarrow.lib.Table
     |
     |  ----------------------------------------------------------------------
     |  Data and other attributes defined here:
     |
     |  __annotations__ = {'mimetype': typing.ClassVar[str]}
     |
     |  mimetype = 'application/vnd.apache.arrow.stream'
     |
     |  ----------------------------------------------------------------------
     |  Data descriptors inherited from elastic_transport.Serializer:
     |
     |  __dict__
     |      dictionary for instance variables
     |
     |  __weakref__
     |      list of weak references to the object

    class Serializer(builtins.object)
     |  Serializer interface.
     |
     |  Methods defined here:
     |
     |  dumps(self, data: Any) -> bytes
     |
     |  loads(self, data: bytes) -> Any
     |
     |  ----------------------------------------------------------------------
     |  Data descriptors defined here:
     |
     |  __dict__
     |      dictionary for instance variables
     |
     |  __weakref__
     |      list of weak references to the object
     |
     |  ----------------------------------------------------------------------
     |  Data and other attributes defined here:
     |
     |  __annotations__ = {'mimetype': typing.ClassVar[str]}

    class TextSerializer(Serializer)
     |  Text serializer to and from UTF-8.
     |
     |  Method resolution order:
     |      TextSerializer
     |      Serializer
     |      builtins.object
     |
     |  Methods defined here:
     |
     |  dumps(self, data: str) -> bytes
     |
     |  loads(self, data: bytes) -> str
     |
     |  ----------------------------------------------------------------------
     |  Data and other attributes defined here:
     |
     |  __annotations__ = {'mimetype': typing.ClassVar[str]}
     |
     |  mimetype = 'text/*'
     |
     |  ----------------------------------------------------------------------
     |  Data descriptors inherited from Serializer:
     |
     |  __dict__
     |      dictionary for instance variables
     |
     |  __weakref__
     |      list of weak references to the object

DATA
    __all__ = ['Serializer', 'JsonSerializer', 'TextSerializer', 'NdjsonSe...
    __annotations__ = {'DEFAULT_SERIALIZERS': typing.Dict[str, elastic_tra...

FILE
    c:\users\youse\appdata\local\programs\python\python312\lib\site-packages\elasticsearch\serializer.py

elasticsearch.warnings
Python Library Documentation: module warnings

NAME
    warnings - Python part of the warnings subsystem.

MODULE REFERENCE
    https://docs.python.org/3.12/library/warnings.html

    The following documentation is automatically generated from the Python
    source files.  It may be incomplete, incorrect or include features that
    are considered implementation detail and may vary between Python
    implementations.  When in doubt, consult the module reference at the
    location listed above.

CLASSES
    builtins.object
        catch_warnings

    class catch_warnings(builtins.object)
     |  catch_warnings(*, record=False, module=None, action=None, category=<class 'Warning'>, lineno=0, append=False)
     |
     |  A context manager that copies and restores the warnings filter upon
     |  exiting the context.
     |
     |  The 'record' argument specifies whether warnings should be captured by a
     |  custom implementation of warnings.showwarning() and be appended to a list
     |  returned by the context manager. Otherwise None is returned by the context
     |  manager. The objects appended to the list are arguments whose attributes
     |  mirror the arguments to showwarning().
     |
     |  The 'module' argument is to specify an alternative module to the module
     |  named 'warnings' and imported under that name. This argument is only useful
     |  when testing the warnings module itself.
     |
     |  If the 'action' argument is not None, the remaining arguments are passed
     |  to warnings.simplefilter() as if it were called immediately on entering the
     |  context.
     |
     |  Methods defined here:
     |
     |  __enter__(self)
     |
     |  __exit__(self, *exc_info)
     |
     |  __init__(self, *, record=False, module=None, action=None, category=<class 'Warning'>, lineno=0, append=False)
     |      Specify whether to record warnings and if an alternative module
     |      should be used other than sys.modules['warnings'].
     |
     |      For compatibility with Python 3.0, please consider all arguments to be
     |      keyword-only.
     |
     |  __repr__(self)
     |      Return repr(self).
     |
     |  ----------------------------------------------------------------------
     |  Data descriptors defined here:
     |
     |  __dict__
     |      dictionary for instance variables
     |
     |  __weakref__
     |      list of weak references to the object

FUNCTIONS
    filterwarnings(action, message='', category=<class 'Warning'>, module='', lineno=0, append=False)
        Insert an entry into the list of warnings filters (at the front).

        'action' -- one of "error", "ignore", "always", "default", "module",
                    or "once"
        'message' -- a regex that the warning message must match
        'category' -- a class that the warning must be a subclass of
        'module' -- a regex that the module name must match
        'lineno' -- an integer line number, 0 matches all warnings
        'append' -- if true, append to the list of filters

    formatwarning(message, category, filename, lineno, line=None)
        Function to format a warning the standard way.

    resetwarnings()
        Clear the list of warning filters, so that no filters are active.

    showwarning(message, category, filename, lineno, file=None, line=None)
        Hook to write a warning to a file; replace if you like.

    simplefilter(action, category=<class 'Warning'>, lineno=0, append=False)
        Insert a simple entry into the list of warnings filters (at the front).

        A simple filter matches all modules and messages.
        'action' -- one of "error", "ignore", "always", "default", "module",
                    or "once"
        'category' -- a class that the warning must be a subclass of
        'lineno' -- an integer line number, 0 matches all warnings
        'append' -- if true, append to the list of filters

    warn(...)
        Issue a warning, or maybe ignore it or raise an exception.

        message
          Text of the warning message.
        category
          The Warning category subclass. Defaults to UserWarning.
        stacklevel
          How far up the call stack to make this warning appear. A value of 2 for
          example attributes the warning to the caller of the code calling warn().
        source
          If supplied, the destroyed object which emitted a ResourceWarning
        skip_file_prefixes
          An optional tuple of module filename prefixes indicating frames to skip
          during stacklevel computations for stack frame attribution.

    warn_explicit(...)
        Issue a warning, or maybe ignore it or raise an exception.

DATA
    __all__ = ['warn', 'warn_explicit', 'showwarning', 'formatwarning', 'f...

FILE
    c:\users\youse\appdata\local\programs\python\python312\lib\warnings.py