Auto-generated code for main (#2439)

This commit is contained in:
Elastic Machine
2024-11-11 18:05:18 +01:00
committed by GitHub
parent 7bcd75bdb0
commit 2b2a2f03e6
26 changed files with 625 additions and 93 deletions

View File

@ -0,0 +1,28 @@
// This file is autogenerated, DO NOT EDIT
// Use `node scripts/generate-docs-examples.js` to generate the docs examples
[source, js]
----
const response = await client.search({
index: "my-index-bit-vectors",
query: {
script_score: {
query: {
match_all: {},
},
script: {
source: "dotProduct(params.query_vector, 'my_dense_vector')",
params: {
query_vector: [
0.23, 1.45, 3.67, 4.89, -0.56, 2.34, 3.21, 1.78, -2.45, 0.98, -0.12,
3.45, 4.56, 2.78, 1.23, 0.67, 3.89, 4.12, -2.34, 1.56, 0.78, 3.21,
4.12, 2.45, -1.67, 0.34, -3.45, 4.56, -2.78, 1.23, -0.67, 3.89,
-4.34, 2.12, -1.56, 0.78, -3.21, 4.45, 2.12, 1.67,
],
},
},
},
},
});
console.log(response);
----

View File

@ -0,0 +1,43 @@
// This file is autogenerated, DO NOT EDIT
// Use `node scripts/generate-docs-examples.js` to generate the docs examples
[source, js]
----
const response = await client.search({
index: "my-index-000001",
retriever: {
rule: {
match_criteria: {
query_string: "puggles",
user_country: "us",
},
ruleset_ids: ["my-ruleset"],
retriever: {
rrf: {
retrievers: [
{
standard: {
query: {
query_string: {
query: "pugs",
},
},
},
},
{
standard: {
query: {
query_string: {
query: "puggles",
},
},
},
},
],
},
},
},
},
});
console.log(response);
----

View File

@ -0,0 +1,52 @@
// This file is autogenerated, DO NOT EDIT
// Use `node scripts/generate-docs-examples.js` to generate the docs examples
[source, js]
----
const response = await client.indices.create({
index: "my-index-bit-vectors",
mappings: {
properties: {
my_dense_vector: {
type: "dense_vector",
index: false,
element_type: "bit",
dims: 40,
},
},
},
});
console.log(response);
const response1 = await client.index({
index: "my-index-bit-vectors",
id: 1,
document: {
my_dense_vector: [8, 5, -15, 1, -7],
},
});
console.log(response1);
const response2 = await client.index({
index: "my-index-bit-vectors",
id: 2,
document: {
my_dense_vector: [-1, 115, -3, 4, -128],
},
});
console.log(response2);
const response3 = await client.index({
index: "my-index-bit-vectors",
id: 3,
document: {
my_dense_vector: [2, 18, -5, 0, -124],
},
});
console.log(response3);
const response4 = await client.indices.refresh({
index: "my-index-bit-vectors",
});
console.log(response4);
----

View File

@ -0,0 +1,23 @@
// This file is autogenerated, DO NOT EDIT
// Use `node scripts/generate-docs-examples.js` to generate the docs examples
[source, js]
----
const response = await client.search({
index: "my-index-bit-vectors",
query: {
script_score: {
query: {
match_all: {},
},
script: {
source: "dotProduct(params.query_vector, 'my_dense_vector')",
params: {
query_vector: [8, 5, -15, 1, -7],
},
},
},
},
});
console.log(response);
----

View File

@ -0,0 +1,27 @@
// This file is autogenerated, DO NOT EDIT
// Use `node scripts/generate-docs-examples.js` to generate the docs examples
[source, js]
----
const response = await client.search({
index: "movies",
retriever: {
rule: {
match_criteria: {
query_string: "harry potter",
},
ruleset_ids: ["my-ruleset"],
retriever: {
standard: {
query: {
query_string: {
query: "harry potter",
},
},
},
},
},
},
});
console.log(response);
----

View File

@ -0,0 +1,42 @@
// This file is autogenerated, DO NOT EDIT
// Use `node scripts/generate-docs-examples.js` to generate the docs examples
[source, js]
----
const response = await client.search({
index: "movies",
retriever: {
rule: {
match_criteria: {
query_string: "harry potter",
},
ruleset_ids: ["my-ruleset"],
retriever: {
rrf: {
retrievers: [
{
standard: {
query: {
query_string: {
query: "sorcerer's stone",
},
},
},
},
{
standard: {
query: {
query_string: {
query: "chamber of secrets",
},
},
},
},
],
},
},
},
},
});
console.log(response);
----

View File

@ -5,11 +5,15 @@
----
const response = await client.search({
index: "my-index-000001",
query: {
retriever: {
rule: {
organic: {
query_string: {
query: "puggles",
retriever: {
standard: {
query: {
query_string: {
query: "puggles",
},
},
},
},
match_criteria: {

View File

@ -58,7 +58,9 @@ Set to all or any positive integer up to the total number of shards in the index
[discrete]
=== clear_scroll
Clears the search context and results for a scrolling search.
Clear a scrolling search.
Clear the search context and results for a scrolling search.
{ref}/clear-scroll-api.html[Endpoint documentation]
[source,ts]
@ -74,7 +76,12 @@ To clear all scroll IDs, use `_all`.
[discrete]
=== close_point_in_time
Closes a point-in-time.
Close a point in time.
A point in time must be opened explicitly before being used in search requests.
The `keep_alive` parameter tells Elasticsearch how long it should persist.
A point in time is automatically closed when the `keep_alive` period has elapsed.
However, keeping points in time has a cost; close them as soon as they are no longer required for search requests.
{ref}/point-in-time-api.html[Endpoint documentation]
[source,ts]
@ -389,9 +396,13 @@ Random by default.
[discrete]
=== field_caps
The field capabilities API returns the information about the capabilities of fields among multiple indices.
The field capabilities API returns runtime fields like any other field. For example, a runtime field with a type
of keyword is returned as any other field that belongs to the `keyword` family.
Get the field capabilities.
Get information about the capabilities of fields among multiple indices.
For data streams, the API returns field capabilities among the streams 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 `keyword` family.
{ref}/search-field-caps.html[Endpoint documentation]
[source,ts]
@ -588,7 +599,19 @@ client.info()
[discrete]
=== knn_search
Performs a kNN search.
Run a knn search.
NOTE: The kNN search API has been replaced by the `knn` option in the search API.
Perform a k-nearest neighbor (kNN) search on a dense_vector field and return the matching documents.
Given a query vector, the API finds the k closest vectors and returns those documents as search hits.
Elasticsearch uses the HNSW algorithm to support efficient kNN search.
Like most kNN algorithms, HNSW is an approximate method that sacrifices result accuracy for improved search speed.
This means the results returned are not always the true k closest neighbors.
The kNN search API supports restricting the search using a filter.
The search will return the top k documents that also match the filter query.
{ref}/search-search.html[Endpoint documentation]
[source,ts]
@ -704,7 +727,7 @@ However, using computationally expensive named queries on a large number of hits
[discrete]
=== msearch_template
Runs multiple templated searches with a single request.
Run multiple templated searches.
{ref}/search-multi-search.html[Endpoint documentation]
[source,ts]
@ -764,13 +787,18 @@ Random by default.
[discrete]
=== open_point_in_time
A search request by default executes against the most recent visible data of the target indices,
Open a point in time.
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, its preferred to perform multiple
search requests using the same point in time. For example, if refreshes happen between
`search_after` 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.
A point in time must be opened explicitly before being used in search requests.
The `keep_alive` parameter tells Elasticsearch how long it should persist.
{ref}/point-in-time-api.html[Endpoint documentation]
[source,ts]
----
@ -828,7 +856,9 @@ If no response is received before the timeout expires, the request fails and ret
[discrete]
=== rank_eval
Enables you to evaluate the quality of ranked search results over a set of typical search queries.
Evaluate ranked search results.
Evaluate the quality of ranked search results over a set of typical search queries.
{ref}/search-rank-eval.html[Endpoint documentation]
[source,ts]
@ -900,7 +930,9 @@ client.reindexRethrottle({ task_id })
[discrete]
=== render_search_template
Renders a search template as a search request body.
Render a search template.
Render a search template as a search request body.
{ref}/render-search-template-api.html[Endpoint documentation]
[source,ts]
@ -972,7 +1004,9 @@ client.scroll({ scroll_id })
[discrete]
=== search
Returns search hits that match the query defined in the request.
Run a search.
Get search hits that match the query defined in the request.
You can provide search queries using the `q` query string parameter or the request body.
If both are specified, only the query parameter is used.
@ -1014,7 +1048,7 @@ A post filter has no impact on the aggregation results.
NOTE: This is a debugging tool and adds significant overhead to search execution.
** *`query` (Optional, { bool, boosting, common, combined_fields, constant_score, dis_max, distance_feature, exists, function_score, fuzzy, geo_bounding_box, geo_distance, geo_polygon, geo_shape, has_child, has_parent, ids, intervals, knn, match, match_all, match_bool_prefix, match_none, match_phrase, match_phrase_prefix, more_like_this, multi_match, nested, parent_id, percolate, pinned, prefix, query_string, range, rank_feature, regexp, rule, script, script_score, semantic, shape, simple_query_string, span_containing, span_field_masking, span_first, span_multi, span_near, span_not, span_or, span_term, span_within, sparse_vector, term, terms, terms_set, text_expansion, weighted_tokens, wildcard, wrapper, type })*: Defines the search definition using the Query DSL.
** *`rescore` (Optional, { window_size, query, learning_to_rank } | { window_size, query, learning_to_rank }[])*: Can be used to improve precision by reordering just the top (for example 100 - 500) documents returned by the `query` and `post_filter` phases.
** *`retriever` (Optional, { standard, knn, rrf, text_similarity_reranker })*: 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.
** *`retriever` (Optional, { standard, knn, rrf, text_similarity_reranker, rule })*: 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.
** *`script_fields` (Optional, Record<string, { script, ignore_failure }>)*: Retrieve a script evaluation (based on different fields) for each hit.
** *`search_after` (Optional, number | number | string | boolean | null | User-defined value[])*: Used to retrieve the next page of hits using a set of sort values from the previous page.
** *`size` (Optional, number)*: The number of hits to return.
@ -1082,8 +1116,6 @@ However, using computationally expensive named queries on a large number of hits
This parameter can only be used when the `q` query string parameter is specified.
** *`max_concurrent_shard_requests` (Optional, number)*: Defines the number of concurrent shard requests per node this search executes 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.
** *`min_compatible_shard_node` (Optional, string)*: The minimum version of the node that can handle the request
Any handling node with a lower version will fail the request.
** *`preference` (Optional, string)*: 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;
@ -1130,7 +1162,8 @@ Fetches with this enabled will be slower the enabling synthetic source natively
[discrete]
=== search_mvt
Search a vector tile.
Searches a vector tile for geospatial values.
Search a vector tile for geospatial values.
{ref}/search-vector-tile-api.html[Endpoint documentation]
[source,ts]
@ -1189,7 +1222,11 @@ suggested label positions for the original features.
[discrete]
=== search_shards
Returns information about the indices and shards that a search request would be executed against.
Get the search shards.
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 indices section.
{ref}/search-shards.html[Endpoint documentation]
[source,ts]
@ -1216,7 +1253,7 @@ Random by default.
[discrete]
=== search_template
Runs a search with a search template.
Run a search with a search template.
{ref}/search-template.html[Endpoint documentation]
[source,ts]
@ -1291,7 +1328,8 @@ client.termsEnum({ index, field })
[discrete]
=== termvectors
Get term vector information.
Returns information and statistics about terms in the fields of a particular document.
Get information and statistics about terms in the fields of a particular document.
{ref}/docs-termvectors.html[Endpoint documentation]
[source,ts]
@ -1457,6 +1495,7 @@ client.updateByQueryRethrottle({ task_id })
[discrete]
==== delete
Delete an async search.
If the asynchronous search is still running, it is cancelled.
Otherwise, the saved search results are deleted.
If the Elasticsearch security features are enabled, the deletion of a specific async search is restricted to: the authenticated user that submitted the original search request; users that have the `cancel_task` cluster privilege.
@ -1476,6 +1515,7 @@ client.asyncSearch.delete({ id })
[discrete]
==== get
Get async search results.
Retrieve the results of a previously submitted asynchronous search request.
If the Elasticsearch security features are enabled, access to the results of a specific async search is restricted to the user or API key that submitted it.
@ -1502,8 +1542,9 @@ By default no timeout is set meaning that the currently available results will b
[discrete]
==== status
Get async search status.
Retrieve the status of a previously submitted async search request given its identifier, without retrieving search results.
Get the async search status.
Get the status of a previously submitted async search request given its identifier, without retrieving search results.
If the Elasticsearch security features are enabled, use of this API is restricted to the `monitoring_user` role.
{ref}/async-search.html[Endpoint documentation]
@ -1521,6 +1562,7 @@ client.asyncSearch.status({ id })
[discrete]
==== submit
Run an async search.
When the primary sort of the results is an indexed field, shards get sorted based on minimum and maximum value that they hold for that field. Partial results become available following the sort criteria that was requested.
Warning: Asynchronous search does not support scroll or search requests that include only the suggest section.
@ -1613,7 +1655,6 @@ A partial reduction is performed every time the coordinating node has received a
** *`ignore_unavailable` (Optional, boolean)*: Whether specified concrete indices should be ignored when unavailable (missing or closed)
** *`lenient` (Optional, boolean)*: Specify whether format-based query failures (such as providing text to a numeric field) should be ignored
** *`max_concurrent_shard_requests` (Optional, number)*: The number of concurrent shard requests per node this search executes 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
** *`min_compatible_shard_node` (Optional, string)*
** *`preference` (Optional, string)*: Specify the node or shard the operation should be performed on (default: random)
** *`pre_filter_shard_size` (Optional, number)*: The default value cannot be changed, which enforces the execution of a pre-filter roundtrip to retrieve statistics from each shard so that the ones that surely dont hold any document matching the query get skipped.
** *`request_cache` (Optional, boolean)*: Specify if request cache should be used for this request or not, defaults to true
@ -1634,7 +1675,9 @@ A partial reduction is performed every time the coordinating node has received a
=== autoscaling
[discrete]
==== delete_autoscaling_policy
Deletes an autoscaling policy. Designed for indirect use by ECE/ESS and ECK. Direct use is not supported.
Delete an autoscaling policy.
NOTE: This feature is designed for indirect use by Elasticsearch Service, Elastic Cloud Enterprise, and Elastic Cloud on Kubernetes. Direct use is not supported.
{ref}/autoscaling-delete-autoscaling-policy.html[Endpoint documentation]
[source,ts]
@ -1650,7 +1693,20 @@ client.autoscaling.deleteAutoscalingPolicy({ name })
[discrete]
==== get_autoscaling_capacity
Gets the current autoscaling capacity based on the configured autoscaling policy. Designed for indirect use by ECE/ESS and ECK. Direct use is not supported.
Get the autoscaling capacity.
NOTE: This feature is designed for indirect use by Elasticsearch Service, Elastic Cloud Enterprise, and Elastic Cloud on Kubernetes. Direct use is not supported.
This API gets the current autoscaling capacity based on the configured autoscaling policy.
It will return information to size the cluster appropriately to the current workload.
The `required_capacity` is calculated as the maximum of the `required_capacity` result of all individual deciders that are enabled for the policy.
The operator should verify that the `current_nodes` match the operators knowledge of the cluster to avoid making autoscaling decisions based on stale or incomplete information.
The response contains decider-specific information you can use to diagnose how and why autoscaling determined a certain capacity was required.
This information is provided for diagnosis only.
Do not use this information to make autoscaling decisions.
{ref}/autoscaling-get-autoscaling-capacity.html[Endpoint documentation]
[source,ts]
@ -1661,7 +1717,9 @@ client.autoscaling.getAutoscalingCapacity()
[discrete]
==== get_autoscaling_policy
Retrieves an autoscaling policy. Designed for indirect use by ECE/ESS and ECK. Direct use is not supported.
Get an autoscaling policy.
NOTE: This feature is designed for indirect use by Elasticsearch Service, Elastic Cloud Enterprise, and Elastic Cloud on Kubernetes. Direct use is not supported.
{ref}/autoscaling-get-autoscaling-capacity.html[Endpoint documentation]
[source,ts]
@ -1677,7 +1735,9 @@ client.autoscaling.getAutoscalingPolicy({ name })
[discrete]
==== put_autoscaling_policy
Creates a new autoscaling policy. Designed for indirect use by ECE/ESS and ECK. Direct use is not supported.
Create or update an autoscaling policy.
NOTE: This feature is designed for indirect use by Elasticsearch Service, Elastic Cloud Enterprise, and Elastic Cloud on Kubernetes. Direct use is not supported.
{ref}/autoscaling-put-autoscaling-policy.html[Endpoint documentation]
[source,ts]
@ -1732,6 +1792,10 @@ client.cat.allocation({ ... })
* *Request (object):*
** *`node_id` (Optional, string | string[])*: List of node identifiers or names used to limit the returned information.
** *`bytes` (Optional, Enum("b" | "kb" | "mb" | "gb" | "tb" | "pb"))*: The unit used to display byte values.
** *`local` (Optional, boolean)*: If `true`, the request computes the list of selected nodes from the
local cluster state. If `false` the list of selected nodes are computed
from the cluster state of the master node. In both cases the coordinating
node will send requests for further information to each selected node.
[discrete]
==== component_templates
@ -1753,6 +1817,10 @@ client.cat.componentTemplates({ ... })
* *Request (object):*
** *`name` (Optional, string)*: The name of the component template. Accepts wildcard expressions. If omitted, all component templates are returned.
** *`local` (Optional, boolean)*: If `true`, the request computes the list of selected nodes from the
local cluster state. If `false` the list of selected nodes are computed
from the cluster state of the master node. In both cases the coordinating
node will send requests for further information to each selected node.
[discrete]
==== count
@ -1879,9 +1947,17 @@ IMPORTANT: cat APIs are only intended for human consumption using the command li
{ref}/cat-master.html[Endpoint documentation]
[source,ts]
----
client.cat.master()
client.cat.master({ ... })
----
[discrete]
==== Arguments
* *Request (object):*
** *`local` (Optional, boolean)*: If `true`, the request computes the list of selected nodes from the
local cluster state. If `false` the list of selected nodes are computed
from the cluster state of the master node. In both cases the coordinating
node will send requests for further information to each selected node.
[discrete]
==== ml_data_frame_analytics
@ -2020,9 +2096,17 @@ IMPORTANT: cat APIs are only intended for human consumption using the command li
{ref}/cat-nodeattrs.html[Endpoint documentation]
[source,ts]
----
client.cat.nodeattrs()
client.cat.nodeattrs({ ... })
----
[discrete]
==== Arguments
* *Request (object):*
** *`local` (Optional, boolean)*: If `true`, the request computes the list of selected nodes from the
local cluster state. If `false` the list of selected nodes are computed
from the cluster state of the master node. In both cases the coordinating
node will send requests for further information to each selected node.
[discrete]
==== nodes
@ -2051,9 +2135,17 @@ IMPORTANT: cat APIs are only intended for human consumption using the command li
{ref}/cat-pending-tasks.html[Endpoint documentation]
[source,ts]
----
client.cat.pendingTasks()
client.cat.pendingTasks({ ... })
----
[discrete]
==== Arguments
* *Request (object):*
** *`local` (Optional, boolean)*: If `true`, the request computes the list of selected nodes from the
local cluster state. If `false` the list of selected nodes are computed
from the cluster state of the master node. In both cases the coordinating
node will send requests for further information to each selected node.
[discrete]
==== plugins
@ -2063,9 +2155,17 @@ IMPORTANT: cat APIs are only intended for human consumption using the command li
{ref}/cat-plugins.html[Endpoint documentation]
[source,ts]
----
client.cat.plugins()
client.cat.plugins({ ... })
----
[discrete]
==== Arguments
* *Request (object):*
** *`local` (Optional, boolean)*: If `true`, the request computes the list of selected nodes from the
local cluster state. If `false` the list of selected nodes are computed
from the cluster state of the master node. In both cases the coordinating
node will send requests for further information to each selected node.
[discrete]
==== recovery
@ -2122,6 +2222,10 @@ client.cat.segments({ ... })
Supports wildcards (`*`).
To target all data streams and indices, omit this parameter or use `*` or `_all`.
** *`bytes` (Optional, Enum("b" | "kb" | "mb" | "gb" | "tb" | "pb"))*: The unit used to display byte values.
** *`local` (Optional, boolean)*: If `true`, the request computes the list of selected nodes from the
local cluster state. If `false` the list of selected nodes are computed
from the cluster state of the master node. In both cases the coordinating
node will send requests for further information to each selected node.
[discrete]
==== shards
@ -2204,6 +2308,10 @@ client.cat.templates({ ... })
* *Request (object):*
** *`name` (Optional, string)*: The name of the template to return.
Accepts wildcard expressions. If omitted, all templates are returned.
** *`local` (Optional, boolean)*: If `true`, the request computes the list of selected nodes from the
local cluster state. If `false` the list of selected nodes are computed
from the cluster state of the master node. In both cases the coordinating
node will send requests for further information to each selected node.
[discrete]
==== thread_pool
@ -2224,6 +2332,10 @@ client.cat.threadPool({ ... })
** *`thread_pool_patterns` (Optional, string | string[])*: A list of thread pool names used to limit the request.
Accepts wildcard expressions.
** *`time` (Optional, Enum("nanos" | "micros" | "ms" | "s" | "m" | "h" | "d"))*: The unit used to display time values.
** *`local` (Optional, boolean)*: If `true`, the request computes the list of selected nodes from the
local cluster state. If `false` the list of selected nodes are computed
from the cluster state of the master node. In both cases the coordinating
node will send requests for further information to each selected node.
[discrete]
==== transforms
@ -3049,8 +3161,6 @@ client.connector.syncJobCheckIn()
[discrete]
==== sync_job_claim
Claims a connector sync job.
{ref}/claim-connector-sync-job-api.html[Endpoint documentation]
[source,ts]
----
client.connector.syncJobClaim()
@ -3871,7 +3981,6 @@ the indices stats API.
** *`ignore_unavailable` (Optional, boolean)*
** *`lenient` (Optional, boolean)*
** *`max_concurrent_shard_requests` (Optional, number)*
** *`min_compatible_shard_node` (Optional, string)*
** *`preference` (Optional, string)*
** *`pre_filter_shard_size` (Optional, number)*
** *`request_cache` (Optional, boolean)*
@ -4564,7 +4673,6 @@ If the request can target data streams, this argument determines whether wildcar
Supports a list of values, such as `open,hidden`.
Valid values are: `all`, `open`, `closed`, `hidden`, `none`.
** *`ignore_unavailable` (Optional, boolean)*: If `false`, requests that include a missing data stream or index in the target indices or data streams return an error.
** *`local` (Optional, boolean)*: If `true`, the request retrieves information from the local node only.
[discrete]
==== exists_index_template
@ -4762,7 +4870,6 @@ If the request can target data streams, this argument determines whether wildcar
Supports a list of values, such as `open,hidden`.
Valid values are: `all`, `open`, `closed`, `hidden`, `none`.
** *`ignore_unavailable` (Optional, boolean)*: If `false`, the request returns an error if it targets a missing or closed index.
** *`local` (Optional, boolean)*: If `true`, the request retrieves information from the local node only.
[discrete]
==== get_data_lifecycle
@ -5465,7 +5572,6 @@ If the request can target data streams, this argument determines whether wildcar
Supports a list of values, such as `open,hidden`.
Valid values are: `all`, `open`, `closed`, `hidden`, `none`.
** *`ignore_unavailable` (Optional, boolean)*: If `false`, the request returns an error if it targets a missing or closed index.
** *`verbose` (Optional, boolean)*: If `true`, the request returns a verbose response.
[discrete]
==== shard_stores
@ -5959,8 +6065,8 @@ client.ingest.putPipeline({ id })
** *`id` (string)*: ID of the ingest pipeline to create or update.
** *`_meta` (Optional, Record<string, User-defined value>)*: Optional metadata about the ingest pipeline. May have any contents. This map is not automatically generated by Elasticsearch.
** *`description` (Optional, string)*: Description of the ingest pipeline.
** *`on_failure` (Optional, { append, attachment, bytes, circle, community_id, convert, csv, date, date_index_name, dissect, dot_expander, drop, enrich, fail, fingerprint, foreach, geo_grid, geoip, grok, gsub, html_strip, inference, join, json, kv, lowercase, network_direction, pipeline, redact, registered_domain, remove, rename, reroute, script, set, set_security_user, sort, split, terminate, trim, uppercase, urldecode, uri_parts, user_agent }[])*: Processors to run immediately after a processor failure. Each processor supports a processor-level `on_failure` value. If a processor without an `on_failure` value fails, Elasticsearch uses this pipeline-level parameter as a fallback. The processors in this parameter run sequentially in the order specified. Elasticsearch will not attempt to run the pipeline's remaining processors.
** *`processors` (Optional, { append, attachment, bytes, circle, community_id, convert, csv, date, date_index_name, dissect, dot_expander, drop, enrich, fail, fingerprint, foreach, geo_grid, geoip, grok, gsub, html_strip, inference, join, json, kv, lowercase, network_direction, pipeline, redact, registered_domain, remove, rename, reroute, script, set, set_security_user, sort, split, terminate, trim, uppercase, urldecode, uri_parts, user_agent }[])*: Processors used to perform transformations on documents before indexing. Processors run sequentially in the order specified.
** *`on_failure` (Optional, { append, attachment, bytes, circle, community_id, convert, csv, date, date_index_name, dissect, dot_expander, drop, enrich, fail, fingerprint, foreach, ip_location, geo_grid, geoip, grok, gsub, html_strip, inference, join, json, kv, lowercase, network_direction, pipeline, redact, registered_domain, remove, rename, reroute, script, set, set_security_user, sort, split, terminate, trim, uppercase, urldecode, uri_parts, user_agent }[])*: Processors to run immediately after a processor failure. Each processor supports a processor-level `on_failure` value. If a processor without an `on_failure` value fails, Elasticsearch uses this pipeline-level parameter as a fallback. The processors in this parameter run sequentially in the order specified. Elasticsearch will not attempt to run the pipeline's remaining processors.
** *`processors` (Optional, { append, attachment, bytes, circle, community_id, convert, csv, date, date_index_name, dissect, dot_expander, drop, enrich, fail, fingerprint, foreach, ip_location, geo_grid, geoip, grok, gsub, html_strip, inference, join, json, kv, lowercase, network_direction, pipeline, redact, registered_domain, remove, rename, reroute, script, set, set_security_user, sort, split, terminate, trim, uppercase, urldecode, uri_parts, user_agent }[])*: Processors used to perform transformations on documents before indexing. Processors run sequentially in the order specified.
** *`version` (Optional, number)*: Version number used by external systems to track ingest pipelines. This parameter is intended for external systems only. Elasticsearch does not use or validate pipeline version numbers.
** *`deprecated` (Optional, boolean)*: Marks this ingest pipeline as deprecated.
When a deprecated ingest pipeline is referenced as the default or final pipeline when creating or updating a non-deprecated index template, Elasticsearch will emit a deprecation warning.
@ -9228,14 +9334,46 @@ client.security.createApiKey({ ... })
[discrete]
==== create_cross_cluster_api_key
Creates a cross-cluster API key for API key based remote cluster access.
Create a cross-cluster API key.
Create an API key of the `cross_cluster` type for the API key based remote cluster access.
A `cross_cluster` API key cannot be used to authenticate through the REST interface.
IMPORTANT: To authenticate this request you must use a credential that is not an API key. Even if you use an API key that has the required privilege, the API returns an error.
Cross-cluster API keys are created by the Elasticsearch API key service, which is automatically enabled.
NOTE: Unlike REST API keys, a cross-cluster API key does not capture permissions of the authenticated user. The API keys effective permission is exactly as specified with the `access` property.
A successful request returns a JSON structure that contains the API key, its unique ID, and its name. If applicable, it also returns expiration information for the API key in milliseconds.
By default, API keys never expire. You can specify expiration information when you create the API keys.
Cross-cluster API keys can only be updated with the update cross-cluster API key API.
Attempting to update them with the update REST API key API or the bulk update REST API keys API will result in an error.
{ref}/security-api-create-cross-cluster-api-key.html[Endpoint documentation]
[source,ts]
----
client.security.createCrossClusterApiKey()
client.security.createCrossClusterApiKey({ access, name })
----
[discrete]
==== Arguments
* *Request (object):*
** *`access` ({ replication, search })*: The access to be granted to this API key.
The access is composed of permissions for cross-cluster search and cross-cluster replication.
At least one of them must be specified.
NOTE: No explicit privileges should be specified for either search or replication access.
The creation process automatically converts the access specification to a role descriptor which has relevant privileges assigned accordingly.
** *`name` (string)*: Specifies the name for this API key.
** *`expiration` (Optional, string | -1 | 0)*: Expiration time for the API key.
By default, API keys never expire.
** *`metadata` (Optional, Record<string, User-defined value>)*: Arbitrary metadata that you want to associate with the API key.
It supports nested data structure.
Within the metadata object, keys beginning with `_` are reserved for system usage.
[discrete]
==== create_service_token
@ -10265,14 +10403,31 @@ client.security.updateApiKey({ id })
[discrete]
==== update_cross_cluster_api_key
Updates attributes of an existing cross-cluster API key.
Update a cross-cluster API key.
Update the attributes of an existing cross-cluster API key, which is used for API key based remote cluster access.
{ref}/security-api-update-cross-cluster-api-key.html[Endpoint documentation]
[source,ts]
----
client.security.updateCrossClusterApiKey()
client.security.updateCrossClusterApiKey({ id, access })
----
[discrete]
==== Arguments
* *Request (object):*
** *`id` (string)*: The ID of the cross-cluster API key to update.
** *`access` ({ replication, search })*: The access to be granted to this API key.
The access is composed of permissions for cross cluster search and cross cluster replication.
At least one of them must be specified.
When specified, the new access assignment fully replaces the previously assigned access.
** *`expiration` (Optional, string | -1 | 0)*: Expiration time for the API key.
By default, API keys never expire. This property can be omitted to leave the value unchanged.
** *`metadata` (Optional, Record<string, User-defined value>)*: Arbitrary metadata that you want to associate with the API key.
It supports nested data structure.
Within the metadata object, keys beginning with `_` are reserved for system usage.
When specified, this information fully replaces metadata previously associated with the API key.
[discrete]
==== update_settings

View File

@ -109,7 +109,7 @@ export default class AsyncSearch {
}
/**
* Get async search status. Retrieve the status of a previously submitted async search request given its identifier, without retrieving search results. If the Elasticsearch security features are enabled, use of this API is restricted to the `monitoring_user` role.
* Get the async search status. Get the status of a previously submitted async search request given its identifier, without retrieving search results. If the Elasticsearch security features are enabled, use of this API is restricted to the `monitoring_user` role.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/master/async-search.html | Elasticsearch API documentation}
*/
async status (this: That, params: T.AsyncSearchStatusRequest | TB.AsyncSearchStatusRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.AsyncSearchStatusResponse>

View File

@ -45,7 +45,7 @@ export default class Autoscaling {
}
/**
* Deletes an autoscaling policy. Designed for indirect use by ECE/ESS and ECK. Direct use is not supported.
* Delete an autoscaling policy. NOTE: This feature is designed for indirect use by Elasticsearch Service, Elastic Cloud Enterprise, and Elastic Cloud on Kubernetes. Direct use is not supported.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/master/autoscaling-delete-autoscaling-policy.html | Elasticsearch API documentation}
*/
async deleteAutoscalingPolicy (this: That, params: T.AutoscalingDeleteAutoscalingPolicyRequest | TB.AutoscalingDeleteAutoscalingPolicyRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.AutoscalingDeleteAutoscalingPolicyResponse>
@ -77,7 +77,7 @@ export default class Autoscaling {
}
/**
* Gets the current autoscaling capacity based on the configured autoscaling policy. Designed for indirect use by ECE/ESS and ECK. Direct use is not supported.
* Get the autoscaling capacity. NOTE: This feature is designed for indirect use by Elasticsearch Service, Elastic Cloud Enterprise, and Elastic Cloud on Kubernetes. Direct use is not supported. This API gets the current autoscaling capacity based on the configured autoscaling policy. It will return information to size the cluster appropriately to the current workload. The `required_capacity` is calculated as the maximum of the `required_capacity` result of all individual deciders that are enabled for the policy. The operator should verify that the `current_nodes` match the operators knowledge of the cluster to avoid making autoscaling decisions based on stale or incomplete information. The response contains decider-specific information you can use to diagnose how and why autoscaling determined a certain capacity was required. This information is provided for diagnosis only. Do not use this information to make autoscaling decisions.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/master/autoscaling-get-autoscaling-capacity.html | Elasticsearch API documentation}
*/
async getAutoscalingCapacity (this: That, params?: T.AutoscalingGetAutoscalingCapacityRequest | TB.AutoscalingGetAutoscalingCapacityRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.AutoscalingGetAutoscalingCapacityResponse>
@ -107,7 +107,7 @@ export default class Autoscaling {
}
/**
* Retrieves an autoscaling policy. Designed for indirect use by ECE/ESS and ECK. Direct use is not supported.
* Get an autoscaling policy. NOTE: This feature is designed for indirect use by Elasticsearch Service, Elastic Cloud Enterprise, and Elastic Cloud on Kubernetes. Direct use is not supported.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/master/autoscaling-get-autoscaling-capacity.html | Elasticsearch API documentation}
*/
async getAutoscalingPolicy (this: That, params: T.AutoscalingGetAutoscalingPolicyRequest | TB.AutoscalingGetAutoscalingPolicyRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.AutoscalingGetAutoscalingPolicyResponse>
@ -139,7 +139,7 @@ export default class Autoscaling {
}
/**
* Creates a new autoscaling policy. Designed for indirect use by ECE/ESS and ECK. Direct use is not supported.
* Create or update an autoscaling policy. NOTE: This feature is designed for indirect use by Elasticsearch Service, Elastic Cloud Enterprise, and Elastic Cloud on Kubernetes. Direct use is not supported.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/master/autoscaling-put-autoscaling-policy.html | Elasticsearch API documentation}
*/
async putAutoscalingPolicy (this: That, params: T.AutoscalingPutAutoscalingPolicyRequest | TB.AutoscalingPutAutoscalingPolicyRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.AutoscalingPutAutoscalingPolicyResponse>

View File

@ -39,7 +39,7 @@ import * as TB from '../typesWithBodyKey'
interface That { transport: Transport }
/**
* Clears the search context and results for a scrolling search.
* Clear a scrolling search. Clear the search context and results for a scrolling search.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/master/clear-scroll-api.html | Elasticsearch API documentation}
*/
export default async function ClearScrollApi (this: That, params?: T.ClearScrollRequest | TB.ClearScrollRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.ClearScrollResponse>

View File

@ -39,7 +39,7 @@ import * as TB from '../typesWithBodyKey'
interface That { transport: Transport }
/**
* Closes a point-in-time.
* Close a point in time. A point in time must be opened explicitly before being used in search requests. The `keep_alive` parameter tells Elasticsearch how long it should persist. A point in time is automatically closed when the `keep_alive` period has elapsed. However, keeping points in time has a cost; close them as soon as they are no longer required for search requests.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/master/point-in-time-api.html | Elasticsearch API documentation}
*/
export default async function ClosePointInTimeApi (this: That, params: T.ClosePointInTimeRequest | TB.ClosePointInTimeRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.ClosePointInTimeResponse>

View File

@ -39,7 +39,7 @@ import * as TB from '../typesWithBodyKey'
interface That { transport: Transport }
/**
* The field capabilities API returns the information about the capabilities of fields among multiple indices. The field capabilities API returns runtime fields like any other field. For example, a runtime field with a type of keyword is returned as any other field that belongs to the `keyword` family.
* Get the field capabilities. Get information about the capabilities of fields among multiple indices. For data streams, the API returns field capabilities among the streams 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 `keyword` family.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/master/search-field-caps.html | Elasticsearch API documentation}
*/
export default async function FieldCapsApi (this: That, params?: T.FieldCapsRequest | TB.FieldCapsRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.FieldCapsResponse>

View File

@ -39,7 +39,7 @@ import * as TB from '../typesWithBodyKey'
interface That { transport: Transport }
/**
* Performs a kNN search.
* Run a knn search. NOTE: The kNN search API has been replaced by the `knn` option in the search API. Perform a k-nearest neighbor (kNN) search on a dense_vector field and return the matching documents. Given a query vector, the API finds the k closest vectors and returns those documents as search hits. Elasticsearch uses the HNSW algorithm to support efficient kNN search. Like most kNN algorithms, HNSW is an approximate method that sacrifices result accuracy for improved search speed. This means the results returned are not always the true k closest neighbors. The kNN search API supports restricting the search using a filter. The search will return the top k documents that also match the filter query.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/master/search-search.html | Elasticsearch API documentation}
*/
export default async function KnnSearchApi<TDocument = unknown> (this: That, params: T.KnnSearchRequest | TB.KnnSearchRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.KnnSearchResponse<TDocument>>

View File

@ -39,7 +39,7 @@ import * as TB from '../typesWithBodyKey'
interface That { transport: Transport }
/**
* Runs multiple templated searches with a single request.
* Run multiple templated searches.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/master/search-multi-search.html | Elasticsearch API documentation}
*/
export default async function MsearchTemplateApi<TDocument = unknown, TAggregations = Record<T.AggregateName, T.AggregationsAggregate>> (this: That, params: T.MsearchTemplateRequest | TB.MsearchTemplateRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.MsearchTemplateResponse<TDocument, TAggregations>>

View File

@ -39,7 +39,7 @@ import * as TB from '../typesWithBodyKey'
interface That { transport: Transport }
/**
* A search request by default executes 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, its preferred to perform multiple search requests using the same point in time. For example, if refreshes happen between `search_after` 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.
* Open a point in time. 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, its preferred to perform multiple search requests using the same point in time. For example, if refreshes happen between `search_after` 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. A point in time must be opened explicitly before being used in search requests. The `keep_alive` parameter tells Elasticsearch how long it should persist.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/master/point-in-time-api.html | Elasticsearch API documentation}
*/
export default async function OpenPointInTimeApi (this: That, params: T.OpenPointInTimeRequest | TB.OpenPointInTimeRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.OpenPointInTimeResponse>

View File

@ -39,7 +39,7 @@ import * as TB from '../typesWithBodyKey'
interface That { transport: Transport }
/**
* Enables you to evaluate the quality of ranked search results over a set of typical search queries.
* Evaluate ranked search results. Evaluate the quality of ranked search results over a set of typical search queries.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/master/search-rank-eval.html | Elasticsearch API documentation}
*/
export default async function RankEvalApi (this: That, params: T.RankEvalRequest | TB.RankEvalRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.RankEvalResponse>

View File

@ -39,7 +39,7 @@ import * as TB from '../typesWithBodyKey'
interface That { transport: Transport }
/**
* Renders a search template as a search request body.
* Render a search template. Render a search template as a search request body.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/master/render-search-template-api.html | Elasticsearch API documentation}
*/
export default async function RenderSearchTemplateApi (this: That, params?: T.RenderSearchTemplateRequest | TB.RenderSearchTemplateRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.RenderSearchTemplateResponse>

View File

@ -39,7 +39,7 @@ import * as TB from '../typesWithBodyKey'
interface That { transport: Transport }
/**
* Returns search hits that match the query defined in the request. You can provide search queries using the `q` query string parameter or the request body. If both are specified, only the query parameter is used.
* Run a search. Get search hits that match the query defined in the request. You can provide search queries using the `q` query string parameter or the request body. If both are specified, only the query parameter is used.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/master/search-search.html | Elasticsearch API documentation}
*/
export default async function SearchApi<TDocument = unknown, TAggregations = Record<T.AggregateName, T.AggregationsAggregate>> (this: That, params?: T.SearchRequest | TB.SearchRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.SearchResponse<TDocument, TAggregations>>

View File

@ -39,7 +39,7 @@ import * as TB from '../typesWithBodyKey'
interface That { transport: Transport }
/**
* Search a vector tile. Searches a vector tile for geospatial values.
* Search a vector tile. Search a vector tile for geospatial values.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/master/search-vector-tile-api.html | Elasticsearch API documentation}
*/
export default async function SearchMvtApi (this: That, params: T.SearchMvtRequest | TB.SearchMvtRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.SearchMvtResponse>

View File

@ -39,7 +39,7 @@ import * as TB from '../typesWithBodyKey'
interface That { transport: Transport }
/**
* Returns information about the indices and shards that a search request would be executed against.
* Get the search shards. 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 indices section.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/master/search-shards.html | Elasticsearch API documentation}
*/
export default async function SearchShardsApi (this: That, params?: T.SearchShardsRequest | TB.SearchShardsRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.SearchShardsResponse>

View File

@ -39,7 +39,7 @@ import * as TB from '../typesWithBodyKey'
interface That { transport: Transport }
/**
* Runs a search with a search template.
* Run a search with a search template.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/master/search-template.html | Elasticsearch API documentation}
*/
export default async function SearchTemplateApi<TDocument = unknown> (this: That, params?: T.SearchTemplateRequest | TB.SearchTemplateRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.SearchTemplateResponse<TDocument>>

View File

@ -483,22 +483,34 @@ export default class Security {
}
/**
* Creates a cross-cluster API key for API key based remote cluster access.
* Create a cross-cluster API key. Create an API key of the `cross_cluster` type for the API key based remote cluster access. A `cross_cluster` API key cannot be used to authenticate through the REST interface. IMPORTANT: To authenticate this request you must use a credential that is not an API key. Even if you use an API key that has the required privilege, the API returns an error. Cross-cluster API keys are created by the Elasticsearch API key service, which is automatically enabled. NOTE: Unlike REST API keys, a cross-cluster API key does not capture permissions of the authenticated user. The API keys effective permission is exactly as specified with the `access` property. A successful request returns a JSON structure that contains the API key, its unique ID, and its name. If applicable, it also returns expiration information for the API key in milliseconds. By default, API keys never expire. You can specify expiration information when you create the API keys. Cross-cluster API keys can only be updated with the update cross-cluster API key API. Attempting to update them with the update REST API key API or the bulk update REST API keys API will result in an error.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/master/security-api-create-cross-cluster-api-key.html | Elasticsearch API documentation}
*/
async createCrossClusterApiKey (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithOutMeta): Promise<T.TODO>
async createCrossClusterApiKey (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.TODO, unknown>>
async createCrossClusterApiKey (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise<T.TODO>
async createCrossClusterApiKey (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise<any> {
async createCrossClusterApiKey (this: That, params: T.SecurityCreateCrossClusterApiKeyRequest | TB.SecurityCreateCrossClusterApiKeyRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.SecurityCreateCrossClusterApiKeyResponse>
async createCrossClusterApiKey (this: That, params: T.SecurityCreateCrossClusterApiKeyRequest | TB.SecurityCreateCrossClusterApiKeyRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.SecurityCreateCrossClusterApiKeyResponse, unknown>>
async createCrossClusterApiKey (this: That, params: T.SecurityCreateCrossClusterApiKeyRequest | TB.SecurityCreateCrossClusterApiKeyRequest, options?: TransportRequestOptions): Promise<T.SecurityCreateCrossClusterApiKeyResponse>
async createCrossClusterApiKey (this: That, params: T.SecurityCreateCrossClusterApiKeyRequest | TB.SecurityCreateCrossClusterApiKeyRequest, options?: TransportRequestOptions): Promise<any> {
const acceptedPath: string[] = []
const acceptedBody: string[] = ['access', 'expiration', 'metadata', 'name']
const querystring: Record<string, any> = {}
const body = undefined
// @ts-expect-error
const userBody: any = params?.body
let body: Record<string, any> | string
if (typeof userBody === 'string') {
body = userBody
} else {
body = userBody != null ? { ...userBody } : undefined
}
params = params ?? {}
for (const key in params) {
if (acceptedPath.includes(key)) {
if (acceptedBody.includes(key)) {
body = body ?? {}
// @ts-expect-error
body[key] = params[key]
} else if (acceptedPath.includes(key)) {
continue
} else if (key !== 'body') {
// @ts-expect-error
querystring[key] = params[key]
}
}
@ -2259,22 +2271,34 @@ export default class Security {
}
/**
* Updates attributes of an existing cross-cluster API key.
* Update a cross-cluster API key. Update the attributes of an existing cross-cluster API key, which is used for API key based remote cluster access.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/master/security-api-update-cross-cluster-api-key.html | Elasticsearch API documentation}
*/
async updateCrossClusterApiKey (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithOutMeta): Promise<T.TODO>
async updateCrossClusterApiKey (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.TODO, unknown>>
async updateCrossClusterApiKey (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise<T.TODO>
async updateCrossClusterApiKey (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise<any> {
async updateCrossClusterApiKey (this: That, params: T.SecurityUpdateCrossClusterApiKeyRequest | TB.SecurityUpdateCrossClusterApiKeyRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.SecurityUpdateCrossClusterApiKeyResponse>
async updateCrossClusterApiKey (this: That, params: T.SecurityUpdateCrossClusterApiKeyRequest | TB.SecurityUpdateCrossClusterApiKeyRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.SecurityUpdateCrossClusterApiKeyResponse, unknown>>
async updateCrossClusterApiKey (this: That, params: T.SecurityUpdateCrossClusterApiKeyRequest | TB.SecurityUpdateCrossClusterApiKeyRequest, options?: TransportRequestOptions): Promise<T.SecurityUpdateCrossClusterApiKeyResponse>
async updateCrossClusterApiKey (this: That, params: T.SecurityUpdateCrossClusterApiKeyRequest | TB.SecurityUpdateCrossClusterApiKeyRequest, options?: TransportRequestOptions): Promise<any> {
const acceptedPath: string[] = ['id']
const acceptedBody: string[] = ['access', 'expiration', 'metadata']
const querystring: Record<string, any> = {}
const body = undefined
// @ts-expect-error
const userBody: any = params?.body
let body: Record<string, any> | string
if (typeof userBody === 'string') {
body = userBody
} else {
body = userBody != null ? { ...userBody } : undefined
}
params = params ?? {}
for (const key in params) {
if (acceptedPath.includes(key)) {
if (acceptedBody.includes(key)) {
body = body ?? {}
// @ts-expect-error
body[key] = params[key]
} else if (acceptedPath.includes(key)) {
continue
} else if (key !== 'body') {
// @ts-expect-error
querystring[key] = params[key]
}
}

View File

@ -39,7 +39,7 @@ import * as TB from '../typesWithBodyKey'
interface That { transport: Transport }
/**
* Get term vector information. Returns information and statistics about terms in the fields of a particular document.
* Get term vector information. Get information and statistics about terms in the fields of a particular document.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-termvectors.html | Elasticsearch API documentation}
*/
export default async function TermvectorsApi<TDocument = unknown> (this: That, params: T.TermvectorsRequest<TDocument> | TB.TermvectorsRequest<TDocument>, options?: TransportRequestOptionsWithOutMeta): Promise<T.TermvectorsResponse>

View File

@ -1156,7 +1156,6 @@ export interface SearchRequest extends RequestBase {
include_named_queries_score?: boolean
lenient?: boolean
max_concurrent_shard_requests?: long
min_compatible_shard_node?: VersionString
preference?: string
pre_filter_shard_size?: long
request_cache?: boolean
@ -2636,6 +2635,7 @@ export interface RetrieverContainer {
knn?: KnnRetriever
rrf?: RRFRetriever
text_similarity_reranker?: TextSimilarityReranker
rule?: RuleRetriever
}
export type Routing = string
@ -2645,6 +2645,13 @@ export interface RrfRank {
rank_window_size?: long
}
export interface RuleRetriever extends RetrieverBase {
ruleset_ids: Id[]
match_criteria: any
retriever: RetrieverContainer
rank_window_size?: integer
}
export type ScalarValue = long | double | string | boolean | null
export interface ScoreSort {
@ -6684,7 +6691,6 @@ export interface AsyncSearchSubmitRequest extends RequestBase {
ignore_unavailable?: boolean
lenient?: boolean
max_concurrent_shard_requests?: long
min_compatible_shard_node?: VersionString
preference?: string
pre_filter_shard_size?: long
request_cache?: boolean
@ -6885,6 +6891,7 @@ export interface CatAllocationAllocationRecord {
export interface CatAllocationRequest extends CatCatRequestBase {
node_id?: NodeIds
bytes?: Bytes
local?: boolean
}
export type CatAllocationResponse = CatAllocationAllocationRecord[]
@ -6901,6 +6908,7 @@ export interface CatComponentTemplatesComponentTemplate {
export interface CatComponentTemplatesRequest extends CatCatRequestBase {
name?: string
local?: boolean
}
export type CatComponentTemplatesResponse = CatComponentTemplatesComponentTemplate[]
@ -7326,6 +7334,7 @@ export interface CatMasterMasterRecord {
}
export interface CatMasterRequest extends CatCatRequestBase {
local?: boolean
}
export type CatMasterResponse = CatMasterMasterRecord[]
@ -7693,6 +7702,7 @@ export interface CatNodeattrsNodeAttributesRecord {
}
export interface CatNodeattrsRequest extends CatCatRequestBase {
local?: boolean
}
export type CatNodeattrsResponse = CatNodeattrsNodeAttributesRecord[]
@ -7987,6 +7997,7 @@ export interface CatPendingTasksPendingTasksRecord {
}
export interface CatPendingTasksRequest extends CatCatRequestBase {
local?: boolean
}
export type CatPendingTasksResponse = CatPendingTasksPendingTasksRecord[]
@ -8006,6 +8017,7 @@ export interface CatPluginsPluginsRecord {
}
export interface CatPluginsRequest extends CatCatRequestBase {
local?: boolean
}
export type CatPluginsResponse = CatPluginsPluginsRecord[]
@ -8092,6 +8104,7 @@ export type CatRepositoriesResponse = CatRepositoriesRepositoriesRecord[]
export interface CatSegmentsRequest extends CatCatRequestBase {
index?: Indices
bytes?: Bytes
local?: boolean
}
export type CatSegmentsResponse = CatSegmentsSegmentsRecord[]
@ -8447,6 +8460,7 @@ export interface CatTasksTasksRecord {
export interface CatTemplatesRequest extends CatCatRequestBase {
name?: Name
local?: boolean
}
export type CatTemplatesResponse = CatTemplatesTemplatesRecord[]
@ -8468,6 +8482,7 @@ export interface CatTemplatesTemplatesRecord {
export interface CatThreadPoolRequest extends CatCatRequestBase {
thread_pool_patterns?: Names
time?: TimeUnit
local?: boolean
}
export type CatThreadPoolResponse = CatThreadPoolThreadPoolRecord[]
@ -10304,7 +10319,6 @@ export interface FleetSearchRequest extends RequestBase {
ignore_unavailable?: boolean
lenient?: boolean
max_concurrent_shard_requests?: long
min_compatible_shard_node?: VersionString
preference?: string
pre_filter_shard_size?: long
request_cache?: boolean
@ -11447,7 +11461,6 @@ export interface IndicesExistsAliasRequest extends RequestBase {
allow_no_indices?: boolean
expand_wildcards?: ExpandWildcards
ignore_unavailable?: boolean
local?: boolean
}
export type IndicesExistsAliasResponse = boolean
@ -11602,7 +11615,6 @@ export interface IndicesGetAliasRequest extends RequestBase {
allow_no_indices?: boolean
expand_wildcards?: ExpandWildcards
ignore_unavailable?: boolean
local?: boolean
}
export type IndicesGetAliasResponse = Record<IndexName, IndicesGetAliasIndexAliases>
@ -12090,7 +12102,6 @@ export interface IndicesSegmentsRequest extends RequestBase {
allow_no_indices?: boolean
expand_wildcards?: ExpandWildcards
ignore_unavailable?: boolean
verbose?: boolean
}
export interface IndicesSegmentsResponse {
@ -12787,6 +12798,16 @@ export interface IngestInferenceProcessor extends IngestProcessorBase {
inference_config?: IngestInferenceConfig
}
export interface IngestIpLocationProcessor extends IngestProcessorBase {
database_file?: string
field: Field
first_only?: boolean
ignore_missing?: boolean
properties?: string[]
target_field?: Field
download_database_on_pipeline_creation?: boolean
}
export interface IngestJoinProcessor extends IngestProcessorBase {
field: Field
separator: string
@ -12881,6 +12902,7 @@ export interface IngestProcessorContainer {
fail?: IngestFailProcessor
fingerprint?: IngestFingerprintProcessor
foreach?: IngestForeachProcessor
ip_location?: IngestIpLocationProcessor
geo_grid?: IngestGeoGridProcessor
geoip?: IngestGeoIpProcessor
grok?: IngestGrokProcessor
@ -17236,6 +17258,11 @@ export interface SearchableSnapshotsStatsResponse {
total: any
}
export interface SecurityAccess {
replication?: SecurityReplicationAccess[]
search?: SecuritySearchAccess[]
}
export interface SecurityApiKey {
creation?: long
expiration?: long
@ -17324,6 +17351,10 @@ export interface SecurityRemoteIndicesPrivileges {
allow_restricted_indices?: boolean
}
export interface SecurityReplicationAccess {
names: IndexName[]
}
export interface SecurityRoleDescriptor {
cluster?: SecurityClusterPrivilege[]
indices?: SecurityIndicesPrivileges[]
@ -17382,6 +17413,13 @@ export interface SecurityRoleTemplateScript {
options?: Record<string, string>
}
export interface SecuritySearchAccess {
field_security?: SecurityFieldSecurity
names: IndexName[]
query?: SecurityIndicesPrivilegesQuery
allow_restricted_indices?: boolean
}
export type SecurityTemplateFormat = 'string' | 'json'
export interface SecurityUser {
@ -17564,6 +17602,21 @@ export interface SecurityCreateApiKeyResponse {
encoded: string
}
export interface SecurityCreateCrossClusterApiKeyRequest extends RequestBase {
access: SecurityAccess
expiration?: Duration
metadata?: Metadata
name: Name
}
export interface SecurityCreateCrossClusterApiKeyResponse {
api_key: string
expiration?: DurationValue<UnitMillis>
id: Id
name: Name
encoded: string
}
export interface SecurityCreateServiceTokenRequest extends RequestBase {
namespace: Namespace
service: Service
@ -18242,6 +18295,17 @@ export interface SecurityUpdateApiKeyResponse {
updated: boolean
}
export interface SecurityUpdateCrossClusterApiKeyRequest extends RequestBase {
id: Id
access: SecurityAccess
expiration?: Duration
metadata?: Metadata
}
export interface SecurityUpdateCrossClusterApiKeyResponse {
updated: boolean
}
export interface SecurityUpdateUserProfileDataRequest extends RequestBase {
uid: SecurityUserProfileId
if_seq_no?: SequenceNumber
@ -20158,6 +20222,7 @@ export interface XpackInfoFeatures {
graph: XpackInfoFeature
ilm: XpackInfoFeature
logstash: XpackInfoFeature
logsdb: XpackInfoFeature
ml: XpackInfoFeature
monitoring: XpackInfoFeature
rollup: XpackInfoFeature
@ -20654,7 +20719,6 @@ export interface SpecUtilsCommonCatQueryParameters {
format?: string
h?: Names
help?: boolean
local?: boolean
master_timeout?: Duration
s?: Names
v?: boolean

View File

@ -1211,7 +1211,6 @@ export interface SearchRequest extends RequestBase {
include_named_queries_score?: boolean
lenient?: boolean
max_concurrent_shard_requests?: long
min_compatible_shard_node?: VersionString
preference?: string
pre_filter_shard_size?: long
request_cache?: boolean
@ -2712,6 +2711,7 @@ export interface RetrieverContainer {
knn?: KnnRetriever
rrf?: RRFRetriever
text_similarity_reranker?: TextSimilarityReranker
rule?: RuleRetriever
}
export type Routing = string
@ -2721,6 +2721,13 @@ export interface RrfRank {
rank_window_size?: long
}
export interface RuleRetriever extends RetrieverBase {
ruleset_ids: Id[]
match_criteria: any
retriever: RetrieverContainer
rank_window_size?: integer
}
export type ScalarValue = long | double | string | boolean | null
export interface ScoreSort {
@ -6760,7 +6767,6 @@ export interface AsyncSearchSubmitRequest extends RequestBase {
ignore_unavailable?: boolean
lenient?: boolean
max_concurrent_shard_requests?: long
min_compatible_shard_node?: VersionString
preference?: string
pre_filter_shard_size?: long
request_cache?: boolean
@ -6965,6 +6971,7 @@ export interface CatAllocationAllocationRecord {
export interface CatAllocationRequest extends CatCatRequestBase {
node_id?: NodeIds
bytes?: Bytes
local?: boolean
}
export type CatAllocationResponse = CatAllocationAllocationRecord[]
@ -6981,6 +6988,7 @@ export interface CatComponentTemplatesComponentTemplate {
export interface CatComponentTemplatesRequest extends CatCatRequestBase {
name?: string
local?: boolean
}
export type CatComponentTemplatesResponse = CatComponentTemplatesComponentTemplate[]
@ -7406,6 +7414,7 @@ export interface CatMasterMasterRecord {
}
export interface CatMasterRequest extends CatCatRequestBase {
local?: boolean
}
export type CatMasterResponse = CatMasterMasterRecord[]
@ -7773,6 +7782,7 @@ export interface CatNodeattrsNodeAttributesRecord {
}
export interface CatNodeattrsRequest extends CatCatRequestBase {
local?: boolean
}
export type CatNodeattrsResponse = CatNodeattrsNodeAttributesRecord[]
@ -8067,6 +8077,7 @@ export interface CatPendingTasksPendingTasksRecord {
}
export interface CatPendingTasksRequest extends CatCatRequestBase {
local?: boolean
}
export type CatPendingTasksResponse = CatPendingTasksPendingTasksRecord[]
@ -8086,6 +8097,7 @@ export interface CatPluginsPluginsRecord {
}
export interface CatPluginsRequest extends CatCatRequestBase {
local?: boolean
}
export type CatPluginsResponse = CatPluginsPluginsRecord[]
@ -8172,6 +8184,7 @@ export type CatRepositoriesResponse = CatRepositoriesRepositoriesRecord[]
export interface CatSegmentsRequest extends CatCatRequestBase {
index?: Indices
bytes?: Bytes
local?: boolean
}
export type CatSegmentsResponse = CatSegmentsSegmentsRecord[]
@ -8527,6 +8540,7 @@ export interface CatTasksTasksRecord {
export interface CatTemplatesRequest extends CatCatRequestBase {
name?: Name
local?: boolean
}
export type CatTemplatesResponse = CatTemplatesTemplatesRecord[]
@ -8548,6 +8562,7 @@ export interface CatTemplatesTemplatesRecord {
export interface CatThreadPoolRequest extends CatCatRequestBase {
thread_pool_patterns?: Names
time?: TimeUnit
local?: boolean
}
export type CatThreadPoolResponse = CatThreadPoolThreadPoolRecord[]
@ -10466,7 +10481,6 @@ export interface FleetSearchRequest extends RequestBase {
ignore_unavailable?: boolean
lenient?: boolean
max_concurrent_shard_requests?: long
min_compatible_shard_node?: VersionString
preference?: string
pre_filter_shard_size?: long
request_cache?: boolean
@ -11634,7 +11648,6 @@ export interface IndicesExistsAliasRequest extends RequestBase {
allow_no_indices?: boolean
expand_wildcards?: ExpandWildcards
ignore_unavailable?: boolean
local?: boolean
}
export type IndicesExistsAliasResponse = boolean
@ -11789,7 +11802,6 @@ export interface IndicesGetAliasRequest extends RequestBase {
allow_no_indices?: boolean
expand_wildcards?: ExpandWildcards
ignore_unavailable?: boolean
local?: boolean
}
export type IndicesGetAliasResponse = Record<IndexName, IndicesGetAliasIndexAliases>
@ -12297,7 +12309,6 @@ export interface IndicesSegmentsRequest extends RequestBase {
allow_no_indices?: boolean
expand_wildcards?: ExpandWildcards
ignore_unavailable?: boolean
verbose?: boolean
}
export interface IndicesSegmentsResponse {
@ -13013,6 +13024,16 @@ export interface IngestInferenceProcessor extends IngestProcessorBase {
inference_config?: IngestInferenceConfig
}
export interface IngestIpLocationProcessor extends IngestProcessorBase {
database_file?: string
field: Field
first_only?: boolean
ignore_missing?: boolean
properties?: string[]
target_field?: Field
download_database_on_pipeline_creation?: boolean
}
export interface IngestJoinProcessor extends IngestProcessorBase {
field: Field
separator: string
@ -13107,6 +13128,7 @@ export interface IngestProcessorContainer {
fail?: IngestFailProcessor
fingerprint?: IngestFingerprintProcessor
foreach?: IngestForeachProcessor
ip_location?: IngestIpLocationProcessor
geo_grid?: IngestGeoGridProcessor
geoip?: IngestGeoIpProcessor
grok?: IngestGrokProcessor
@ -17614,6 +17636,11 @@ export interface SearchableSnapshotsStatsResponse {
total: any
}
export interface SecurityAccess {
replication?: SecurityReplicationAccess[]
search?: SecuritySearchAccess[]
}
export interface SecurityApiKey {
creation?: long
expiration?: long
@ -17702,6 +17729,10 @@ export interface SecurityRemoteIndicesPrivileges {
allow_restricted_indices?: boolean
}
export interface SecurityReplicationAccess {
names: IndexName[]
}
export interface SecurityRoleDescriptor {
cluster?: SecurityClusterPrivilege[]
indices?: SecurityIndicesPrivileges[]
@ -17760,6 +17791,13 @@ export interface SecurityRoleTemplateScript {
options?: Record<string, string>
}
export interface SecuritySearchAccess {
field_security?: SecurityFieldSecurity
names: IndexName[]
query?: SecurityIndicesPrivilegesQuery
allow_restricted_indices?: boolean
}
export type SecurityTemplateFormat = 'string' | 'json'
export interface SecurityUser {
@ -17957,6 +17995,24 @@ export interface SecurityCreateApiKeyResponse {
encoded: string
}
export interface SecurityCreateCrossClusterApiKeyRequest extends RequestBase {
/** @deprecated The use of the 'body' key has been deprecated, move the nested keys to the top level object. */
body?: {
access: SecurityAccess
expiration?: Duration
metadata?: Metadata
name: Name
}
}
export interface SecurityCreateCrossClusterApiKeyResponse {
api_key: string
expiration?: DurationValue<UnitMillis>
id: Id
name: Name
encoded: string
}
export interface SecurityCreateServiceTokenRequest extends RequestBase {
namespace: Namespace
service: Service
@ -18694,6 +18750,20 @@ export interface SecurityUpdateApiKeyResponse {
updated: boolean
}
export interface SecurityUpdateCrossClusterApiKeyRequest extends RequestBase {
id: Id
/** @deprecated The use of the 'body' key has been deprecated, move the nested keys to the top level object. */
body?: {
access: SecurityAccess
expiration?: Duration
metadata?: Metadata
}
}
export interface SecurityUpdateCrossClusterApiKeyResponse {
updated: boolean
}
export interface SecurityUpdateUserProfileDataRequest extends RequestBase {
uid: SecurityUserProfileId
if_seq_no?: SequenceNumber
@ -20666,6 +20736,7 @@ export interface XpackInfoFeatures {
graph: XpackInfoFeature
ilm: XpackInfoFeature
logstash: XpackInfoFeature
logsdb: XpackInfoFeature
ml: XpackInfoFeature
monitoring: XpackInfoFeature
rollup: XpackInfoFeature
@ -21162,7 +21233,6 @@ export interface SpecUtilsCommonCatQueryParameters {
format?: string
h?: Names
help?: boolean
local?: boolean
master_timeout?: Duration
s?: Names
v?: boolean