Auto-generated API code (#2740)

This commit is contained in:
Elastic Machine
2025-04-14 19:52:54 +02:00
committed by GitHub
parent 931a80cacb
commit d9d54b1bb8
9 changed files with 391 additions and 200 deletions

View File

@ -1023,43 +1023,13 @@ client.info()
```
## client.knnSearch [_knn_search]
Run a knn search.
Performs 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.
A kNN search response has the exact same structure as a search API response.
However, certain sections have a meaning specific to kNN search:
* The document `_score` is determined by the similarity between the query and document vector.
* The `hits.total` object contains the total number of nearest neighbor candidates considered, which is `num_candidates * num_shards`. The `hits.total.relation` will always be `eq`, indicating an exact value.
[Endpoint documentation](https://www.elastic.co/guide/en/elasticsearch/reference/current/knn-search-api.html)
[Endpoint documentation](https://www.elastic.co/guide/en/elasticsearch/reference/master/search-search.html)
```ts
client.knnSearch({ index, knn })
client.knnSearch()
```
### Arguments [_arguments_knn_search]
#### Request (object) [_request_knn_search]
- **`index` (string | string[])**: A list of index names to search; use `_all` or to perform the operation on all indices.
- **`knn` ({ field, query_vector, k, num_candidates })**: The kNN query to run.
- **`_source` (Optional, boolean | { excludes, includes })**: Indicates which source fields are returned for matching documents. These fields are returned in the `hits._source` property of the search response.
- **`docvalue_fields` (Optional, { field, format, include_unmapped }[])**: The request returns doc values for field names matching these patterns in the `hits.fields` property of the response. It accepts wildcard (`*`) patterns.
- **`stored_fields` (Optional, string | string[])**: A 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`. You can pass `_source: true` to return both source fields and stored fields in the search response.
- **`fields` (Optional, string | string[])**: The request returns values for field names matching these patterns in the `hits.fields` property of the response. It accepts wildcard (`*`) patterns.
- **`filter` (Optional, { bool, boosting, common, combined_fields, constant_score, dis_max, distance_feature, exists, function_score, fuzzy, geo_bounding_box, geo_distance, geo_grid, 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 } | { bool, boosting, common, combined_fields, constant_score, dis_max, distance_feature, exists, function_score, fuzzy, geo_bounding_box, geo_distance, geo_grid, 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 }[])**: A query to filter the documents that can match. The kNN search will return the top `k` documents that also match this filter. The value can be a single query or a list of queries. If `filter` isn't provided, all documents are allowed to match.
- **`routing` (Optional, string)**: A list of specific routing values.
## client.mget [_mget]
Get multiple documents.
@ -1591,7 +1561,7 @@ The API uses several _contexts_, which control how scripts are run, what variabl
Each context requires a script, but additional parameters depend on the context you're using for that script.
[Endpoint documentation](https://www.elastic.co/guide/en/elasticsearch/painless/current/painless-execute-api.html)
[Endpoint documentation](https://www.elastic.co/docs/reference/scripting-languages/painless/painless-api-examples)
```ts
client.scriptsPainlessExecute({ ... })
@ -4418,7 +4388,7 @@ Update the connector draft filtering validation.
Update the draft filtering validation info for a connector.
[Endpoint documentation](https://www.elastic.co/guide/en/elasticsearch/reference/current/update-connector-filtering-validation-api.html)
[Endpoint documentation](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-connector-update-filtering-validation)
```ts
client.connector.updateFilteringValidation({ connector_id, validation })
@ -4466,7 +4436,7 @@ client.connector.updateName({ connector_id })
## client.connector.updateNative [_connector.update_native]
Update the connector is_native flag.
[Endpoint documentation](https://www.elastic.co/guide/en/elasticsearch/reference/current/update-connector-native-api.html)
[Endpoint documentation](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-connector-update-native)
```ts
client.connector.updateNative({ connector_id, is_native })
@ -4874,7 +4844,7 @@ Stop async ES|QL query.
This API interrupts the query execution and returns the results so far.
If the Elasticsearch security features are enabled, only the user who first submitted the ES|QL query can stop it.
[Endpoint documentation](https://www.elastic.co/guide/en/elasticsearch/reference/current/esql-async-query-stop-api.html)
[Endpoint documentation](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-esql-async-query-stop)
```ts
client.esql.asyncQueryStop({ id })
@ -4889,11 +4859,25 @@ A query ID is also provided when the request was submitted with the `keep_on_com
- **`drop_null_columns` (Optional, boolean)**: Indicates whether columns that are entirely `null` will be removed from the `columns` and `values` portion of the results.
If `true`, the response will include an extra section under the name `all_columns` which has the name of all the columns.
## client.esql.getQuery [_esql.get_query]
Executes a get ESQL query request
```ts
client.esql.getQuery()
```
## client.esql.listQueries [_esql.list_queries]
Executes a list ESQL queries request
```ts
client.esql.listQueries()
```
## client.esql.query [_esql.query]
Run an ES|QL query.
Get search results for an ES|QL (Elasticsearch query language) query.
[Endpoint documentation](https://www.elastic.co/guide/en/elasticsearch/reference/current/esql-rest.html)
[Endpoint documentation](https://www.elastic.co/docs/explore-analyze/query-filter/languages/esql-rest)
```ts
client.esql.query({ query })
@ -5031,9 +5015,9 @@ client.fleet.msearch({ ... })
- **`wait_for_checkpoints` (Optional, number[])**: A comma separated list of checkpoints. When configured, the search API will only be executed on a shard
after the relevant checkpoint has become visible for search. Defaults to an empty list which will cause
Elasticsearch to immediately execute the search.
- **`allow_partial_search_results` (Optional, boolean)**: If true, returns partial results if there are shard request timeouts or [shard failures](https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-replication.html#shard-failures). If false, returns
an error with no partial results. Defaults to the configured cluster setting `search.default_allow_partial_results`
which is true by default.
- **`allow_partial_search_results` (Optional, boolean)**: If true, returns partial results if there are shard request timeouts or shard failures.
If false, returns an error with no partial results.
Defaults to the configured cluster setting `search.default_allow_partial_results`, which is true by default.
## client.fleet.search [_fleet.search]
Run a Fleet search.
@ -5134,9 +5118,9 @@ the indices stats API.
- **`wait_for_checkpoints` (Optional, number[])**: A comma separated list of checkpoints. When configured, the search API will only be executed on a shard
after the relevant checkpoint has become visible for search. Defaults to an empty list which will cause
Elasticsearch to immediately execute the search.
- **`allow_partial_search_results` (Optional, boolean)**: If true, returns partial results if there are shard request timeouts or [shard failures](https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-replication.html#shard-failures). If false, returns
an error with no partial results. Defaults to the configured cluster setting `search.default_allow_partial_results`
which is true by default.
- **`allow_partial_search_results` (Optional, boolean)**: If true, returns partial results if there are shard request timeouts or shard failures.
If false, returns an error with no partial results.
Defaults to the configured cluster setting `search.default_allow_partial_results`, which is true by default.
## client.graph.explore [_graph.explore]
Explore graph analytics.
@ -5458,7 +5442,7 @@ Cancel a migration reindex operation.
Cancel a migration reindex attempt for a data stream or index.
[Endpoint documentation](https://www.elastic.co/guide/en/elasticsearch/reference/current/migrate-data-stream.html)
[Endpoint documentation](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-cancel-migrate-reindex)
```ts
client.indices.cancelMigrateReindex({ index })
@ -5687,7 +5671,7 @@ Create an index from a source index.
Copy the mappings and settings from the source index to a destination index while allowing request settings and mappings to override the source values.
[Endpoint documentation](https://www.elastic.co/guide/en/elasticsearch/reference/current/migrate-data-stream.html)
[Endpoint documentation](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-create-from)
```ts
client.indices.createFrom({ source, dest })
@ -6349,7 +6333,7 @@ Get the migration reindexing status.
Get the status of a migration reindex attempt for a data stream or index.
[Endpoint documentation](https://www.elastic.co/guide/en/elasticsearch/reference/current/migrate-data-stream.html)
[Endpoint documentation](https://www.elastic.co/docs/api/doc/elasticsearch/group/endpoint-migration)
```ts
client.indices.getMigrateReindexStatus({ index })
@ -6425,7 +6409,7 @@ Reindex all legacy backing indices for a data stream.
This operation occurs in a persistent task.
The persistent task ID is returned immediately and the reindexing work is completed in that task.
[Endpoint documentation](https://www.elastic.co/guide/en/elasticsearch/reference/current/migrate-data-stream.html)
[Endpoint documentation](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-migrate-reindex)
```ts
client.indices.migrateReindex({ ... })
@ -7553,6 +7537,40 @@ client.inference.get({ ... })
- **`task_type` (Optional, Enum("sparse_embedding" | "text_embedding" | "rerank" | "completion" | "chat_completion"))**: The task type
- **`inference_id` (Optional, string)**: The inference Id
## client.inference.inference [_inference.inference]
Perform inference on the service.
This API enables you to use machine learning models to perform specific tasks on data that you provide as an input.
It returns a response with the results of the tasks.
The inference endpoint you use can perform one specific task that has been defined when the endpoint was created with the create inference API.
For details about using this API with a service, such as Amazon Bedrock, Anthropic, or HuggingFace, refer to the service-specific documentation.
> info
> The inference APIs enable you to use certain services, such as built-in machine learning models (ELSER, E5), models uploaded through Eland, Cohere, OpenAI, Azure, Google AI Studio, Google Vertex AI, Anthropic, Watsonx.ai, or Hugging Face. For built-in models and models uploaded through Eland, the inference APIs offer an alternative way to use and manage trained models. However, if you do not plan to use the inference APIs to use these models or if you want to use non-NLP models, use the machine learning trained model APIs.
[Endpoint documentation](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-inference)
```ts
client.inference.inference({ inference_id, input })
```
### Arguments [_arguments_inference.inference]
#### Request (object) [_request_inference.inference]
- **`inference_id` (string)**: The unique identifier for the inference endpoint.
- **`input` (string | string[])**: The text on which you want to perform the inference task.
It can be a single string or an array.
> info
> Inference endpoints for the `completion` task type currently only support a single string as input.
- **`task_type` (Optional, Enum("sparse_embedding" | "text_embedding" | "rerank" | "completion" | "chat_completion"))**: The type of inference task that the model performs.
- **`query` (Optional, string)**: The query input, which is required only for the `rerank` task.
It is not required for other tasks.
- **`task_settings` (Optional, User-defined value)**: Task settings for the individual inference request.
These settings are specific to the task type you specified and override the task settings specified when initializing the service.
- **`timeout` (Optional, string | -1 | 0)**: The amount of time to wait for the inference request to complete.
## client.inference.put [_inference.put]
Create an inference endpoint.
When you create an inference endpoint, the associated machine learning model is automatically deployed if it is not already running.
@ -8231,7 +8249,7 @@ If no response is received before the timeout expires, the request fails and ret
Get GeoIP statistics.
Get download statistics for GeoIP2 databases that are used with the GeoIP processor.
[Endpoint documentation](https://www.elastic.co/guide/en/elasticsearch/reference/current/geoip-processor.html)
[Endpoint documentation](https://www.elastic.co/docs/reference/enrich-processor/geoip-processor)
```ts
client.ingest.geoIpStats()
@ -8303,7 +8321,7 @@ Extract structured fields out of a single text field within a document.
You must choose which field to extract matched fields from, as well as the grok pattern you expect will match.
A grok pattern is like a regular expression that supports aliased expressions that can be reused.
[Endpoint documentation](https://www.elastic.co/guide/en/elasticsearch/reference/current/grok-processor.html)
[Endpoint documentation](https://www.elastic.co/docs/reference/enrich-processor/grok-processor)
```ts
client.ingest.processorGrok()
@ -8357,7 +8375,7 @@ A value of `-1` indicates that the request should never time out.
Create or update a pipeline.
Changes made using this API take effect immediately.
[Endpoint documentation](https://www.elastic.co/guide/en/elasticsearch/reference/current/ingest.html)
[Endpoint documentation](https://www.elastic.co/docs/manage-data/ingest/transform-enrich/ingest-pipelines)
```ts
client.ingest.putPipeline({ id })
@ -10638,7 +10656,6 @@ client.nodes.getRepositoriesMeteringInfo({ node_id })
#### Request (object) [_request_nodes.get_repositories_metering_info]
- **`node_id` (string | string[])**: List of node IDs or names used to limit returned information.
All the nodes selective options are explained [here](https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster.html#cluster-nodes).
## client.nodes.hotThreads [_nodes.hot_threads]
Get the hot threads for nodes.

View File

@ -1667,7 +1667,7 @@ export default class Connector {
/**
* Update the connector draft filtering validation. Update the draft filtering validation info for a connector.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/master/update-connector-filtering-validation-api.html | Elasticsearch API documentation}
* @see {@link https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-connector-update-filtering-validation | Elasticsearch API documentation}
*/
async updateFilteringValidation (this: That, params: T.ConnectorUpdateFilteringValidationRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.ConnectorUpdateFilteringValidationResponse>
async updateFilteringValidation (this: That, params: T.ConnectorUpdateFilteringValidationRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.ConnectorUpdateFilteringValidationResponse, unknown>>
@ -1838,7 +1838,7 @@ export default class Connector {
/**
* Update the connector is_native flag.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/master/update-connector-native-api.html | Elasticsearch API documentation}
* @see {@link https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-connector-update-native | Elasticsearch API documentation}
*/
async updateNative (this: That, params: T.ConnectorUpdateNativeRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.ConnectorUpdateNativeResponse>
async updateNative (this: That, params: T.ConnectorUpdateNativeRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.ConnectorUpdateNativeResponse, unknown>>

View File

@ -85,6 +85,18 @@ export default class Esql {
'drop_null_columns'
]
},
'esql.get_query': {
path: [
'id'
],
body: [],
query: []
},
'esql.list_queries': {
path: [],
body: [],
query: []
},
'esql.query': {
path: [],
body: [
@ -253,7 +265,7 @@ export default class Esql {
/**
* Stop async ES|QL query. This API interrupts the query execution and returns the results so far. If the Elasticsearch security features are enabled, only the user who first submitted the ES|QL query can stop it.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/master/esql-async-query-stop-api.html | Elasticsearch API documentation}
* @see {@link https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-esql-async-query-stop | Elasticsearch API documentation}
*/
async asyncQueryStop (this: That, params: T.EsqlAsyncQueryStopRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.EsqlAsyncQueryStopResponse>
async asyncQueryStop (this: That, params: T.EsqlAsyncQueryStopRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.EsqlAsyncQueryStopResponse, unknown>>
@ -296,9 +308,94 @@ export default class Esql {
return await this.transport.request({ path, method, querystring, body, meta }, options)
}
/**
* Executes a get ESQL query request
*/
async getQuery (this: That, params?: T.TODO, options?: TransportRequestOptionsWithOutMeta): Promise<T.TODO>
async getQuery (this: That, params?: T.TODO, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.TODO, unknown>>
async getQuery (this: That, params?: T.TODO, options?: TransportRequestOptions): Promise<T.TODO>
async getQuery (this: That, params?: T.TODO, options?: TransportRequestOptions): Promise<any> {
const {
path: acceptedPath
} = this.acceptedParams['esql.get_query']
const userQuery = params?.querystring
const querystring: Record<string, any> = userQuery != null ? { ...userQuery } : {}
let body: Record<string, any> | string | undefined
const userBody = params?.body
if (userBody != null) {
if (typeof userBody === 'string') {
body = userBody
} else {
body = { ...userBody }
}
}
params = params ?? {}
for (const key in params) {
if (acceptedPath.includes(key)) {
continue
} else if (key !== 'body' && key !== 'querystring') {
querystring[key] = params[key]
}
}
const method = 'GET'
const path = `/_query/queries/${encodeURIComponent(params.id.toString())}`
const meta: TransportRequestMetadata = {
name: 'esql.get_query',
pathParts: {
id: params.id
}
}
return await this.transport.request({ path, method, querystring, body, meta }, options)
}
/**
* Executes a list ESQL queries request
*/
async listQueries (this: That, params?: T.TODO, options?: TransportRequestOptionsWithOutMeta): Promise<T.TODO>
async listQueries (this: That, params?: T.TODO, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.TODO, unknown>>
async listQueries (this: That, params?: T.TODO, options?: TransportRequestOptions): Promise<T.TODO>
async listQueries (this: That, params?: T.TODO, options?: TransportRequestOptions): Promise<any> {
const {
path: acceptedPath
} = this.acceptedParams['esql.list_queries']
const userQuery = params?.querystring
const querystring: Record<string, any> = userQuery != null ? { ...userQuery } : {}
let body: Record<string, any> | string | undefined
const userBody = params?.body
if (userBody != null) {
if (typeof userBody === 'string') {
body = userBody
} else {
body = { ...userBody }
}
}
params = params ?? {}
for (const key in params) {
if (acceptedPath.includes(key)) {
continue
} else if (key !== 'body' && key !== 'querystring') {
querystring[key] = params[key]
}
}
const method = 'GET'
const path = '/_query/queries'
const meta: TransportRequestMetadata = {
name: 'esql.list_queries'
}
return await this.transport.request({ path, method, querystring, body, meta }, options)
}
/**
* Run an ES|QL query. Get search results for an ES|QL (Elasticsearch query language) query.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/master/esql-rest.html | Elasticsearch API documentation}
* @see {@link https://www.elastic.co/docs/explore-analyze/query-filter/languages/esql-rest | Elasticsearch API documentation}
*/
async query (this: That, params: T.EsqlQueryRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.EsqlQueryResponse>
async query (this: That, params: T.EsqlQueryRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.EsqlQueryResponse, unknown>>

View File

@ -995,7 +995,7 @@ export default class Indices {
/**
* Cancel a migration reindex operation. Cancel a migration reindex attempt for a data stream or index.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/master/migrate-data-stream.html | Elasticsearch API documentation}
* @see {@link https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-cancel-migrate-reindex | Elasticsearch API documentation}
*/
async cancelMigrateReindex (this: That, params: T.IndicesCancelMigrateReindexRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.IndicesCancelMigrateReindexResponse>
async cancelMigrateReindex (this: That, params: T.IndicesCancelMigrateReindexRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.IndicesCancelMigrateReindexResponse, unknown>>
@ -1298,7 +1298,7 @@ export default class Indices {
/**
* Create an index from a source index. Copy the mappings and settings from the source index to a destination index while allowing request settings and mappings to override the source values.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/master/migrate-data-stream.html | Elasticsearch API documentation}
* @see {@link https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-create-from | Elasticsearch API documentation}
*/
async createFrom (this: That, params: T.IndicesCreateFromRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.IndicesCreateFromResponse>
async createFrom (this: That, params: T.IndicesCreateFromRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.IndicesCreateFromResponse, unknown>>
@ -2649,7 +2649,7 @@ export default class Indices {
/**
* Get the migration reindexing status. Get the status of a migration reindex attempt for a data stream or index.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/master/migrate-data-stream.html | Elasticsearch API documentation}
* @see {@link https://www.elastic.co/docs/api/doc/elasticsearch/group/endpoint-migration | Elasticsearch API documentation}
*/
async getMigrateReindexStatus (this: That, params: T.IndicesGetMigrateReindexStatusRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.IndicesGetMigrateReindexStatusResponse>
async getMigrateReindexStatus (this: That, params: T.IndicesGetMigrateReindexStatusRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.IndicesGetMigrateReindexStatusResponse, unknown>>
@ -2807,7 +2807,7 @@ export default class Indices {
/**
* Reindex legacy backing indices. Reindex all legacy backing indices for a data stream. This operation occurs in a persistent task. The persistent task ID is returned immediately and the reindexing work is completed in that task.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/master/migrate-data-stream.html | Elasticsearch API documentation}
* @see {@link https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-migrate-reindex | Elasticsearch API documentation}
*/
async migrateReindex (this: That, params: T.IndicesMigrateReindexRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.IndicesMigrateReindexResponse>
async migrateReindex (this: That, params: T.IndicesMigrateReindexRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.IndicesMigrateReindexResponse, unknown>>

View File

@ -77,6 +77,20 @@ export default class Inference {
body: [],
query: []
},
'inference.inference': {
path: [
'task_type',
'inference_id'
],
body: [
'query',
'input',
'task_settings'
],
query: [
'timeout'
]
},
'inference.put': {
path: [
'task_type',
@ -563,6 +577,71 @@ export default class Inference {
return await this.transport.request({ path, method, querystring, body, meta }, options)
}
/**
* Perform inference on the service. This API enables you to use machine learning models to perform specific tasks on data that you provide as an input. It returns a response with the results of the tasks. The inference endpoint you use can perform one specific task that has been defined when the endpoint was created with the create inference API. For details about using this API with a service, such as Amazon Bedrock, Anthropic, or HuggingFace, refer to the service-specific documentation. > info > The inference APIs enable you to use certain services, such as built-in machine learning models (ELSER, E5), models uploaded through Eland, Cohere, OpenAI, Azure, Google AI Studio, Google Vertex AI, Anthropic, Watsonx.ai, or Hugging Face. For built-in models and models uploaded through Eland, the inference APIs offer an alternative way to use and manage trained models. However, if you do not plan to use the inference APIs to use these models or if you want to use non-NLP models, use the machine learning trained model APIs.
* @see {@link https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-inference | Elasticsearch API documentation}
*/
async inference (this: That, params: T.InferenceInferenceRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.InferenceInferenceResponse>
async inference (this: That, params: T.InferenceInferenceRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.InferenceInferenceResponse, unknown>>
async inference (this: That, params: T.InferenceInferenceRequest, options?: TransportRequestOptions): Promise<T.InferenceInferenceResponse>
async inference (this: That, params: T.InferenceInferenceRequest, options?: TransportRequestOptions): Promise<any> {
const {
path: acceptedPath,
body: acceptedBody,
query: acceptedQuery
} = this.acceptedParams['inference.inference']
const userQuery = params?.querystring
const querystring: Record<string, any> = userQuery != null ? { ...userQuery } : {}
let body: Record<string, any> | string | undefined
const userBody = params?.body
if (userBody != null) {
if (typeof userBody === 'string') {
body = userBody
} else {
body = { ...userBody }
}
}
for (const key in params) {
if (acceptedBody.includes(key)) {
body = body ?? {}
// @ts-expect-error
body[key] = params[key]
} else if (acceptedPath.includes(key)) {
continue
} else if (key !== 'body' && key !== 'querystring') {
if (acceptedQuery.includes(key) || commonQueryParams.includes(key)) {
// @ts-expect-error
querystring[key] = params[key]
} else {
body = body ?? {}
// @ts-expect-error
body[key] = params[key]
}
}
}
let method = ''
let path = ''
if (params.task_type != null && params.inference_id != null) {
method = 'POST'
path = `/_inference/${encodeURIComponent(params.task_type.toString())}/${encodeURIComponent(params.inference_id.toString())}`
} else {
method = 'POST'
path = `/_inference/${encodeURIComponent(params.inference_id.toString())}`
}
const meta: TransportRequestMetadata = {
name: 'inference.inference',
pathParts: {
task_type: params.task_type,
inference_id: params.inference_id
}
}
return await this.transport.request({ path, method, querystring, body, meta }, options)
}
/**
* Create an inference endpoint. When you create an inference endpoint, the associated machine learning model is automatically deployed if it is not already running. After creating the endpoint, wait for the model deployment to complete before using it. To verify the deployment status, use the get trained model statistics API. Look for `"state": "fully_allocated"` in the response and ensure that the `"allocation_count"` matches the `"target_allocation_count"`. Avoid creating multiple endpoints for the same model unless required, as each endpoint consumes significant resources. IMPORTANT: The inference APIs enable you to use certain services, such as built-in machine learning models (ELSER, E5), models uploaded through Eland, Cohere, OpenAI, Mistral, Azure OpenAI, Google AI Studio, Google Vertex AI, Anthropic, Watsonx.ai, or Hugging Face. For built-in models and models uploaded through Eland, the inference APIs offer an alternative way to use and manage trained models. However, if you do not plan to use the inference APIs to use these models or if you want to use non-NLP models, use the machine learning trained model APIs.
* @see {@link https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-put | Elasticsearch API documentation}

View File

@ -296,7 +296,7 @@ export default class Ingest {
/**
* Get GeoIP statistics. Get download statistics for GeoIP2 databases that are used with the GeoIP processor.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/master/geoip-processor.html | Elasticsearch API documentation}
* @see {@link https://www.elastic.co/docs/reference/enrich-processor/geoip-processor | Elasticsearch API documentation}
*/
async geoIpStats (this: That, params?: T.IngestGeoIpStatsRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.IngestGeoIpStatsResponse>
async geoIpStats (this: That, params?: T.IngestGeoIpStatsRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.IngestGeoIpStatsResponse, unknown>>
@ -498,7 +498,7 @@ export default class Ingest {
/**
* Run a grok processor. Extract structured fields out of a single text field within a document. You must choose which field to extract matched fields from, as well as the grok pattern you expect will match. A grok pattern is like a regular expression that supports aliased expressions that can be reused.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/master/grok-processor.html | Elasticsearch API documentation}
* @see {@link https://www.elastic.co/docs/reference/enrich-processor/grok-processor | Elasticsearch API documentation}
*/
async processorGrok (this: That, params?: T.IngestProcessorGrokRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.IngestProcessorGrokResponse>
async processorGrok (this: That, params?: T.IngestProcessorGrokRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.IngestProcessorGrokResponse, unknown>>
@ -645,7 +645,7 @@ export default class Ingest {
/**
* Create or update a pipeline. Changes made using this API take effect immediately.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/master/ingest.html | Elasticsearch API documentation}
* @see {@link https://www.elastic.co/docs/manage-data/ingest/transform-enrich/ingest-pipelines | Elasticsearch API documentation}
*/
async putPipeline (this: That, params: T.IngestPutPipelineRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.IngestPutPipelineResponse>
async putPipeline (this: That, params: T.IngestPutPipelineRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.IngestPutPipelineResponse, unknown>>

View File

@ -26,39 +26,26 @@ interface That {
transport: Transport
}
const commonQueryParams = ['error_trace', 'filter_path', 'human', 'pretty']
const acceptedParams: Record<string, { path: string[], body: string[], query: string[] }> = {
knn_search: {
path: [
'index'
],
body: [
'_source',
'docvalue_fields',
'stored_fields',
'fields',
'filter',
'knn'
],
query: [
'routing'
]
body: [],
query: []
}
}
/**
* 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. A kNN search response has the exact same structure as a search API response. However, certain sections have a meaning specific to kNN search: * The document `_score` is determined by the similarity between the query and document vector. * The `hits.total` object contains the total number of nearest neighbor candidates considered, which is `num_candidates * num_shards`. The `hits.total.relation` will always be `eq`, indicating an exact value.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/master/knn-search-api.html | Elasticsearch API documentation}
* Performs a kNN search.
* @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, options?: TransportRequestOptionsWithOutMeta): Promise<T.KnnSearchResponse<TDocument>>
export default async function KnnSearchApi<TDocument = unknown> (this: That, params: T.KnnSearchRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.KnnSearchResponse<TDocument>, unknown>>
export default async function KnnSearchApi<TDocument = unknown> (this: That, params: T.KnnSearchRequest, options?: TransportRequestOptions): Promise<T.KnnSearchResponse<TDocument>>
export default async function KnnSearchApi<TDocument = unknown> (this: That, params: T.KnnSearchRequest, options?: TransportRequestOptions): Promise<any> {
export default async function KnnSearchApi (this: That, params?: T.TODO, options?: TransportRequestOptionsWithOutMeta): Promise<T.TODO>
export default async function KnnSearchApi (this: That, params?: T.TODO, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.TODO, unknown>>
export default async function KnnSearchApi (this: That, params?: T.TODO, options?: TransportRequestOptions): Promise<T.TODO>
export default async function KnnSearchApi (this: That, params?: T.TODO, options?: TransportRequestOptions): Promise<any> {
const {
path: acceptedPath,
body: acceptedBody,
query: acceptedQuery
path: acceptedPath
} = acceptedParams.knn_search
const userQuery = params?.querystring
@ -74,22 +61,12 @@ export default async function KnnSearchApi<TDocument = unknown> (this: That, par
}
}
params = params ?? {}
for (const key in params) {
if (acceptedBody.includes(key)) {
body = body ?? {}
// @ts-expect-error
body[key] = params[key]
} else if (acceptedPath.includes(key)) {
if (acceptedPath.includes(key)) {
continue
} else if (key !== 'body' && key !== 'querystring') {
if (acceptedQuery.includes(key) || commonQueryParams.includes(key)) {
// @ts-expect-error
querystring[key] = params[key]
} else {
body = body ?? {}
// @ts-expect-error
body[key] = params[key]
}
querystring[key] = params[key]
}
}

View File

@ -42,7 +42,7 @@ const acceptedParams: Record<string, { path: string[], body: string[], query: st
/**
* Run a script. 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. The API uses several _contexts_, which control how scripts are run, what variables are available at runtime, and what the return type is. Each context requires a script, but additional parameters depend on the context you're using for that script.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/painless/master/painless-execute-api.html | Elasticsearch API documentation}
* @see {@link https://www.elastic.co/docs/reference/scripting-languages/painless/painless-api-examples | Elasticsearch API documentation}
*/
export default async function ScriptsPainlessExecuteApi<TResult = unknown> (this: That, params?: T.ScriptsPainlessExecuteRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.ScriptsPainlessExecuteResponse<TResult>>
export default async function ScriptsPainlessExecuteApi<TResult = unknown> (this: That, params?: T.ScriptsPainlessExecuteRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.ScriptsPainlessExecuteResponse<TResult>, unknown>>

View File

@ -1233,69 +1233,6 @@ export interface InfoResponse {
version: ElasticsearchVersionInfo
}
export interface KnnSearchRequest extends RequestBase {
/** A comma-separated list of index names to search;
* use `_all` or to perform the operation on all indices. */
index: Indices
/** A comma-separated list of specific routing values. */
routing?: Routing
/** Indicates which source fields are returned for matching documents. These
* fields are returned in the `hits._source` property of the search response. */
_source?: SearchSourceConfig
/** The request returns doc values for field names matching these patterns
* in the `hits.fields` property of the response.
* It accepts wildcard (`*`) patterns. */
docvalue_fields?: (QueryDslFieldAndFormat | Field)[]
/** A 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`. You can pass `_source: true` to return both source fields
* and stored fields in the search response. */
stored_fields?: Fields
/** The request returns values for field names matching these patterns
* in the `hits.fields` property of the response.
* It accepts wildcard (`*`) patterns. */
fields?: Fields
/** A query to filter the documents that can match. The kNN search will return the top
* `k` documents that also match this filter. The value can be a single query or a
* list of queries. If `filter` isn't provided, all documents are allowed to match. */
filter?: QueryDslQueryContainer | QueryDslQueryContainer[]
/** The kNN query to run. */
knn: KnnSearchQuery
/** All values in `body` will be added to the request body. */
body?: string | { [key: string]: any } & { index?: never, routing?: never, _source?: never, docvalue_fields?: never, stored_fields?: never, fields?: never, filter?: never, knn?: never }
/** All values in `querystring` will be added to the request querystring. */
querystring?: { [key: string]: any } & { index?: never, routing?: never, _source?: never, docvalue_fields?: never, stored_fields?: never, fields?: never, filter?: never, knn?: never }
}
export interface KnnSearchResponse<TDocument = unknown> {
/** The milliseconds it took Elasticsearch to run the request. */
took: long
/** If true, the request timed out before completion;
* returned results may be partial or empty. */
timed_out: boolean
/** A count of shards used for the request. */
_shards: ShardStatistics
/** The returned documents and metadata. */
hits: SearchHitsMetadata<TDocument>
/** The field values for the documents. These fields
* must be specified in the request using the `fields` parameter. */
fields?: Record<string, any>
/** The highest returned document score. This value is null for requests
* that do not sort by score. */
max_score?: double
}
export interface KnnSearchQuery {
/** The name of the vector field to search against */
field: Field
/** The query vector */
query_vector: QueryVector
/** The final number of nearest neighbors to return as top hits */
k: integer
/** The number of nearest neighbor candidates to consider per shard */
num_candidates: integer
}
export interface MgetMultiGetError {
error: ErrorCause
_id: Id
@ -3946,8 +3883,6 @@ export interface ErrorResponseBase {
status: integer
}
export type EsqlResult = ArrayBuffer
export type ExpandWildcard = 'all' | 'open' | 'closed' | 'hidden' | 'none'
export type ExpandWildcards = ExpandWildcard | ExpandWildcard[]
@ -5022,15 +4957,13 @@ export interface AggregationsAggregationContainer {
variable_width_histogram?: AggregationsVariableWidthHistogramAggregation
}
export type AggregationsAggregationRange = AggregationsUntypedAggregationRange | AggregationsDateAggregationRange | AggregationsNumberAggregationRange | AggregationsTermAggregationRange
export interface AggregationsAggregationRangeBase<T = unknown> {
export interface AggregationsAggregationRange {
/** Start of the range (inclusive). */
from?: T
from?: double | null
/** Custom key to return the range with. */
key?: string
/** End of the range (exclusive). */
to?: T
to?: double | null
}
export interface AggregationsArrayPercentilesItem {
@ -5221,8 +5154,8 @@ export interface AggregationsCategorizeTextAggregation {
* use the categorization_analyzer property instead and include the filters as pattern_replace character filters. */
categorization_filters?: string[]
/** The categorization analyzer specifies how the text is analyzed and tokenized before being categorized.
* The syntax is very similar to that used to define the analyzer in the [Analyze endpoint](https://www.elastic.co/guide/en/elasticsearch/reference/8.0/indices-analyze.html). This property
* cannot be used at the same time as categorization_filters. */
* The syntax is very similar to that used to define the analyzer in the analyze API. This property
* cannot be used at the same time as `categorization_filters`. */
categorization_analyzer?: AggregationsCategorizeTextAnalyzer
/** The number of categorization buckets to return from each shard before merging all the results. */
shard_size?: integer
@ -5336,9 +5269,6 @@ export interface AggregationsCustomCategorizeTextAnalyzer {
filter?: string[]
}
export interface AggregationsDateAggregationRange extends AggregationsAggregationRangeBase<AggregationsFieldDateMath> {
}
export interface AggregationsDateHistogramAggregate extends AggregationsMultiBucketAggregateBase<AggregationsDateHistogramBucket> {
}
@ -5396,13 +5326,22 @@ export interface AggregationsDateRangeAggregation extends AggregationsBucketAggr
* By default, documents without a value are ignored. */
missing?: AggregationsMissing
/** Array of date ranges. */
ranges?: AggregationsDateAggregationRange[]
ranges?: AggregationsDateRangeExpression[]
/** Time zone used to convert dates from another time zone to UTC. */
time_zone?: TimeZone
/** Set to `true` to associate a unique string key with each bucket and returns the ranges as a hash rather than an array. */
keyed?: boolean
}
export interface AggregationsDateRangeExpression {
/** Start of the range (inclusive). */
from?: AggregationsFieldDateMath
/** Custom key to return the range with. */
key?: string
/** End of the range (exclusive). */
to?: AggregationsFieldDateMath
}
export interface AggregationsDerivativeAggregate extends AggregationsSingleMetricAggregateBase {
normalized_value?: double
normalized_value_as_string?: string
@ -6079,9 +6018,6 @@ export interface AggregationsNormalizeAggregation extends AggregationsPipelineAg
export type AggregationsNormalizeMethod = 'rescale_0_1' | 'rescale_0_100' | 'percent_of_sum' | 'mean' | 'z-score' | 'softmax'
export interface AggregationsNumberAggregationRange extends AggregationsAggregationRangeBase<double> {
}
export interface AggregationsParentAggregateKeys extends AggregationsSingleBucketAggregateBase {
}
export type AggregationsParentAggregate = AggregationsParentAggregateKeys
@ -6502,9 +6438,6 @@ export interface AggregationsTTestAggregation {
export type AggregationsTTestType = 'paired' | 'homoscedastic' | 'heteroscedastic'
export interface AggregationsTermAggregationRange extends AggregationsAggregationRangeBase<string> {
}
export interface AggregationsTermsAggregateBase<TBucket = unknown> extends AggregationsMultiBucketAggregateBase<TBucket> {
doc_count_error_upper_bound?: long
sum_other_doc_count?: long
@ -6664,9 +6597,6 @@ export interface AggregationsUnmappedSignificantTermsAggregate extends Aggregati
export interface AggregationsUnmappedTermsAggregate extends AggregationsTermsAggregateBase<void> {
}
export interface AggregationsUntypedAggregationRange extends AggregationsAggregationRangeBase<any> {
}
export interface AggregationsValueCountAggregate extends AggregationsSingleMetricAggregateBase {
}
@ -17340,8 +17270,66 @@ export type EqlSearchResponse<TEvent = unknown> = EqlEqlSearchResponseBase<TEven
export type EqlSearchResultPosition = 'tail' | 'head'
export interface EsqlAsyncEsqlResult extends EsqlEsqlResult {
id?: string
is_running: boolean
}
export interface EsqlEsqlClusterDetails {
status: EsqlEsqlClusterStatus
indices: string
took?: DurationValue<UnitMillis>
_shards?: EsqlEsqlShardInfo
}
export interface EsqlEsqlClusterInfo {
total: integer
successful: integer
running: integer
skipped: integer
partial: integer
failed: integer
details: Record<string, EsqlEsqlClusterDetails>
}
export type EsqlEsqlClusterStatus = 'running' | 'successful' | 'partial' | 'skipped' | 'failed'
export interface EsqlEsqlColumnInfo {
name: string
type: string
}
export type EsqlEsqlFormat = 'csv' | 'json' | 'tsv' | 'txt' | 'yaml' | 'cbor' | 'smile' | 'arrow'
export interface EsqlEsqlResult {
took?: DurationValue<UnitMillis>
is_partial?: boolean
all_columns?: EsqlEsqlColumnInfo[]
columns: EsqlEsqlColumnInfo[]
values: FieldValue[][]
/** Cross-cluster search information. Present if `include_ccs_metadata` was `true` in the request
* and a cross-cluster search was performed. */
_clusters?: EsqlEsqlClusterInfo
/** Profiling information. Present if `profile` was `true` in the request.
* The contents of this field are currently unstable. */
profile?: any
}
export interface EsqlEsqlShardFailure {
shard: Id
index: IndexName
node?: NodeId
reason: ErrorCause
}
export interface EsqlEsqlShardInfo {
total: integer
successful?: integer
skipped?: integer
failed?: integer
failures?: EsqlEsqlShardFailure[]
}
export interface EsqlTableValuesContainer {
integer?: EsqlTableValuesIntegerValue[]
keyword?: EsqlTableValuesKeywordValue[]
@ -17408,7 +17396,7 @@ export interface EsqlAsyncQueryRequest extends RequestBase {
querystring?: { [key: string]: any } & { allow_partial_results?: never, delimiter?: never, drop_null_columns?: never, format?: never, keep_alive?: never, keep_on_completion?: never, columnar?: never, filter?: never, locale?: never, params?: never, profile?: never, query?: never, tables?: never, include_ccs_metadata?: never, wait_for_completion_timeout?: never }
}
export type EsqlAsyncQueryResponse = EsqlResult
export type EsqlAsyncQueryResponse = EsqlAsyncEsqlResult
export interface EsqlAsyncQueryDeleteRequest extends RequestBase {
/** The unique identifier of the query.
@ -17445,7 +17433,7 @@ export interface EsqlAsyncQueryGetRequest extends RequestBase {
querystring?: { [key: string]: any } & { id?: never, drop_null_columns?: never, keep_alive?: never, wait_for_completion_timeout?: never }
}
export type EsqlAsyncQueryGetResponse = EsqlResult
export type EsqlAsyncQueryGetResponse = EsqlAsyncEsqlResult
export interface EsqlAsyncQueryStopRequest extends RequestBase {
/** The unique identifier of the query.
@ -17461,7 +17449,7 @@ export interface EsqlAsyncQueryStopRequest extends RequestBase {
querystring?: { [key: string]: any } & { id?: never, drop_null_columns?: never }
}
export type EsqlAsyncQueryStopResponse = EsqlResult
export type EsqlAsyncQueryStopResponse = EsqlEsqlResult
export interface EsqlQueryRequest extends RequestBase {
/** A short version of the Accept header, e.g. json, yaml. */
@ -17500,7 +17488,7 @@ export interface EsqlQueryRequest extends RequestBase {
querystring?: { [key: string]: any } & { format?: never, delimiter?: never, drop_null_columns?: never, allow_partial_results?: never, columnar?: never, filter?: never, locale?: never, params?: never, profile?: never, query?: never, tables?: never, include_ccs_metadata?: never }
}
export type EsqlQueryResponse = EsqlResult
export type EsqlQueryResponse = EsqlEsqlResult
export interface FeaturesFeature {
name: string
@ -17590,9 +17578,9 @@ export interface FleetMsearchRequest extends RequestBase {
* after the relevant checkpoint has become visible for search. Defaults to an empty list which will cause
* Elasticsearch to immediately execute the search. */
wait_for_checkpoints?: FleetCheckpoint[]
/** If true, returns partial results if there are shard request timeouts or [shard failures](https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-replication.html#shard-failures). If false, returns
* an error with no partial results. Defaults to the configured cluster setting `search.default_allow_partial_results`
* which is true by default. */
/** If true, returns partial results if there are shard request timeouts or shard failures.
* If false, returns an error with no partial results.
* Defaults to the configured cluster setting `search.default_allow_partial_results`, which is true by default. */
allow_partial_search_results?: boolean
searches?: MsearchRequestItem[]
/** All values in `body` will be added to the request body. */
@ -17641,9 +17629,9 @@ export interface FleetSearchRequest extends RequestBase {
* after the relevant checkpoint has become visible for search. Defaults to an empty list which will cause
* Elasticsearch to immediately execute the search. */
wait_for_checkpoints?: FleetCheckpoint[]
/** If true, returns partial results if there are shard request timeouts or [shard failures](https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-replication.html#shard-failures). If false, returns
* an error with no partial results. Defaults to the configured cluster setting `search.default_allow_partial_results`
* which is true by default. */
/** If true, returns partial results if there are shard request timeouts or shard failures.
* If false, returns an error with no partial results.
* Defaults to the configured cluster setting `search.default_allow_partial_results`, which is true by default. */
allow_partial_search_results?: boolean
aggregations?: Record<string, AggregationsAggregationContainer>
/** @alias aggregations */
@ -21829,6 +21817,15 @@ export interface InferenceInferenceEndpointInfo extends InferenceInferenceEndpoi
task_type: InferenceTaskType
}
export interface InferenceInferenceResult {
text_embedding_bytes?: InferenceTextEmbeddingByteResult[]
text_embedding_bits?: InferenceTextEmbeddingByteResult[]
text_embedding?: InferenceTextEmbeddingResult[]
sparse_embedding?: InferenceSparseEmbeddingResult[]
completion?: InferenceCompletionResult[]
rerank?: InferenceRankedDocument[]
}
export interface InferenceJinaAIServiceSettings {
/** A valid API key of your JinaAI account.
*
@ -22163,6 +22160,33 @@ export interface InferenceGetResponse {
endpoints: InferenceInferenceEndpointInfo[]
}
export interface InferenceInferenceRequest extends RequestBase {
/** The type of inference task that the model performs. */
task_type?: InferenceTaskType
/** The unique identifier for the inference endpoint. */
inference_id: Id
/** The amount of time to wait for the inference request to complete. */
timeout?: Duration
/** The query input, which is required only for the `rerank` task.
* It is not required for other tasks. */
query?: string
/** The text on which you want to perform the inference task.
* It can be a single string or an array.
*
* > info
* > Inference endpoints for the `completion` task type currently only support a single string as input. */
input: string | string[]
/** Task settings for the individual inference request.
* These settings are specific to the task type you specified and override the task settings specified when initializing the service. */
task_settings?: InferenceTaskSettings
/** All values in `body` will be added to the request body. */
body?: string | { [key: string]: any } & { task_type?: never, inference_id?: never, timeout?: never, query?: never, input?: never, task_settings?: never }
/** All values in `querystring` will be added to the request querystring. */
querystring?: { [key: string]: any } & { task_type?: never, inference_id?: never, timeout?: never, query?: never, input?: never, task_settings?: never }
}
export type InferenceInferenceResponse = InferenceInferenceResult
export interface InferencePutRequest extends RequestBase {
/** The task type */
task_type?: InferenceTaskType
@ -24029,9 +24053,7 @@ export interface LogstashPipelineSettings {
/** The internal queuing model to use for event buffering. */
'queue.type': string
/** The total capacity of the queue (`queue.type: persisted`) in number of bytes. */
'queue.max_bytes.number': integer
/** The total capacity of the queue (`queue.type: persisted`) in terms of units of bytes. */
'queue.max_bytes.units': string
'queue.max_bytes': string
/** The maximum number of written events before forcing a checkpoint when persistent queues are enabled (`queue.type: persisted`). */
'queue.checkpoint.writes': integer
}
@ -29545,8 +29567,7 @@ export interface NodesClearRepositoriesMeteringArchiveResponseBase extends Nodes
}
export interface NodesGetRepositoriesMeteringInfoRequest extends RequestBase {
/** Comma-separated list of node IDs or names used to limit returned information.
* All the nodes selective options are explained [here](https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster.html#cluster-nodes). */
/** Comma-separated list of node IDs or names used to limit returned information. */
node_id: NodeIds
/** All values in `body` will be added to the request body. */
body?: string | { [key: string]: any } & { node_id?: never }
@ -34820,7 +34841,7 @@ export interface SynonymsSynonymRule {
export interface SynonymsSynonymRuleRead {
/** Synonym Rule identifier */
id: Id
/** Synonyms, in Solr format, that conform the synonym rule. See https://www.elastic.co/guide/en/elasticsearch/reference/current/analysis-synonym-graph-tokenfilter.html#_solr_synonyms_2 */
/** Synonyms, in Solr format, that conform the synonym rule. */
synonyms: SynonymsSynonymString
}