diff --git a/output/openapi/elasticsearch-openapi.json b/output/openapi/elasticsearch-openapi.json index 8aeab70a6f..445950794b 100644 --- a/output/openapi/elasticsearch-openapi.json +++ b/output/openapi/elasticsearch-openapi.json @@ -86401,6 +86401,32 @@ "$ref": "#/components/schemas/_types.mapping.DenseVectorIndexOptions" } ] + }, + "sparse_vector": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping.SparseVectorIndexOptions" + } + ] + } + } + }, + "_types.mapping.SparseVectorIndexOptions": { + "type": "object", + "properties": { + "prune": { + "description": "Whether to perform pruning, omitting the non-significant tokens from the query to improve query performance.\nIf prune is true but the pruning_config is not specified, pruning will occur but default values will be used.\nDefault: false", + "x-state": "Generally available; Added in 8.19.0", + "type": "boolean" + }, + "pruning_config": { + "description": "Optional pruning configuration.\nIf enabled, this will omit non-significant tokens from the query in order to improve query performance.\nThis is only used if prune is set to true.\nIf prune is set to true but pruning_config is not specified, default values will be used.", + "x-state": "Generally available; Added in 8.19.0", + "allOf": [ + { + "$ref": "#/components/schemas/_types.TokenPruningConfig" + } + ] } } }, @@ -86480,25 +86506,6 @@ } ] }, - "_types.mapping.SparseVectorIndexOptions": { - "type": "object", - "properties": { - "prune": { - "description": "Whether to perform pruning, omitting the non-significant tokens from the query to improve query performance.\nIf prune is true but the pruning_config is not specified, pruning will occur but default values will be used.\nDefault: false", - "x-state": "Generally available; Added in 8.19.0", - "type": "boolean" - }, - "pruning_config": { - "description": "Optional pruning configuration.\nIf enabled, this will omit non-significant tokens from the query in order to improve query performance.\nThis is only used if prune is set to true.\nIf prune is set to true but pruning_config is not specified, default values will be used.", - "x-state": "Generally available; Added in 8.19.0", - "allOf": [ - { - "$ref": "#/components/schemas/_types.TokenPruningConfig" - } - ] - } - } - }, "_types.mapping.CompletionProperty": { "allOf": [ { diff --git a/output/openapi/elasticsearch-serverless-openapi.json b/output/openapi/elasticsearch-serverless-openapi.json index 012cceed8a..710a8e9f28 100644 --- a/output/openapi/elasticsearch-serverless-openapi.json +++ b/output/openapi/elasticsearch-serverless-openapi.json @@ -58670,6 +58670,32 @@ "$ref": "#/components/schemas/_types.mapping.DenseVectorIndexOptions" } ] + }, + "sparse_vector": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping.SparseVectorIndexOptions" + } + ] + } + } + }, + "_types.mapping.SparseVectorIndexOptions": { + "type": "object", + "properties": { + "prune": { + "description": "Whether to perform pruning, omitting the non-significant tokens from the query to improve query performance.\nIf prune is true but the pruning_config is not specified, pruning will occur but default values will be used.\nDefault: false", + "x-state": "Generally available", + "type": "boolean" + }, + "pruning_config": { + "description": "Optional pruning configuration.\nIf enabled, this will omit non-significant tokens from the query in order to improve query performance.\nThis is only used if prune is set to true.\nIf prune is set to true but pruning_config is not specified, default values will be used.", + "x-state": "Generally available", + "allOf": [ + { + "$ref": "#/components/schemas/_types.TokenPruningConfig" + } + ] } } }, @@ -58749,25 +58775,6 @@ } ] }, - "_types.mapping.SparseVectorIndexOptions": { - "type": "object", - "properties": { - "prune": { - "description": "Whether to perform pruning, omitting the non-significant tokens from the query to improve query performance.\nIf prune is true but the pruning_config is not specified, pruning will occur but default values will be used.\nDefault: false", - "x-state": "Generally available", - "type": "boolean" - }, - "pruning_config": { - "description": "Optional pruning configuration.\nIf enabled, this will omit non-significant tokens from the query in order to improve query performance.\nThis is only used if prune is set to true.\nIf prune is set to true but pruning_config is not specified, default values will be used.", - "x-state": "Generally available", - "allOf": [ - { - "$ref": "#/components/schemas/_types.TokenPruningConfig" - } - ] - } - } - }, "_types.mapping.CompletionProperty": { "allOf": [ { diff --git a/output/schema/schema.json b/output/schema/schema.json index 4ce31fb384..cddcbaf866 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -87354,9 +87354,20 @@ "namespace": "_types.mapping" } } + }, + { + "name": "sparse_vector", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "SparseVectorIndexOptions", + "namespace": "_types.mapping" + } + } } ], - "specLocation": "_types/mapping/SemanticTextIndexOptions.ts#L22-L24" + "specLocation": "_types/mapping/SemanticTextIndexOptions.ts#L23-L26" }, { "kind": "interface", @@ -160296,23 +160307,23 @@ "indicesPutAliasRequestExample1": { "alternatives": [ { - "code": "resp = client.indices.update_aliases(\n actions=[\n {\n \"add\": {\n \"index\": \"my-data-stream\",\n \"alias\": \"my-alias\"\n }\n }\n ],\n)", + "code": "resp = client.indices.put_alias(\n index=\"my-index-2099.05.06-000001\",\n name=\"my-alias\",\n filter={\n \"bool\": {\n \"filter\": [\n {\n \"range\": {\n \"@timestamp\": {\n \"gte\": \"now-1d/d\",\n \"lt\": \"now/d\"\n }\n }\n },\n {\n \"term\": {\n \"user.id\": \"kimchy\"\n }\n }\n ]\n }\n },\n)", "language": "Python" }, { - "code": "const response = await client.indices.updateAliases({\n actions: [\n {\n add: {\n index: \"my-data-stream\",\n alias: \"my-alias\",\n },\n },\n ],\n});", + "code": "const response = await client.indices.putAlias({\n index: \"my-index-2099.05.06-000001\",\n name: \"my-alias\",\n filter: {\n bool: {\n filter: [\n {\n range: {\n \"@timestamp\": {\n gte: \"now-1d/d\",\n lt: \"now/d\",\n },\n },\n },\n {\n term: {\n \"user.id\": \"kimchy\",\n },\n },\n ],\n },\n },\n});", "language": "JavaScript" }, { - "code": "response = client.indices.update_aliases(\n body: {\n \"actions\": [\n {\n \"add\": {\n \"index\": \"my-data-stream\",\n \"alias\": \"my-alias\"\n }\n }\n ]\n }\n)", + "code": "response = client.indices.put_alias(\n index: \"my-index-2099.05.06-000001\",\n name: \"my-alias\",\n body: {\n \"filter\": {\n \"bool\": {\n \"filter\": [\n {\n \"range\": {\n \"@timestamp\": {\n \"gte\": \"now-1d/d\",\n \"lt\": \"now/d\"\n }\n }\n },\n {\n \"term\": {\n \"user.id\": \"kimchy\"\n }\n }\n ]\n }\n }\n }\n)", "language": "Ruby" }, { - "code": "$resp = $client->indices()->updateAliases([\n \"body\" => [\n \"actions\" => array(\n [\n \"add\" => [\n \"index\" => \"my-data-stream\",\n \"alias\" => \"my-alias\",\n ],\n ],\n ),\n ],\n]);", + "code": "$resp = $client->indices()->putAlias([\n \"index\" => \"my-index-2099.05.06-000001\",\n \"name\" => \"my-alias\",\n \"body\" => [\n \"filter\" => [\n \"bool\" => [\n \"filter\" => array(\n [\n \"range\" => [\n \"@timestamp\" => [\n \"gte\" => \"now-1d/d\",\n \"lt\" => \"now/d\",\n ],\n ],\n ],\n [\n \"term\" => [\n \"user.id\" => \"kimchy\",\n ],\n ],\n ),\n ],\n ],\n ],\n]);", "language": "PHP" }, { - "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"actions\":[{\"add\":{\"index\":\"my-data-stream\",\"alias\":\"my-alias\"}}]}' \"$ELASTICSEARCH_URL/_aliases\"", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"filter\":{\"bool\":{\"filter\":[{\"range\":{\"@timestamp\":{\"gte\":\"now-1d/d\",\"lt\":\"now/d\"}}},{\"term\":{\"user.id\":\"kimchy\"}}]}}}' \"$ELASTICSEARCH_URL/my-index-2099.05.06-000001/_alias/my-alias\"", "language": "curl" } ], @@ -160322,12 +160333,56 @@ "value": "{\n \"filter\": {\n \"bool\": {\n \"filter\": [\n {\n \"range\": {\n \"@timestamp\": {\n \"gte\": \"now-1d/d\",\n \"lt\": \"now/d\"\n }\n }\n },\n {\n \"term\": {\n \"user.id\": \"kimchy\"\n }\n }\n ]\n }\n }\n}" }, "indicesPutAliasRequestExample2": { + "alternatives": [ + { + "code": "resp = client.indices.put_alias(\n index=\"logs-my_app-default\",\n name=\"logs\",\n is_write_index=True,\n)", + "language": "Python" + }, + { + "code": "const response = await client.indices.putAlias({\n index: \"logs-my_app-default\",\n name: \"logs\",\n is_write_index: true,\n});", + "language": "JavaScript" + }, + { + "code": "response = client.indices.put_alias(\n index: \"logs-my_app-default\",\n name: \"logs\",\n body: {\n \"is_write_index\": true\n }\n)", + "language": "Ruby" + }, + { + "code": "$resp = $client->indices()->putAlias([\n \"index\" => \"logs-my_app-default\",\n \"name\" => \"logs\",\n \"body\" => [\n \"is_write_index\" => true,\n ],\n]);", + "language": "PHP" + }, + { + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"is_write_index\":true}' \"$ELASTICSEARCH_URL/logs-my_app-default/_alias/logs\"", + "language": "curl" + } + ], "description": "You can use is_write_index to specify a write index or data stream for an alias. Elasticsearch routes any write requests for the alias to this index or data stream.", "method_request": "POST /logs-my_app-default/_alias/logs", "summary": "Write index", "value": "{\n \"is_write_index\": true\n}" }, "indicesPutAliasRequestExample3": { + "alternatives": [ + { + "code": "resp = client.indices.put_alias(\n index=\"my-index-2099.05.06-000001\",\n name=\"my-alias\",\n routing=\"1\",\n)", + "language": "Python" + }, + { + "code": "const response = await client.indices.putAlias({\n index: \"my-index-2099.05.06-000001\",\n name: \"my-alias\",\n routing: 1,\n});", + "language": "JavaScript" + }, + { + "code": "response = client.indices.put_alias(\n index: \"my-index-2099.05.06-000001\",\n name: \"my-alias\",\n body: {\n \"routing\": \"1\"\n }\n)", + "language": "Ruby" + }, + { + "code": "$resp = $client->indices()->putAlias([\n \"index\" => \"my-index-2099.05.06-000001\",\n \"name\" => \"my-alias\",\n \"body\" => [\n \"routing\" => \"1\",\n ],\n]);", + "language": "PHP" + }, + { + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"routing\":\"1\"}' \"$ELASTICSEARCH_URL/my-index-2099.05.06-000001/_alias/my-alias\"", + "language": "curl" + } + ], "description": "Use the routing option to route requests for an alias to a specific shard.", "method_request": "POST /my-index-2099.05.06-000001/_alias/my-alias", "summary": "Routing", @@ -180537,23 +180592,23 @@ "TextEmbeddingRequestExample1": { "alternatives": [ { - "code": "resp = client.inference.text_embedding(\n inference_id=\"my-cohere-endpoint\",\n input=\"The sky above the port was the color of television tuned to a dead channel.\",\n task_settings={\n \"input_type\": \"ingest\"\n },\n)", + "code": "resp = client.inference.text_embedding(\n inference_id=\"my-cohere-endpoint\",\n input=\"The sky above the port was the color of television tuned to a dead channel.\",\n input_type=\"ingest\",\n)", "language": "Python" }, { - "code": "const response = await client.inference.textEmbedding({\n inference_id: \"my-cohere-endpoint\",\n input:\n \"The sky above the port was the color of television tuned to a dead channel.\",\n task_settings: {\n input_type: \"ingest\",\n },\n});", + "code": "const response = await client.inference.textEmbedding({\n inference_id: \"my-cohere-endpoint\",\n input:\n \"The sky above the port was the color of television tuned to a dead channel.\",\n input_type: \"ingest\",\n});", "language": "JavaScript" }, { - "code": "response = client.inference.text_embedding(\n inference_id: \"my-cohere-endpoint\",\n body: {\n \"input\": \"The sky above the port was the color of television tuned to a dead channel.\",\n \"task_settings\": {\n \"input_type\": \"ingest\"\n }\n }\n)", + "code": "response = client.inference.text_embedding(\n inference_id: \"my-cohere-endpoint\",\n body: {\n \"input\": \"The sky above the port was the color of television tuned to a dead channel.\",\n \"input_type\": \"ingest\"\n }\n)", "language": "Ruby" }, { - "code": "$resp = $client->inference()->textEmbedding([\n \"inference_id\" => \"my-cohere-endpoint\",\n \"body\" => [\n \"input\" => \"The sky above the port was the color of television tuned to a dead channel.\",\n \"task_settings\" => [\n \"input_type\" => \"ingest\",\n ],\n ],\n]);", + "code": "$resp = $client->inference()->textEmbedding([\n \"inference_id\" => \"my-cohere-endpoint\",\n \"body\" => [\n \"input\" => \"The sky above the port was the color of television tuned to a dead channel.\",\n \"input_type\" => \"ingest\",\n ],\n]);", "language": "PHP" }, { - "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"input\":\"The sky above the port was the color of television tuned to a dead channel.\",\"task_settings\":{\"input_type\":\"ingest\"}}' \"$ELASTICSEARCH_URL/_inference/text_embedding/my-cohere-endpoint\"", + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" -H \"Content-Type: application/json\" -d '{\"input\":\"The sky above the port was the color of television tuned to a dead channel.\",\"input_type\":\"ingest\"}' \"$ELASTICSEARCH_URL/_inference/text_embedding/my-cohere-endpoint\"", "language": "curl" } ], @@ -227258,6 +227313,28 @@ "description": "Return tags defined for the project", "examples": { "ProjectTagsRequestExample1": { + "alternatives": [ + { + "code": "resp = client.project.tags()", + "language": "Python" + }, + { + "code": "const response = await client.project.tags();", + "language": "JavaScript" + }, + { + "code": "response = client.project.tags", + "language": "Ruby" + }, + { + "code": "$resp = $client->project()->tags();", + "language": "PHP" + }, + { + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_project/tags\"", + "language": "curl" + } + ], "method_request": "GET /_project/tags" } }, @@ -258875,6 +258952,28 @@ "description": "Disable logs stream.\n\nTurn off the logs stream feature for this cluster.", "examples": { "PostStreamsDisableRequestExample1": { + "alternatives": [ + { + "code": "resp = client.streams.logs_disable()", + "language": "Python" + }, + { + "code": "const response = await client.streams.logsDisable();", + "language": "JavaScript" + }, + { + "code": "response = client.streams.logs_disable", + "language": "Ruby" + }, + { + "code": "$resp = $client->streams()->logsDisable();", + "language": "PHP" + }, + { + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_streams/logs/_disable\"", + "language": "curl" + } + ], "method_request": "POST _streams/logs/_disable", "summary": "Disable the logs streams on this cluster" } @@ -258957,6 +259056,28 @@ "description": "Enable logs stream.\n\nTurn on the logs stream feature for this cluster.\n\nNOTE: To protect existing data, this feature can be turned on only if the\ncluster does not have existing indices or data streams that match the pattern `logs|logs.*`.\nIf those indices or data streams exist, a `409 - Conflict` response and error is returned.", "examples": { "PostStreamsEnableRequestExample1": { + "alternatives": [ + { + "code": "resp = client.streams.logs_enable()", + "language": "Python" + }, + { + "code": "const response = await client.streams.logsEnable();", + "language": "JavaScript" + }, + { + "code": "response = client.streams.logs_enable", + "language": "Ruby" + }, + { + "code": "$resp = $client->streams()->logsEnable();", + "language": "PHP" + }, + { + "code": "curl -X POST -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_streams/logs/_enable\"", + "language": "curl" + } + ], "method_request": "POST _streams/logs/_enable", "summary": "Enable the logs streams on this cluster" } @@ -259061,6 +259182,28 @@ "description": "Get the status of streams.\n\nGet the current status for all types of streams.", "examples": { "GetStreamsStatusRequestExample1": { + "alternatives": [ + { + "code": "resp = client.streams.status()", + "language": "Python" + }, + { + "code": "const response = await client.streams.status();", + "language": "JavaScript" + }, + { + "code": "response = client.streams.status", + "language": "Ruby" + }, + { + "code": "$resp = $client->streams()->status();", + "language": "PHP" + }, + { + "code": "curl -X GET -H \"Authorization: ApiKey $ELASTIC_API_KEY\" \"$ELASTICSEARCH_URL/_streams/status\"", + "language": "curl" + } + ], "method_request": "GET _streams/status", "summary": "Get the current status of streams" } diff --git a/output/typescript/types.ts b/output/typescript/types.ts index d1fe73230b..2eb3d05cc9 100644 --- a/output/typescript/types.ts +++ b/output/typescript/types.ts @@ -6057,6 +6057,7 @@ export interface MappingSearchAsYouTypeProperty extends MappingCorePropertyBase export interface MappingSemanticTextIndexOptions { dense_vector?: MappingDenseVectorIndexOptions + sparse_vector?: MappingSparseVectorIndexOptions } export interface MappingSemanticTextProperty { diff --git a/specification/_types/mapping/SemanticTextIndexOptions.ts b/specification/_types/mapping/SemanticTextIndexOptions.ts index 6876b30b5b..ec5acb121b 100644 --- a/specification/_types/mapping/SemanticTextIndexOptions.ts +++ b/specification/_types/mapping/SemanticTextIndexOptions.ts @@ -18,7 +18,9 @@ */ import { DenseVectorIndexOptions } from './DenseVectorProperty' +import { SparseVectorIndexOptions } from './SparseVectorIndexOptions' export class SemanticTextIndexOptions { dense_vector?: DenseVectorIndexOptions + sparse_vector?: SparseVectorIndexOptions }