From 36dd0ed178de431d4f9e711c0707e05045c59db8 Mon Sep 17 00:00:00 2001 From: Lisa Cawley Date: Wed, 23 Oct 2024 08:34:43 -0700 Subject: [PATCH] [OpenAPI] Edit multi search and scroll API (#3053) (cherry picked from commit e924f0449e9d945d794a924562bd82b7d34c881a) --- .../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 885e7ae97a..4bbdb90f69 100644 --- a/docs/overlays/elasticsearch-shared-overlays.yaml +++ b/docs/overlays/elasticsearch-shared-overlays.yaml @@ -181,12 +181,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 aac893e7f4..388407457b 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": [ { @@ -22284,9 +22300,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": [ { @@ -22341,9 +22358,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": [ { @@ -22400,9 +22418,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": [ { @@ -22460,9 +22479,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": [ { @@ -32605,10 +32625,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": [ { @@ -32627,10 +32647,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 8d90f4b346..0d041cf0ff 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": [ { @@ -13857,9 +13873,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": [ { @@ -13914,9 +13931,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": [ { @@ -13973,9 +13991,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": [ { @@ -14033,9 +14052,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": [ { @@ -18099,10 +18119,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": [ { @@ -18121,10 +18141,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 66ee64b4f5..a8b077209a 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", @@ -18924,7 +18928,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": { @@ -28182,7 +28187,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", @@ -28373,7 +28378,7 @@ } } ], - "specLocation": "_global/msearch/MultiSearchRequest.ts#L25-L106" + "specLocation": "_global/msearch/MultiSearchRequest.ts#L25-L124" }, { "kind": "type_alias", @@ -31751,7 +31756,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", @@ -31826,7 +31831,7 @@ } } ], - "specLocation": "_global/scroll/ScrollRequest.ts#L24-L59" + "specLocation": "_global/scroll/ScrollRequest.ts#L24-L75" }, { "kind": "response", @@ -40271,7 +40276,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", @@ -40297,7 +40302,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: {