From c714f0b52b1510f5037663796079120e223c015a Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 23 Oct 2024 16:44:36 -0700 Subject: [PATCH] [Backport 8.x] [OpenAPI] Edit multi search and scroll API (#3062) --- .../elasticsearch-shared-overlays.yaml | 6 -- output/openapi/elasticsearch-openapi.json | 64 ++++++++++++------- .../elasticsearch-serverless-openapi.json | 64 ++++++++++++------- output/schema/schema.json | 23 ++++--- .../_global/msearch/MultiSearchRequest.ts | 18 ++++++ specification/_global/scroll/ScrollRequest.ts | 16 +++++ .../_global/terms_enum/TermsEnumRequest.ts | 10 +++ 7 files changed, 142 insertions(+), 59 deletions(-) diff --git a/docs/overlays/elasticsearch-shared-overlays.yaml b/docs/overlays/elasticsearch-shared-overlays.yaml index e8ac46a104..e3e695253a 100644 --- a/docs/overlays/elasticsearch-shared-overlays.yaml +++ b/docs/overlays/elasticsearch-shared-overlays.yaml @@ -183,12 +183,6 @@ actions: x-displayName: Script - Get languages - name: search x-displayName: Search - - name: msearch - x-displayName: Search - Multi search - - name: scroll - x-displayName: Search - Scroll - - name: terms_enum - x-displayName: Search - Terms enum - name: search_application x-displayName: Search application - name: searchable_snapshots diff --git a/output/openapi/elasticsearch-openapi.json b/output/openapi/elasticsearch-openapi.json index 1e19c7ffe7..45357555ba 100644 --- a/output/openapi/elasticsearch-openapi.json +++ b/output/openapi/elasticsearch-openapi.json @@ -2733,9 +2733,13 @@ "/_search/scroll": { "get": { "tags": [ - "scroll" + "search" ], - "summary": "Allows to retrieve a large numbers of results from a single search request", + "summary": "Run a scrolling search", + "description": "IMPORTANT: The scroll API is no longer recommend for deep pagination. If you need to preserve the index state while paging through more than 10,000 hits, use the `search_after` parameter with a point in time (PIT).\n\nThe scroll API gets large sets of results from a single scrolling search request.\nTo get the necessary scroll ID, submit a search API request that includes an argument for the `scroll` query parameter.\nThe `scroll` parameter indicates how long Elasticsearch should retain the search context for the request.\nThe search response returns a scroll ID in the `_scroll_id` response body parameter.\nYou can then use the scroll ID with the scroll API to retrieve the next batch of results for the request.\nIf the Elasticsearch security features are enabled, the access to the results of a specific scroll ID is restricted to the user or API key that submitted the search.\n\nYou can also use the scroll API to specify a new scroll parameter that extends or shortens the retention period for the search context.\n\nIMPORTANT: Results from a scrolling search reflect the state of the index at the time of the initial search request. Subsequent indexing or document changes only affect later search and scroll requests.", + "externalDocs": { + "url": "https://www.elastic.co/guide/en/elasticsearch/reference/current/paginate-search-results.html#scroll-search-results" + }, "operationId": "scroll", "parameters": [ { @@ -2759,9 +2763,13 @@ }, "post": { "tags": [ - "scroll" + "search" ], - "summary": "Allows to retrieve a large numbers of results from a single search request", + "summary": "Run a scrolling search", + "description": "IMPORTANT: The scroll API is no longer recommend for deep pagination. If you need to preserve the index state while paging through more than 10,000 hits, use the `search_after` parameter with a point in time (PIT).\n\nThe scroll API gets large sets of results from a single scrolling search request.\nTo get the necessary scroll ID, submit a search API request that includes an argument for the `scroll` query parameter.\nThe `scroll` parameter indicates how long Elasticsearch should retain the search context for the request.\nThe search response returns a scroll ID in the `_scroll_id` response body parameter.\nYou can then use the scroll ID with the scroll API to retrieve the next batch of results for the request.\nIf the Elasticsearch security features are enabled, the access to the results of a specific scroll ID is restricted to the user or API key that submitted the search.\n\nYou can also use the scroll API to specify a new scroll parameter that extends or shortens the retention period for the search context.\n\nIMPORTANT: Results from a scrolling search reflect the state of the index at the time of the initial search request. Subsequent indexing or document changes only affect later search and scroll requests.", + "externalDocs": { + "url": "https://www.elastic.co/guide/en/elasticsearch/reference/current/paginate-search-results.html#scroll-search-results" + }, "operationId": "scroll-1", "parameters": [ { @@ -2802,9 +2810,13 @@ "/_search/scroll/{scroll_id}": { "get": { "tags": [ - "scroll" + "search" ], - "summary": "Allows to retrieve a large numbers of results from a single search request", + "summary": "Run a scrolling search", + "description": "IMPORTANT: The scroll API is no longer recommend for deep pagination. If you need to preserve the index state while paging through more than 10,000 hits, use the `search_after` parameter with a point in time (PIT).\n\nThe scroll API gets large sets of results from a single scrolling search request.\nTo get the necessary scroll ID, submit a search API request that includes an argument for the `scroll` query parameter.\nThe `scroll` parameter indicates how long Elasticsearch should retain the search context for the request.\nThe search response returns a scroll ID in the `_scroll_id` response body parameter.\nYou can then use the scroll ID with the scroll API to retrieve the next batch of results for the request.\nIf the Elasticsearch security features are enabled, the access to the results of a specific scroll ID is restricted to the user or API key that submitted the search.\n\nYou can also use the scroll API to specify a new scroll parameter that extends or shortens the retention period for the search context.\n\nIMPORTANT: Results from a scrolling search reflect the state of the index at the time of the initial search request. Subsequent indexing or document changes only affect later search and scroll requests.", + "externalDocs": { + "url": "https://www.elastic.co/guide/en/elasticsearch/reference/current/paginate-search-results.html#scroll-search-results" + }, "operationId": "scroll-2", "parameters": [ { @@ -2831,9 +2843,13 @@ }, "post": { "tags": [ - "scroll" + "search" ], - "summary": "Allows to retrieve a large numbers of results from a single search request", + "summary": "Run a scrolling search", + "description": "IMPORTANT: The scroll API is no longer recommend for deep pagination. If you need to preserve the index state while paging through more than 10,000 hits, use the `search_after` parameter with a point in time (PIT).\n\nThe scroll API gets large sets of results from a single scrolling search request.\nTo get the necessary scroll ID, submit a search API request that includes an argument for the `scroll` query parameter.\nThe `scroll` parameter indicates how long Elasticsearch should retain the search context for the request.\nThe search response returns a scroll ID in the `_scroll_id` response body parameter.\nYou can then use the scroll ID with the scroll API to retrieve the next batch of results for the request.\nIf the Elasticsearch security features are enabled, the access to the results of a specific scroll ID is restricted to the user or API key that submitted the search.\n\nYou can also use the scroll API to specify a new scroll parameter that extends or shortens the retention period for the search context.\n\nIMPORTANT: Results from a scrolling search reflect the state of the index at the time of the initial search request. Subsequent indexing or document changes only affect later search and scroll requests.", + "externalDocs": { + "url": "https://www.elastic.co/guide/en/elasticsearch/reference/current/paginate-search-results.html#scroll-search-results" + }, "operationId": "scroll-3", "parameters": [ { @@ -22302,9 +22318,10 @@ "/_msearch": { "get": { "tags": [ - "msearch" + "search" ], - "summary": "Allows to execute several search operations in one request", + "summary": "Run multiple searches", + "description": "The format of the request is similar to the bulk API format and makes use of the newline delimited JSON (NDJSON) format.\nThe structure is as follows:\n\n```\nheader\\n\nbody\\n\nheader\\n\nbody\\n\n```\n\nThis structure is specifically optimized to reduce parsing if a specific search ends up redirected to another node.\n\nIMPORTANT: The final line of data must end with a newline character `\\n`.\nEach newline character may be preceded by a carriage return `\\r`.\nWhen sending requests to this endpoint the `Content-Type` header should be set to `application/x-ndjson`.", "operationId": "msearch", "parameters": [ { @@ -22359,9 +22376,10 @@ }, "post": { "tags": [ - "msearch" + "search" ], - "summary": "Allows to execute several search operations in one request", + "summary": "Run multiple searches", + "description": "The format of the request is similar to the bulk API format and makes use of the newline delimited JSON (NDJSON) format.\nThe structure is as follows:\n\n```\nheader\\n\nbody\\n\nheader\\n\nbody\\n\n```\n\nThis structure is specifically optimized to reduce parsing if a specific search ends up redirected to another node.\n\nIMPORTANT: The final line of data must end with a newline character `\\n`.\nEach newline character may be preceded by a carriage return `\\r`.\nWhen sending requests to this endpoint the `Content-Type` header should be set to `application/x-ndjson`.", "operationId": "msearch-1", "parameters": [ { @@ -22418,9 +22436,10 @@ "/{index}/_msearch": { "get": { "tags": [ - "msearch" + "search" ], - "summary": "Allows to execute several search operations in one request", + "summary": "Run multiple searches", + "description": "The format of the request is similar to the bulk API format and makes use of the newline delimited JSON (NDJSON) format.\nThe structure is as follows:\n\n```\nheader\\n\nbody\\n\nheader\\n\nbody\\n\n```\n\nThis structure is specifically optimized to reduce parsing if a specific search ends up redirected to another node.\n\nIMPORTANT: The final line of data must end with a newline character `\\n`.\nEach newline character may be preceded by a carriage return `\\r`.\nWhen sending requests to this endpoint the `Content-Type` header should be set to `application/x-ndjson`.", "operationId": "msearch-2", "parameters": [ { @@ -22478,9 +22497,10 @@ }, "post": { "tags": [ - "msearch" + "search" ], - "summary": "Allows to execute several search operations in one request", + "summary": "Run multiple searches", + "description": "The format of the request is similar to the bulk API format and makes use of the newline delimited JSON (NDJSON) format.\nThe structure is as follows:\n\n```\nheader\\n\nbody\\n\nheader\\n\nbody\\n\n```\n\nThis structure is specifically optimized to reduce parsing if a specific search ends up redirected to another node.\n\nIMPORTANT: The final line of data must end with a newline character `\\n`.\nEach newline character may be preceded by a carriage return `\\r`.\nWhen sending requests to this endpoint the `Content-Type` header should be set to `application/x-ndjson`.", "operationId": "msearch-3", "parameters": [ { @@ -32756,10 +32776,10 @@ "/{index}/_terms_enum": { "get": { "tags": [ - "terms_enum" + "search" ], - "summary": "The terms enum API can be used to discover terms in the index that begin with the provided string", - "description": "It is designed for low-latency look-ups used in auto-complete scenarios.", + "summary": "Get terms in an index", + "description": "Discover terms that match a partial string in an index.\nThis \"terms enum\" API is designed for low-latency look-ups used in auto-complete scenarios.\n\nIf the `complete` property in the response is false, the returned terms set may be incomplete and should be treated as approximate.\nThis can occur due to a few reasons, such as a request timeout or a node error.\n\nNOTE: The terms enum API may return terms from deleted documents. Deleted documents are initially only marked as deleted. It is not until their segments are merged that documents are actually deleted. Until that happens, the terms enum API will return terms from these documents.", "operationId": "terms-enum", "parameters": [ { @@ -32778,10 +32798,10 @@ }, "post": { "tags": [ - "terms_enum" + "search" ], - "summary": "The terms enum API can be used to discover terms in the index that begin with the provided string", - "description": "It is designed for low-latency look-ups used in auto-complete scenarios.", + "summary": "Get terms in an index", + "description": "Discover terms that match a partial string in an index.\nThis \"terms enum\" API is designed for low-latency look-ups used in auto-complete scenarios.\n\nIf the `complete` property in the response is false, the returned terms set may be incomplete and should be treated as approximate.\nThis can occur due to a few reasons, such as a request timeout or a node error.\n\nNOTE: The terms enum API may return terms from deleted documents. Deleted documents are initially only marked as deleted. It is not until their segments are merged that documents are actually deleted. Until that happens, the terms enum API will return terms from these documents.", "operationId": "terms-enum-1", "parameters": [ { diff --git a/output/openapi/elasticsearch-serverless-openapi.json b/output/openapi/elasticsearch-serverless-openapi.json index 5d4f69607f..0d7c0e5924 100644 --- a/output/openapi/elasticsearch-serverless-openapi.json +++ b/output/openapi/elasticsearch-serverless-openapi.json @@ -1223,9 +1223,13 @@ "/_search/scroll": { "get": { "tags": [ - "scroll" + "search" ], - "summary": "Allows to retrieve a large numbers of results from a single search request", + "summary": "Run a scrolling search", + "description": "IMPORTANT: The scroll API is no longer recommend for deep pagination. If you need to preserve the index state while paging through more than 10,000 hits, use the `search_after` parameter with a point in time (PIT).\n\nThe scroll API gets large sets of results from a single scrolling search request.\nTo get the necessary scroll ID, submit a search API request that includes an argument for the `scroll` query parameter.\nThe `scroll` parameter indicates how long Elasticsearch should retain the search context for the request.\nThe search response returns a scroll ID in the `_scroll_id` response body parameter.\nYou can then use the scroll ID with the scroll API to retrieve the next batch of results for the request.\nIf the Elasticsearch security features are enabled, the access to the results of a specific scroll ID is restricted to the user or API key that submitted the search.\n\nYou can also use the scroll API to specify a new scroll parameter that extends or shortens the retention period for the search context.\n\nIMPORTANT: Results from a scrolling search reflect the state of the index at the time of the initial search request. Subsequent indexing or document changes only affect later search and scroll requests.", + "externalDocs": { + "url": "https://www.elastic.co/guide/en/elasticsearch/reference/current/paginate-search-results.html#scroll-search-results" + }, "operationId": "scroll", "parameters": [ { @@ -1249,9 +1253,13 @@ }, "post": { "tags": [ - "scroll" + "search" ], - "summary": "Allows to retrieve a large numbers of results from a single search request", + "summary": "Run a scrolling search", + "description": "IMPORTANT: The scroll API is no longer recommend for deep pagination. If you need to preserve the index state while paging through more than 10,000 hits, use the `search_after` parameter with a point in time (PIT).\n\nThe scroll API gets large sets of results from a single scrolling search request.\nTo get the necessary scroll ID, submit a search API request that includes an argument for the `scroll` query parameter.\nThe `scroll` parameter indicates how long Elasticsearch should retain the search context for the request.\nThe search response returns a scroll ID in the `_scroll_id` response body parameter.\nYou can then use the scroll ID with the scroll API to retrieve the next batch of results for the request.\nIf the Elasticsearch security features are enabled, the access to the results of a specific scroll ID is restricted to the user or API key that submitted the search.\n\nYou can also use the scroll API to specify a new scroll parameter that extends or shortens the retention period for the search context.\n\nIMPORTANT: Results from a scrolling search reflect the state of the index at the time of the initial search request. Subsequent indexing or document changes only affect later search and scroll requests.", + "externalDocs": { + "url": "https://www.elastic.co/guide/en/elasticsearch/reference/current/paginate-search-results.html#scroll-search-results" + }, "operationId": "scroll-1", "parameters": [ { @@ -1292,9 +1300,13 @@ "/_search/scroll/{scroll_id}": { "get": { "tags": [ - "scroll" + "search" ], - "summary": "Allows to retrieve a large numbers of results from a single search request", + "summary": "Run a scrolling search", + "description": "IMPORTANT: The scroll API is no longer recommend for deep pagination. If you need to preserve the index state while paging through more than 10,000 hits, use the `search_after` parameter with a point in time (PIT).\n\nThe scroll API gets large sets of results from a single scrolling search request.\nTo get the necessary scroll ID, submit a search API request that includes an argument for the `scroll` query parameter.\nThe `scroll` parameter indicates how long Elasticsearch should retain the search context for the request.\nThe search response returns a scroll ID in the `_scroll_id` response body parameter.\nYou can then use the scroll ID with the scroll API to retrieve the next batch of results for the request.\nIf the Elasticsearch security features are enabled, the access to the results of a specific scroll ID is restricted to the user or API key that submitted the search.\n\nYou can also use the scroll API to specify a new scroll parameter that extends or shortens the retention period for the search context.\n\nIMPORTANT: Results from a scrolling search reflect the state of the index at the time of the initial search request. Subsequent indexing or document changes only affect later search and scroll requests.", + "externalDocs": { + "url": "https://www.elastic.co/guide/en/elasticsearch/reference/current/paginate-search-results.html#scroll-search-results" + }, "operationId": "scroll-2", "parameters": [ { @@ -1321,9 +1333,13 @@ }, "post": { "tags": [ - "scroll" + "search" ], - "summary": "Allows to retrieve a large numbers of results from a single search request", + "summary": "Run a scrolling search", + "description": "IMPORTANT: The scroll API is no longer recommend for deep pagination. If you need to preserve the index state while paging through more than 10,000 hits, use the `search_after` parameter with a point in time (PIT).\n\nThe scroll API gets large sets of results from a single scrolling search request.\nTo get the necessary scroll ID, submit a search API request that includes an argument for the `scroll` query parameter.\nThe `scroll` parameter indicates how long Elasticsearch should retain the search context for the request.\nThe search response returns a scroll ID in the `_scroll_id` response body parameter.\nYou can then use the scroll ID with the scroll API to retrieve the next batch of results for the request.\nIf the Elasticsearch security features are enabled, the access to the results of a specific scroll ID is restricted to the user or API key that submitted the search.\n\nYou can also use the scroll API to specify a new scroll parameter that extends or shortens the retention period for the search context.\n\nIMPORTANT: Results from a scrolling search reflect the state of the index at the time of the initial search request. Subsequent indexing or document changes only affect later search and scroll requests.", + "externalDocs": { + "url": "https://www.elastic.co/guide/en/elasticsearch/reference/current/paginate-search-results.html#scroll-search-results" + }, "operationId": "scroll-3", "parameters": [ { @@ -13874,9 +13890,10 @@ "/_msearch": { "get": { "tags": [ - "msearch" + "search" ], - "summary": "Allows to execute several search operations in one request", + "summary": "Run multiple searches", + "description": "The format of the request is similar to the bulk API format and makes use of the newline delimited JSON (NDJSON) format.\nThe structure is as follows:\n\n```\nheader\\n\nbody\\n\nheader\\n\nbody\\n\n```\n\nThis structure is specifically optimized to reduce parsing if a specific search ends up redirected to another node.\n\nIMPORTANT: The final line of data must end with a newline character `\\n`.\nEach newline character may be preceded by a carriage return `\\r`.\nWhen sending requests to this endpoint the `Content-Type` header should be set to `application/x-ndjson`.", "operationId": "msearch", "parameters": [ { @@ -13931,9 +13948,10 @@ }, "post": { "tags": [ - "msearch" + "search" ], - "summary": "Allows to execute several search operations in one request", + "summary": "Run multiple searches", + "description": "The format of the request is similar to the bulk API format and makes use of the newline delimited JSON (NDJSON) format.\nThe structure is as follows:\n\n```\nheader\\n\nbody\\n\nheader\\n\nbody\\n\n```\n\nThis structure is specifically optimized to reduce parsing if a specific search ends up redirected to another node.\n\nIMPORTANT: The final line of data must end with a newline character `\\n`.\nEach newline character may be preceded by a carriage return `\\r`.\nWhen sending requests to this endpoint the `Content-Type` header should be set to `application/x-ndjson`.", "operationId": "msearch-1", "parameters": [ { @@ -13990,9 +14008,10 @@ "/{index}/_msearch": { "get": { "tags": [ - "msearch" + "search" ], - "summary": "Allows to execute several search operations in one request", + "summary": "Run multiple searches", + "description": "The format of the request is similar to the bulk API format and makes use of the newline delimited JSON (NDJSON) format.\nThe structure is as follows:\n\n```\nheader\\n\nbody\\n\nheader\\n\nbody\\n\n```\n\nThis structure is specifically optimized to reduce parsing if a specific search ends up redirected to another node.\n\nIMPORTANT: The final line of data must end with a newline character `\\n`.\nEach newline character may be preceded by a carriage return `\\r`.\nWhen sending requests to this endpoint the `Content-Type` header should be set to `application/x-ndjson`.", "operationId": "msearch-2", "parameters": [ { @@ -14050,9 +14069,10 @@ }, "post": { "tags": [ - "msearch" + "search" ], - "summary": "Allows to execute several search operations in one request", + "summary": "Run multiple searches", + "description": "The format of the request is similar to the bulk API format and makes use of the newline delimited JSON (NDJSON) format.\nThe structure is as follows:\n\n```\nheader\\n\nbody\\n\nheader\\n\nbody\\n\n```\n\nThis structure is specifically optimized to reduce parsing if a specific search ends up redirected to another node.\n\nIMPORTANT: The final line of data must end with a newline character `\\n`.\nEach newline character may be preceded by a carriage return `\\r`.\nWhen sending requests to this endpoint the `Content-Type` header should be set to `application/x-ndjson`.", "operationId": "msearch-3", "parameters": [ { @@ -18128,10 +18148,10 @@ "/{index}/_terms_enum": { "get": { "tags": [ - "terms_enum" + "search" ], - "summary": "The terms enum API can be used to discover terms in the index that begin with the provided string", - "description": "It is designed for low-latency look-ups used in auto-complete scenarios.", + "summary": "Get terms in an index", + "description": "Discover terms that match a partial string in an index.\nThis \"terms enum\" API is designed for low-latency look-ups used in auto-complete scenarios.\n\nIf the `complete` property in the response is false, the returned terms set may be incomplete and should be treated as approximate.\nThis can occur due to a few reasons, such as a request timeout or a node error.\n\nNOTE: The terms enum API may return terms from deleted documents. Deleted documents are initially only marked as deleted. It is not until their segments are merged that documents are actually deleted. Until that happens, the terms enum API will return terms from these documents.", "operationId": "terms-enum", "parameters": [ { @@ -18150,10 +18170,10 @@ }, "post": { "tags": [ - "terms_enum" + "search" ], - "summary": "The terms enum API can be used to discover terms in the index that begin with the provided string", - "description": "It is designed for low-latency look-ups used in auto-complete scenarios.", + "summary": "Get terms in an index", + "description": "Discover terms that match a partial string in an index.\nThis \"terms enum\" API is designed for low-latency look-ups used in auto-complete scenarios.\n\nIf the `complete` property in the response is false, the returned terms set may be incomplete and should be treated as approximate.\nThis can occur due to a few reasons, such as a request timeout or a node error.\n\nNOTE: The terms enum API may return terms from deleted documents. Deleted documents are initially only marked as deleted. It is not until their segments are merged that documents are actually deleted. Until that happens, the terms enum API will return terms from these documents.", "operationId": "terms-enum-1", "parameters": [ { diff --git a/output/schema/schema.json b/output/schema/schema.json index d43d60009a..4c767cfb81 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -12763,7 +12763,8 @@ "stability": "stable" } }, - "description": "Allows to execute several search operations in one request.", + "description": "Run multiple searches.\n\nThe format of the request is similar to the bulk API format and makes use of the newline delimited JSON (NDJSON) format.\nThe structure is as follows:\n\n```\nheader\\n\nbody\\n\nheader\\n\nbody\\n\n```\n\nThis structure is specifically optimized to reduce parsing if a specific search ends up redirected to another node.\n\nIMPORTANT: The final line of data must end with a newline character `\\n`.\nEach newline character may be preceded by a carriage return `\\r`.\nWhen sending requests to this endpoint the `Content-Type` header should be set to `application/x-ndjson`.", + "docTag": "search", "docUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/master/search-multi-search.html", "name": "msearch", "privileges": { @@ -14243,8 +14244,11 @@ "stability": "stable" } }, - "description": "Allows to retrieve a large numbers of results from a single search request.", + "description": "Run a scrolling search.\n\nIMPORTANT: The scroll API is no longer recommend for deep pagination. If you need to preserve the index state while paging through more than 10,000 hits, use the `search_after` parameter with a point in time (PIT).\n\nThe scroll API gets large sets of results from a single scrolling search request.\nTo get the necessary scroll ID, submit a search API request that includes an argument for the `scroll` query parameter.\nThe `scroll` parameter indicates how long Elasticsearch should retain the search context for the request.\nThe search response returns a scroll ID in the `_scroll_id` response body parameter.\nYou can then use the scroll ID with the scroll API to retrieve the next batch of results for the request.\nIf the Elasticsearch security features are enabled, the access to the results of a specific scroll ID is restricted to the user or API key that submitted the search.\n\nYou can also use the scroll API to specify a new scroll parameter that extends or shortens the retention period for the search context.\n\nIMPORTANT: Results from a scrolling search reflect the state of the index at the time of the initial search request. Subsequent indexing or document changes only affect later search and scroll requests.", + "docTag": "search", "docUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/master/search-request-body.html#request-body-search-scroll", + "extDocId": "scroll-search-results", + "extDocUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/paginate-search-results.html#scroll-search-results", "name": "scroll", "request": { "name": "Request", @@ -18952,7 +18956,8 @@ "stability": "stable" } }, - "description": "The terms enum API can be used to discover terms in the index that begin with the provided string. It is designed for low-latency look-ups used in auto-complete scenarios.", + "description": "Get terms in an index.\n\nDiscover terms that match a partial string in an index.\nThis \"terms enum\" API is designed for low-latency look-ups used in auto-complete scenarios.\n\nIf the `complete` property in the response is false, the returned terms set may be incomplete and should be treated as approximate.\nThis can occur due to a few reasons, such as a request timeout or a node error.\n\nNOTE: The terms enum API may return terms from deleted documents. Deleted documents are initially only marked as deleted. It is not until their segments are merged that documents are actually deleted. Until that happens, the terms enum API will return terms from these documents.", + "docTag": "search", "docUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/current/search-terms-enum.html", "name": "terms_enum", "request": { @@ -28214,7 +28219,7 @@ } } }, - "description": "Allows to execute several search operations in one request.", + "description": "Run multiple searches.\n\nThe format of the request is similar to the bulk API format and makes use of the newline delimited JSON (NDJSON) format.\nThe structure is as follows:\n\n```\nheader\\n\nbody\\n\nheader\\n\nbody\\n\n```\n\nThis structure is specifically optimized to reduce parsing if a specific search ends up redirected to another node.\n\nIMPORTANT: The final line of data must end with a newline character `\\n`.\nEach newline character may be preceded by a carriage return `\\r`.\nWhen sending requests to this endpoint the `Content-Type` header should be set to `application/x-ndjson`.", "inherits": { "type": { "name": "RequestBase", @@ -28405,7 +28410,7 @@ } } ], - "specLocation": "_global/msearch/MultiSearchRequest.ts#L25-L106" + "specLocation": "_global/msearch/MultiSearchRequest.ts#L25-L124" }, { "kind": "type_alias", @@ -31783,7 +31788,7 @@ } ] }, - "description": "Allows to retrieve a large numbers of results from a single search request.", + "description": "Run a scrolling search.\n\nIMPORTANT: The scroll API is no longer recommend for deep pagination. If you need to preserve the index state while paging through more than 10,000 hits, use the `search_after` parameter with a point in time (PIT).\n\nThe scroll API gets large sets of results from a single scrolling search request.\nTo get the necessary scroll ID, submit a search API request that includes an argument for the `scroll` query parameter.\nThe `scroll` parameter indicates how long Elasticsearch should retain the search context for the request.\nThe search response returns a scroll ID in the `_scroll_id` response body parameter.\nYou can then use the scroll ID with the scroll API to retrieve the next batch of results for the request.\nIf the Elasticsearch security features are enabled, the access to the results of a specific scroll ID is restricted to the user or API key that submitted the search.\n\nYou can also use the scroll API to specify a new scroll parameter that extends or shortens the retention period for the search context.\n\nIMPORTANT: Results from a scrolling search reflect the state of the index at the time of the initial search request. Subsequent indexing or document changes only affect later search and scroll requests.", "inherits": { "type": { "name": "RequestBase", @@ -31858,7 +31863,7 @@ } } ], - "specLocation": "_global/scroll/ScrollRequest.ts#L24-L59" + "specLocation": "_global/scroll/ScrollRequest.ts#L24-L75" }, { "kind": "response", @@ -40305,7 +40310,7 @@ } ] }, - "description": "The terms enum API can be used to discover terms in the index that begin with the provided string. It is designed for low-latency look-ups used in auto-complete scenarios.", + "description": "Get terms in an index.\n\nDiscover terms that match a partial string in an index.\nThis \"terms enum\" API is designed for low-latency look-ups used in auto-complete scenarios.\n\nIf the `complete` property in the response is false, the returned terms set may be incomplete and should be treated as approximate.\nThis can occur due to a few reasons, such as a request timeout or a node error.\n\nNOTE: The terms enum API may return terms from deleted documents. Deleted documents are initially only marked as deleted. It is not until their segments are merged that documents are actually deleted. Until that happens, the terms enum API will return terms from these documents.", "inherits": { "type": { "name": "RequestBase", @@ -40331,7 +40336,7 @@ } ], "query": [], - "specLocation": "_global/terms_enum/TermsEnumRequest.ts#L26-L65" + "specLocation": "_global/terms_enum/TermsEnumRequest.ts#L26-L75" }, { "kind": "response", diff --git a/specification/_global/msearch/MultiSearchRequest.ts b/specification/_global/msearch/MultiSearchRequest.ts index 5c5aa55af4..8e396c271b 100644 --- a/specification/_global/msearch/MultiSearchRequest.ts +++ b/specification/_global/msearch/MultiSearchRequest.ts @@ -23,10 +23,28 @@ import { long } from '@_types/Numeric' import { RequestItem } from './types' /** + * Run multiple searches. + * + * The format of the request is similar to the bulk API format and makes use of the newline delimited JSON (NDJSON) format. + * The structure is as follows: + * + * ``` + * header\n + * body\n + * header\n + * body\n + * ``` + * + * This structure is specifically optimized to reduce parsing if a specific search ends up redirected to another node. + * + * IMPORTANT: The final line of data must end with a newline character `\n`. + * Each newline character may be preceded by a carriage return `\r`. + * When sending requests to this endpoint the `Content-Type` header should be set to `application/x-ndjson`. * @rest_spec_name msearch * @availability stack since=1.3.0 stability=stable * @availability serverless stability=stable visibility=public * @index_privileges read + * @doc_tag search */ export interface Request extends RequestBase { path_parts: { diff --git a/specification/_global/scroll/ScrollRequest.ts b/specification/_global/scroll/ScrollRequest.ts index 85c85bf6b6..6643e5884f 100644 --- a/specification/_global/scroll/ScrollRequest.ts +++ b/specification/_global/scroll/ScrollRequest.ts @@ -22,9 +22,25 @@ import { ScrollId } from '@_types/common' import { Duration } from '@_types/Time' /** + * Run a scrolling search. + * + * IMPORTANT: The scroll API is no longer recommend for deep pagination. If you need to preserve the index state while paging through more than 10,000 hits, use the `search_after` parameter with a point in time (PIT). + * + * The scroll API gets large sets of results from a single scrolling search request. + * To get the necessary scroll ID, submit a search API request that includes an argument for the `scroll` query parameter. + * The `scroll` parameter indicates how long Elasticsearch should retain the search context for the request. + * The search response returns a scroll ID in the `_scroll_id` response body parameter. + * You can then use the scroll ID with the scroll API to retrieve the next batch of results for the request. + * If the Elasticsearch security features are enabled, the access to the results of a specific scroll ID is restricted to the user or API key that submitted the search. + * + * You can also use the scroll API to specify a new scroll parameter that extends or shortens the retention period for the search context. + * + * IMPORTANT: Results from a scrolling search reflect the state of the index at the time of the initial search request. Subsequent indexing or document changes only affect later search and scroll requests. * @rest_spec_name scroll * @availability stack stability=stable * @availability serverless stability=stable visibility=public + * @doc_tag search + * @ext_doc_id scroll-search-results */ export interface Request extends RequestBase { path_parts: { diff --git a/specification/_global/terms_enum/TermsEnumRequest.ts b/specification/_global/terms_enum/TermsEnumRequest.ts index 68ffaa3fbf..c2aae9ee99 100644 --- a/specification/_global/terms_enum/TermsEnumRequest.ts +++ b/specification/_global/terms_enum/TermsEnumRequest.ts @@ -24,9 +24,19 @@ import { QueryContainer } from '@_types/query_dsl/abstractions' import { Duration } from '@_types/Time' /** + * Get terms in an index. + * + * Discover terms that match a partial string in an index. + * This "terms enum" API is designed for low-latency look-ups used in auto-complete scenarios. + * + * If the `complete` property in the response is false, the returned terms set may be incomplete and should be treated as approximate. + * This can occur due to a few reasons, such as a request timeout or a node error. + * + * NOTE: The terms enum API may return terms from deleted documents. Deleted documents are initially only marked as deleted. It is not until their segments are merged that documents are actually deleted. Until that happens, the terms enum API will return terms from these documents. * @rest_spec_name terms_enum * @availability stack since=7.14.0 stability=stable * @availability serverless stability=stable visibility=public + * @doc_tag search */ export interface Request extends RequestBase { path_parts: {