Skip to content

[Backport 8.16] [OpenAPI] Edit search API summaries #3100

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Nov 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
143 changes: 92 additions & 51 deletions output/openapi/elasticsearch-openapi.json

Large diffs are not rendered by default.

125 changes: 80 additions & 45 deletions output/openapi/elasticsearch-serverless-openapi.json

Large diffs are not rendered by default.

106 changes: 55 additions & 51 deletions output/schema/schema.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions specification/_doc_ids/table.csv
Original file line number Diff line number Diff line change
Expand Up @@ -531,6 +531,7 @@ search-validate,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}
search-vector-tile-api,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/search-vector-tile-api.html
searchable-snapshots-api-mount-snapshot,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/searchable-snapshots-api-mount-snapshot.html
searchable-snapshots-apis,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/searchable-snapshots-apis.html
search-templates,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/search-template.html
secure-settings,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/secure-settings.html
security-api-authenticate,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/security-api-authenticate.html
security-api-change-password,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/security-api-change-password.html
Expand Down
4 changes: 3 additions & 1 deletion specification/_global/clear_scroll/ClearScrollRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ import { RequestBase } from '@_types/Base'
import { ScrollIds } from '@_types/common'

/**
* Clears the search context and results for a scrolling search.
* Clear a scrolling search.
*
* Clear the search context and results for a scrolling search.
* @rest_spec_name clear_scroll
* @availability stack stability=stable
* @availability serverless stability=stable visibility=public
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,12 @@ import { RequestBase } from '@_types/Base'
import { Id } from '@_types/common'

/**
* Closes a point-in-time.
* Close a point in time.
*
* A point in time must be opened explicitly before being used in search requests.
* The `keep_alive` parameter tells Elasticsearch how long it should persist.
* A point in time is automatically closed when the `keep_alive` period has elapsed.
* However, keeping points in time has a cost; close them as soon as they are no longer required for search requests.
* @rest_spec_name close_point_in_time
* @availability stack since=7.10.0 stability=stable
* @availability serverless stability=stable visibility=public
Expand Down
10 changes: 7 additions & 3 deletions specification/_global/field_caps/FieldCapabilitiesRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,13 @@ import { RuntimeFields } from '@_types/mapping/RuntimeFields'
import { QueryContainer } from '@_types/query_dsl/abstractions'

/**
* The field capabilities API returns the information about the capabilities of fields among multiple indices.
* The field capabilities API returns runtime fields like any other field. For example, a runtime field with a type
* of keyword is returned as any other field that belongs to the `keyword` family.
* Get the field capabilities.
*
* Get information about the capabilities of fields among multiple indices.
*
* For data streams, the API returns field capabilities among the stream’s backing indices.
* It returns runtime fields like any other field.
* For example, a runtime field with a type of keyword is returned the same as any other field that belongs to the `keyword` family.
* @rest_spec_name field_caps
* @availability stack since=5.4.0 stability=stable
* @availability serverless stability=stable visibility=public
Expand Down
13 changes: 13 additions & 0 deletions specification/_global/knn_search/KnnSearchRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,19 @@ import { FieldAndFormat, QueryContainer } from '@_types/query_dsl/abstractions'
import { Query } from './_types/Knn'

/**
* Run a knn search.
*
* NOTE: The kNN search API has been replaced by the `knn` option in the search API.
*
* Perform a k-nearest neighbor (kNN) search on a dense_vector field and return the matching documents.
* Given a query vector, the API finds the k closest vectors and returns those documents as search hits.
*
* Elasticsearch uses the HNSW algorithm to support efficient kNN search.
* Like most kNN algorithms, HNSW is an approximate method that sacrifices result accuracy for improved search speed.
* This means the results returned are not always the true k closest neighbors.
*
* The kNN search API supports restricting the search using a filter.
* The search will return the top k documents that also match the filter query.
* @rest_spec_name knn_search
* @availability stack since=8.0.0 stability=experimental
* @deprecated 8.4.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,13 @@ import { long } from '@_types/Numeric'
import { RequestItem } from './types'

/**
* Runs multiple templated searches with a single request.
* Run multiple templated searches.
* @rest_spec_name msearch_template
* @availability stack since=5.0.0 stability=stable
* @availability serverless stability=stable visibility=public
* @index_privileges read
* @doc_tag search
* @ext_doc_id search-templates
*/
export interface Request extends RequestBase {
path_parts: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,17 @@ import { QueryContainer } from '@_types/query_dsl/abstractions'
import { Duration } from '@_types/Time'

/**
* A search request by default executes against the most recent visible data of the target indices,
* Open a point in time.
*
* A search request by default runs against the most recent visible data of the target indices,
* which is called point in time. Elasticsearch pit (point in time) is a lightweight view into the
* state of the data as it existed when initiated. In some cases, it’s preferred to perform multiple
* search requests using the same point in time. For example, if refreshes happen between
* `search_after` requests, then the results of those requests might not be consistent as changes happening
* between searches are only visible to the more recent point in time.
*
* A point in time must be opened explicitly before being used in search requests.
* The `keep_alive` parameter tells Elasticsearch how long it should persist.
* @rest_spec_name open_point_in_time
* @availability stack since=7.10.0 stability=stable
* @availability serverless stability=stable visibility=public
Expand Down
4 changes: 3 additions & 1 deletion specification/_global/rank_eval/RankEvalRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ import { ExpandWildcards, Indices } from '@_types/common'
import { RankEvalMetric, RankEvalRequestItem } from './types'

/**
* Enables you to evaluate the quality of ranked search results over a set of typical search queries.
* Evaluate ranked search results.
*
* Evaluate the quality of ranked search results over a set of typical search queries.
* @rest_spec_name rank_eval
* @availability stack since=6.2.0 stability=stable
* @availability serverless stability=stable visibility=public
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ import { RequestBase } from '@_types/Base'
import { Id } from '@_types/common'

/**
* Renders a search template as a search request body.
* Render a search template.
*
* Render a search template as a search request body.
* @rest_spec_name render_search_template
* @availability stack stability=stable
* @availability serverless stability=stable visibility=public
Expand Down
4 changes: 3 additions & 1 deletion specification/_global/search/SearchRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,9 @@ import { SourceConfig, SourceConfigParam } from './_types/SourceFilter'
import { Suggester } from './_types/suggester'

/**
* Returns search hits that match the query defined in the request.
* Run a search.
*
* Get search hits that match the query defined in the request.
* You can provide search queries using the `q` query string parameter or the request body.
* If both are specified, only the query parameter is used.
* @rest_spec_name search
Expand Down
3 changes: 2 additions & 1 deletion specification/_global/search_mvt/SearchMvtRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ import { ZoomLevel } from './_types/ZoomLevel'

/**
* Search a vector tile.
* Searches a vector tile for geospatial values.
*
* Search a vector tile for geospatial values.
* @rest_spec_name search_mvt
* @availability stack since=7.15.0 stability=stable
* @availability serverless stability=stable visibility=public
Expand Down
5 changes: 5 additions & 0 deletions specification/_global/search_shards/SearchShardsRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ import { RequestBase } from '@_types/Base'
import { ExpandWildcards, Indices, Routing } from '@_types/common'

/**
* Get the search shards.
*
* Get the indices and shards that a search request would be run against.
* This information can be useful for working out issues or planning optimizations with routing and shard preferences.
* When filtered aliases are used, the filter is returned as part of the indices section.
* @rest_spec_name search_shards
* @availability stack stability=stable
* @doc_tag search
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,12 @@ import {
import { Duration } from '@_types/Time'

/**
* Runs a search with a search template.
* Run a search with a search template.
* @rest_spec_name search_template
* @availability stack since=2.0.0 stability=stable
* @availability serverless stability=stable visibility=public
* @doc_tag search
* @ext_doc_id search-template
*/
export interface Request extends RequestBase {
path_parts: {
Expand Down
3 changes: 2 additions & 1 deletion specification/_global/termvectors/TermVectorsRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ import { Filter } from './types'

/**
* Get term vector information.
* Returns information and statistics about terms in the fields of a particular document.
*
* Get information and statistics about terms in the fields of a particular document.
* @rest_spec_name termvectors
* @availability stack stability=stable
* @availability serverless stability=stable visibility=public
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import { Id } from '@_types/common'

/**
* Delete an async search.
*
* If the asynchronous search is still running, it is cancelled.
* Otherwise, the saved search results are deleted.
* If the Elasticsearch security features are enabled, the deletion of a specific async search is restricted to: the authenticated user that submitted the original search request; users that have the `cancel_task` cluster privilege.
Expand Down
1 change: 1 addition & 0 deletions specification/async_search/get/AsyncSearchGetRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import { Duration } from '@_types/Time'

/**
* Get async search results.
*
* Retrieve the results of a previously submitted asynchronous search request.
* If the Elasticsearch security features are enabled, access to the results of a specific async search is restricted to the user or API key that submitted it.
* @rest_spec_name async_search.get
Expand Down
5 changes: 3 additions & 2 deletions specification/async_search/status/AsyncSearchStatusRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,9 @@ import { RequestBase } from '@_types/Base'
import { Id } from '@_types/common'

/**
* Get async search status.
* Retrieve the status of a previously submitted async search request given its identifier, without retrieving search results.
* Get the async search status.
*
* Get the status of a previously submitted async search request given its identifier, without retrieving search results.
* If the Elasticsearch security features are enabled, use of this API is restricted to the `monitoring_user` role.
* @rest_spec_name async_search.status
* @availability stack since=7.11.0 stability=stable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ import { Duration } from '@_types/Time'

/**
* Run an async search.
*
* When the primary sort of the results is an indexed field, shards get sorted based on minimum and maximum value that they hold for that field. Partial results become available following the sort criteria that was requested.
*
* Warning: Asynchronous search does not support scroll or search requests that include only the suggest section.
Expand Down
Loading