From c960c89f97fc61f77acc560ae5bd7ad6ddcae904 Mon Sep 17 00:00:00 2001 From: Lisa Cawley Date: Wed, 23 Oct 2024 07:45:43 -0700 Subject: [PATCH] [OpenAPI] Edit mget, multi term vectors, and terms enum APIs (#3052) --- .../elasticsearch-shared-overlays.yaml | 10 +--- output/openapi/elasticsearch-openapi.json | 53 +++++++++++-------- .../elasticsearch-serverless-openapi.json | 40 ++++++++------ output/schema/schema.json | 34 ++++++------ .../DeleteByQueryRethrottleRequest.ts | 5 ++ specification/_global/mget/MultiGetRequest.ts | 6 +++ .../mtermvectors/MultiTermVectorsRequest.ts | 7 +++ .../ReindexRethrottleRequest.ts | 4 +- .../UpdateByQueryRethrottleRequest.ts | 5 ++ 9 files changed, 102 insertions(+), 62 deletions(-) diff --git a/docs/overlays/elasticsearch-shared-overlays.yaml b/docs/overlays/elasticsearch-shared-overlays.yaml index 885e7ae97a..200fdd6d38 100644 --- a/docs/overlays/elasticsearch-shared-overlays.yaml +++ b/docs/overlays/elasticsearch-shared-overlays.yaml @@ -54,15 +54,7 @@ actions: x-displayName: Document externalDocs: description: Reading and writing documents - url: https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-replication.html - - name: mget - x-displayName: Document - Multi get - - name: mtermvectors - x-displayName: Document - Multi term vectors - - name: delete_by_query_rethrottle - x-displayName: Document - Rethrottle delete by query - - name: update_by_query_rethrottle - x-displayName: Document - Rethrottle update by query + url: https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-replication.html # E - name: enrich x-displayName: Enrich diff --git a/output/openapi/elasticsearch-openapi.json b/output/openapi/elasticsearch-openapi.json index aac893e7f4..094b855717 100644 --- a/output/openapi/elasticsearch-openapi.json +++ b/output/openapi/elasticsearch-openapi.json @@ -6933,9 +6933,10 @@ "/_delete_by_query/{task_id}/_rethrottle": { "post": { "tags": [ - "delete_by_query_rethrottle" + "document" ], - "summary": "Changes the number of requests per second for a particular Delete By Query operation", + "summary": "Throttle a delete by query operation", + "description": "Change the number of requests per second for a particular delete by query operation.\nRethrottling that speeds up the query takes effect immediately but rethrotting that slows down the query takes effect after completing the current batch to prevent scroll timeouts.", "operationId": "delete-by-query-rethrottle", "parameters": [ { @@ -15894,9 +15895,10 @@ "/_mget": { "get": { "tags": [ - "mget" + "document" ], - "summary": "Allows to get multiple documents in one request", + "summary": "Get multiple documents", + "description": "Get multiple JSON documents by ID from one or more indices.\nIf you specify an index in the request URI, you only need to specify the document IDs in the request body.\nTo ensure fast responses, this multi get (mget) API responds with partial results if one or more shards fail.", "operationId": "mget", "parameters": [ { @@ -15939,9 +15941,10 @@ }, "post": { "tags": [ - "mget" + "document" ], - "summary": "Allows to get multiple documents in one request", + "summary": "Get multiple documents", + "description": "Get multiple JSON documents by ID from one or more indices.\nIf you specify an index in the request URI, you only need to specify the document IDs in the request body.\nTo ensure fast responses, this multi get (mget) API responds with partial results if one or more shards fail.", "operationId": "mget-1", "parameters": [ { @@ -15986,9 +15989,10 @@ "/{index}/_mget": { "get": { "tags": [ - "mget" + "document" ], - "summary": "Allows to get multiple documents in one request", + "summary": "Get multiple documents", + "description": "Get multiple JSON documents by ID from one or more indices.\nIf you specify an index in the request URI, you only need to specify the document IDs in the request body.\nTo ensure fast responses, this multi get (mget) API responds with partial results if one or more shards fail.", "operationId": "mget-2", "parameters": [ { @@ -16034,9 +16038,10 @@ }, "post": { "tags": [ - "mget" + "document" ], - "summary": "Allows to get multiple documents in one request", + "summary": "Get multiple documents", + "description": "Get multiple JSON documents by ID from one or more indices.\nIf you specify an index in the request URI, you only need to specify the document IDs in the request body.\nTo ensure fast responses, this multi get (mget) API responds with partial results if one or more shards fail.", "operationId": "mget-3", "parameters": [ { @@ -22664,9 +22669,10 @@ "/_mtermvectors": { "get": { "tags": [ - "mtermvectors" + "document" ], - "summary": "Returns multiple termvectors in one request", + "summary": "Get multiple term vectors", + "description": "You can specify existing documents by index and ID or provide artificial documents in the body of the request.\nYou can specify the index in the request body or request URI.\nThe response contains a `docs` array with all the fetched termvectors.\nEach element has the structure provided by the termvectors API.", "operationId": "mtermvectors", "parameters": [ { @@ -22717,9 +22723,10 @@ }, "post": { "tags": [ - "mtermvectors" + "document" ], - "summary": "Returns multiple termvectors in one request", + "summary": "Get multiple term vectors", + "description": "You can specify existing documents by index and ID or provide artificial documents in the body of the request.\nYou can specify the index in the request body or request URI.\nThe response contains a `docs` array with all the fetched termvectors.\nEach element has the structure provided by the termvectors API.", "operationId": "mtermvectors-1", "parameters": [ { @@ -22772,9 +22779,10 @@ "/{index}/_mtermvectors": { "get": { "tags": [ - "mtermvectors" + "document" ], - "summary": "Returns multiple termvectors in one request", + "summary": "Get multiple term vectors", + "description": "You can specify existing documents by index and ID or provide artificial documents in the body of the request.\nYou can specify the index in the request body or request URI.\nThe response contains a `docs` array with all the fetched termvectors.\nEach element has the structure provided by the termvectors API.", "operationId": "mtermvectors-2", "parameters": [ { @@ -22828,9 +22836,10 @@ }, "post": { "tags": [ - "mtermvectors" + "document" ], - "summary": "Returns multiple termvectors in one request", + "summary": "Get multiple term vectors", + "description": "You can specify existing documents by index and ID or provide artificial documents in the body of the request.\nYou can specify the index in the request body or request URI.\nThe response contains a `docs` array with all the fetched termvectors.\nEach element has the structure provided by the termvectors API.", "operationId": "mtermvectors-3", "parameters": [ { @@ -24490,7 +24499,8 @@ "tags": [ "document" ], - "summary": "Copies documents from a source to a destination", + "summary": "Throttle a reindex operation", + "description": "Change the number of requests per second for a particular reindex operation.", "operationId": "reindex-rethrottle", "parameters": [ { @@ -34710,9 +34720,10 @@ "/_update_by_query/{task_id}/_rethrottle": { "post": { "tags": [ - "update_by_query_rethrottle" + "document" ], - "summary": "Changes the number of requests per second for a particular Update By Query operation", + "summary": "Throttle an update by query operation", + "description": "Change the number of requests per second for a particular update by query operation.\nRethrottling that speeds up the query takes effect immediately but rethrotting that slows down the query takes effect after completing the current batch to prevent scroll timeouts.", "operationId": "update-by-query-rethrottle", "parameters": [ { diff --git a/output/openapi/elasticsearch-serverless-openapi.json b/output/openapi/elasticsearch-serverless-openapi.json index 8d90f4b346..aa8123c682 100644 --- a/output/openapi/elasticsearch-serverless-openapi.json +++ b/output/openapi/elasticsearch-serverless-openapi.json @@ -9468,9 +9468,10 @@ "/_mget": { "get": { "tags": [ - "mget" + "document" ], - "summary": "Allows to get multiple documents in one request", + "summary": "Get multiple documents", + "description": "Get multiple JSON documents by ID from one or more indices.\nIf you specify an index in the request URI, you only need to specify the document IDs in the request body.\nTo ensure fast responses, this multi get (mget) API responds with partial results if one or more shards fail.", "operationId": "mget", "parameters": [ { @@ -9510,9 +9511,10 @@ }, "post": { "tags": [ - "mget" + "document" ], - "summary": "Allows to get multiple documents in one request", + "summary": "Get multiple documents", + "description": "Get multiple JSON documents by ID from one or more indices.\nIf you specify an index in the request URI, you only need to specify the document IDs in the request body.\nTo ensure fast responses, this multi get (mget) API responds with partial results if one or more shards fail.", "operationId": "mget-1", "parameters": [ { @@ -9554,9 +9556,10 @@ "/{index}/_mget": { "get": { "tags": [ - "mget" + "document" ], - "summary": "Allows to get multiple documents in one request", + "summary": "Get multiple documents", + "description": "Get multiple JSON documents by ID from one or more indices.\nIf you specify an index in the request URI, you only need to specify the document IDs in the request body.\nTo ensure fast responses, this multi get (mget) API responds with partial results if one or more shards fail.", "operationId": "mget-2", "parameters": [ { @@ -9599,9 +9602,10 @@ }, "post": { "tags": [ - "mget" + "document" ], - "summary": "Allows to get multiple documents in one request", + "summary": "Get multiple documents", + "description": "Get multiple JSON documents by ID from one or more indices.\nIf you specify an index in the request URI, you only need to specify the document IDs in the request body.\nTo ensure fast responses, this multi get (mget) API responds with partial results if one or more shards fail.", "operationId": "mget-3", "parameters": [ { @@ -14237,9 +14241,10 @@ "/_mtermvectors": { "get": { "tags": [ - "mtermvectors" + "document" ], - "summary": "Returns multiple termvectors in one request", + "summary": "Get multiple term vectors", + "description": "You can specify existing documents by index and ID or provide artificial documents in the body of the request.\nYou can specify the index in the request body or request URI.\nThe response contains a `docs` array with all the fetched termvectors.\nEach element has the structure provided by the termvectors API.", "operationId": "mtermvectors", "parameters": [ { @@ -14290,9 +14295,10 @@ }, "post": { "tags": [ - "mtermvectors" + "document" ], - "summary": "Returns multiple termvectors in one request", + "summary": "Get multiple term vectors", + "description": "You can specify existing documents by index and ID or provide artificial documents in the body of the request.\nYou can specify the index in the request body or request URI.\nThe response contains a `docs` array with all the fetched termvectors.\nEach element has the structure provided by the termvectors API.", "operationId": "mtermvectors-1", "parameters": [ { @@ -14345,9 +14351,10 @@ "/{index}/_mtermvectors": { "get": { "tags": [ - "mtermvectors" + "document" ], - "summary": "Returns multiple termvectors in one request", + "summary": "Get multiple term vectors", + "description": "You can specify existing documents by index and ID or provide artificial documents in the body of the request.\nYou can specify the index in the request body or request URI.\nThe response contains a `docs` array with all the fetched termvectors.\nEach element has the structure provided by the termvectors API.", "operationId": "mtermvectors-2", "parameters": [ { @@ -14401,9 +14408,10 @@ }, "post": { "tags": [ - "mtermvectors" + "document" ], - "summary": "Returns multiple termvectors in one request", + "summary": "Get multiple term vectors", + "description": "You can specify existing documents by index and ID or provide artificial documents in the body of the request.\nYou can specify the index in the request body or request URI.\nThe response contains a `docs` array with all the fetched termvectors.\nEach element has the structure provided by the termvectors API.", "operationId": "mtermvectors-3", "parameters": [ { diff --git a/output/schema/schema.json b/output/schema/schema.json index 66ee64b4f5..d202b736b3 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -4338,7 +4338,8 @@ "stability": "stable" } }, - "description": "Changes the number of requests per second for a particular Delete By Query operation.", + "description": "Throttle a delete by query operation.\n\nChange the number of requests per second for a particular delete by query operation.\nRethrottling that speeds up the query takes effect immediately but rethrotting that slows down the query takes effect after completing the current batch to prevent scroll timeouts.", + "docTag": "document", "docUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-delete-by-query.html", "name": "delete_by_query_rethrottle", "request": { @@ -9270,7 +9271,8 @@ "stability": "stable" } }, - "description": "Allows to get multiple documents in one request.", + "description": "Get multiple documents.\n\nGet multiple JSON documents by ID from one or more indices.\nIf you specify an index in the request URI, you only need to specify the document IDs in the request body.\nTo ensure fast responses, this multi get (mget) API responds with partial results if one or more shards fail.", + "docTag": "document", "docUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-multi-get.html", "name": "mget", "privileges": { @@ -12865,7 +12867,8 @@ "stability": "stable" } }, - "description": "Returns multiple termvectors in one request.", + "description": "Get multiple term vectors.\n\nYou can specify existing documents by index and ID or provide artificial documents in the body of the request.\nYou can specify the index in the request body or request URI.\nThe response contains a `docs` array with all the fetched termvectors.\nEach element has the structure provided by the termvectors API.", + "docTag": "document", "docUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-multi-termvectors.html", "name": "mtermvectors", "request": { @@ -13849,7 +13852,7 @@ "stability": "stable" } }, - "description": "Copies documents from a source to a destination.", + "description": "Throttle a reindex operation.\n\nChange the number of requests per second for a particular reindex operation.", "docTag": "document", "docUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-reindex.html", "name": "reindex_rethrottle", @@ -19734,7 +19737,8 @@ "stability": "stable" } }, - "description": "Changes the number of requests per second for a particular Update By Query operation.", + "description": "Throttle an update by query operation.\n\nChange the number of requests per second for a particular update by query operation.\nRethrottling that speeds up the query takes effect immediately but rethrotting that slows down the query takes effect after completing the current batch to prevent scroll timeouts.", + "docTag": "document", "docUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-update-by-query.html", "name": "update_by_query_rethrottle", "request": { @@ -22661,7 +22665,7 @@ "body": { "kind": "no_body" }, - "description": "Changes the number of requests per second for a particular Delete By Query operation.", + "description": "Throttle a delete by query operation.\n\nChange the number of requests per second for a particular delete by query operation.\nRethrottling that speeds up the query takes effect immediately but rethrotting that slows down the query takes effect after completing the current batch to prevent scroll timeouts.", "inherits": { "type": { "name": "RequestBase", @@ -22700,7 +22704,7 @@ } } ], - "specLocation": "_global/delete_by_query_rethrottle/DeleteByQueryRethrottleRequest.ts#L24-L42" + "specLocation": "_global/delete_by_query_rethrottle/DeleteByQueryRethrottleRequest.ts#L24-L47" }, { "kind": "response", @@ -27226,7 +27230,7 @@ } ] }, - "description": "Allows to get multiple documents in one request.", + "description": "Get multiple documents.\n\nGet multiple JSON documents by ID from one or more indices.\nIf you specify an index in the request URI, you only need to specify the document IDs in the request body.\nTo ensure fast responses, this multi get (mget) API responds with partial results if one or more shards fail.", "inherits": { "type": { "name": "RequestBase", @@ -27377,7 +27381,7 @@ } } ], - "specLocation": "_global/mget/MultiGetRequest.ts#L25-L98" + "specLocation": "_global/mget/MultiGetRequest.ts#L25-L104" }, { "kind": "response", @@ -28946,7 +28950,7 @@ } ] }, - "description": "Returns multiple termvectors in one request.", + "description": "Get multiple term vectors.\n\nYou can specify existing documents by index and ID or provide artificial documents in the body of the request.\nYou can specify the index in the request body or request URI.\nThe response contains a `docs` array with all the fetched termvectors.\nEach element has the structure provided by the termvectors API.", "inherits": { "type": { "name": "RequestBase", @@ -29128,7 +29132,7 @@ } } ], - "specLocation": "_global/mtermvectors/MultiTermVectorsRequest.ts#L31-L109" + "specLocation": "_global/mtermvectors/MultiTermVectorsRequest.ts#L31-L116" }, { "kind": "response", @@ -31393,7 +31397,7 @@ "body": { "kind": "no_body" }, - "description": "Copies documents from a source to a destination.", + "description": "Throttle a reindex operation.\n\nChange the number of requests per second for a particular reindex operation.", "inherits": { "type": { "name": "RequestBase", @@ -31432,7 +31436,7 @@ } } ], - "specLocation": "_global/reindex_rethrottle/ReindexRethrottleRequest.ts#L24-L44" + "specLocation": "_global/reindex_rethrottle/ReindexRethrottleRequest.ts#L24-L46" }, { "kind": "response", @@ -42082,7 +42086,7 @@ "body": { "kind": "no_body" }, - "description": "Changes the number of requests per second for a particular Update By Query operation.", + "description": "Throttle an update by query operation.\n\nChange the number of requests per second for a particular update by query operation.\nRethrottling that speeds up the query takes effect immediately but rethrotting that slows down the query takes effect after completing the current batch to prevent scroll timeouts.", "inherits": { "type": { "name": "RequestBase", @@ -42122,7 +42126,7 @@ } } ], - "specLocation": "_global/update_by_query_rethrottle/UpdateByQueryRethrottleRequest.ts#L24-L43" + "specLocation": "_global/update_by_query_rethrottle/UpdateByQueryRethrottleRequest.ts#L24-L48" }, { "kind": "response", diff --git a/specification/_global/delete_by_query_rethrottle/DeleteByQueryRethrottleRequest.ts b/specification/_global/delete_by_query_rethrottle/DeleteByQueryRethrottleRequest.ts index defc8559cf..22f1cd171c 100644 --- a/specification/_global/delete_by_query_rethrottle/DeleteByQueryRethrottleRequest.ts +++ b/specification/_global/delete_by_query_rethrottle/DeleteByQueryRethrottleRequest.ts @@ -22,9 +22,14 @@ import { TaskId } from '@_types/common' import { float } from '@_types/Numeric' /** + * Throttle a delete by query operation. + * + * Change the number of requests per second for a particular delete by query operation. + * Rethrottling that speeds up the query takes effect immediately but rethrotting that slows down the query takes effect after completing the current batch to prevent scroll timeouts. * @rest_spec_name delete_by_query_rethrottle * @availability stack since=6.5.0 stability=stable * @availability serverless stability=stable visibility=private + * @doc_tag document */ export interface Request extends RequestBase { path_parts: { diff --git a/specification/_global/mget/MultiGetRequest.ts b/specification/_global/mget/MultiGetRequest.ts index 4b2271b3b4..a76d011a63 100644 --- a/specification/_global/mget/MultiGetRequest.ts +++ b/specification/_global/mget/MultiGetRequest.ts @@ -23,10 +23,16 @@ import { Fields, Ids, IndexName, Routing } from '@_types/common' import { Operation } from './types' /** + * Get multiple documents. + * + * Get multiple JSON documents by ID from one or more indices. + * If you specify an index in the request URI, you only need to specify the document IDs in the request body. + * To ensure fast responses, this multi get (mget) API responds with partial results if one or more shards fail. * @rest_spec_name mget * @availability stack since=1.3.0 stability=stable * @availability serverless stability=stable visibility=public * @index_privileges read + * @doc_tag document */ export interface Request extends RequestBase { path_parts: { diff --git a/specification/_global/mtermvectors/MultiTermVectorsRequest.ts b/specification/_global/mtermvectors/MultiTermVectorsRequest.ts index e5a4e8d573..83a5ba4212 100644 --- a/specification/_global/mtermvectors/MultiTermVectorsRequest.ts +++ b/specification/_global/mtermvectors/MultiTermVectorsRequest.ts @@ -29,9 +29,16 @@ import { import { Operation } from './types' /** + * Get multiple term vectors. + * + * You can specify existing documents by index and ID or provide artificial documents in the body of the request. + * You can specify the index in the request body or request URI. + * The response contains a `docs` array with all the fetched termvectors. + * Each element has the structure provided by the termvectors API. * @rest_spec_name mtermvectors * @availability stack stability=stable * @availability serverless stability=stable visibility=public + * @doc_tag document */ export interface Request extends RequestBase { path_parts: { diff --git a/specification/_global/reindex_rethrottle/ReindexRethrottleRequest.ts b/specification/_global/reindex_rethrottle/ReindexRethrottleRequest.ts index e955a60dbc..8a2841b40e 100644 --- a/specification/_global/reindex_rethrottle/ReindexRethrottleRequest.ts +++ b/specification/_global/reindex_rethrottle/ReindexRethrottleRequest.ts @@ -22,7 +22,9 @@ import { Id } from '@_types/common' import { float } from '@_types/Numeric' /** - * Copies documents from a source to a destination. + * Throttle a reindex operation. + * + * Change the number of requests per second for a particular reindex operation. * @rest_spec_name reindex_rethrottle * @availability stack since=2.4.0 stability=stable * @availability serverless stability=stable visibility=private diff --git a/specification/_global/update_by_query_rethrottle/UpdateByQueryRethrottleRequest.ts b/specification/_global/update_by_query_rethrottle/UpdateByQueryRethrottleRequest.ts index deddea2a59..abc6810490 100644 --- a/specification/_global/update_by_query_rethrottle/UpdateByQueryRethrottleRequest.ts +++ b/specification/_global/update_by_query_rethrottle/UpdateByQueryRethrottleRequest.ts @@ -22,9 +22,14 @@ import { Id } from '@_types/common' import { float } from '@_types/Numeric' /** + * Throttle an update by query operation. + * + * Change the number of requests per second for a particular update by query operation. + * Rethrottling that speeds up the query takes effect immediately but rethrotting that slows down the query takes effect after completing the current batch to prevent scroll timeouts. * @rest_spec_name update_by_query_rethrottle * @availability stack since=6.5.0 stability=stable * @availability serverless stability=stable visibility=private + * @doc_tag document */ export interface Request extends RequestBase { path_parts: {