Skip to content

[DOCS] Adds descriptions to index APIs (A-F) #2226

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 12 commits into from
Aug 4, 2023
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
312 changes: 206 additions & 106 deletions output/schema/schema.json

Large diffs are not rendered by default.

8 changes: 8 additions & 0 deletions specification/_doc_ids/table.csv
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ cluster-nodes-hot-threads,https://www.elastic.co/guide/en/elasticsearch/referenc
cluster-nodes-info,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/cluster-nodes-info.html
cluster-nodes-stats,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/cluster-nodes-stats.html
cluster-nodes-usage,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/cluster-nodes-usage.html
indices-downsample-data-stream,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/indices-downsample-data-stream.html
search-count,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/search-count.html
docs-index_,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/docs-index_.html
modules-gateway-dangling-indices,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/modules-gateway-dangling-indices.html
Expand Down Expand Up @@ -98,6 +99,7 @@ index-modules-blocks,https://www.elastic.co/guide/en/elasticsearch/reference/{br
indices-analyze,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/indices-analyze.html
indices-clearcache,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/indices-clearcache.html
indices-clone-index,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/indices-clone-index.html
indices-close,https://www.elastic.co/guide/en/elasticsearch/reference{branch}/indices-close.html
indices-open-close,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/indices-open-close.html
indices-create-index,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/indices-create-index.html
data-streams,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/data-streams.html
Expand Down Expand Up @@ -146,6 +148,7 @@ logstash-api-delete-pipeline,https://www.elastic.co/guide/en/elasticsearch/refer
logstash-api-get-pipeline,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/logstash-api-get-pipeline.html
logstash-api-put-pipeline,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/logstash-api-put-pipeline.html
docs-multi-get,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/docs-multi-get.html
mapping,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/mapping.html
migration-api-deprecation,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/migration-api-deprecation.html
migration-api-feature-upgrade,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/migration-api-feature-upgrade.html
ml-close-job,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/ml-close-job.html
Expand Down Expand Up @@ -352,7 +355,12 @@ search-aggregations-bucket-categorize-text-aggregation,https://www.elastic.co/gu
search-aggregations-bucket-significantterms-aggregation,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/search-aggregations-bucket-significantterms-aggregation.html
search-aggregations-pipeline-bucket-path,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/search-aggregations-pipeline.html#buckets-path-syntax
ml-feature-importance,https://www.elastic.co/guide/en/machine-learning/{branch}/ml-feature-importance.html
analysis-analyzers,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/analysis-analyzers.html
analysis-charfilters,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/analysis-charfilters.html
analysis-normalizers,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/analysis-normalizers.html
analysis-standard-analyzer,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/analysis-standard-analyzer.html
analysis-tokenfilters,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/analysis-tokenfilters.html
analysis-tokenizers,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/analysis-tokenizers.html
geo-shape,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/geo-shape.html
shape,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/shape.html
mapping-meta-field,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/mapping-meta-field.html
Expand Down
23 changes: 23 additions & 0 deletions specification/indices/_types/Alias.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,33 @@ import { Routing } from '@_types/common'
import { QueryContainer } from '@_types/query_dsl/abstractions'

export class Alias {
/**
* Query used to limit documents the alias can access.
*/
filter?: QueryContainer
/**
* Value used to route indexing operations to a specific shard.
* If specified, this overwrites the `routing` value for indexing operations.
*/
index_routing?: Routing
/**
* If `true`, the alias is hidden.
* All indices for the alias must have the same `is_hidden` value.
* @server_default false
*/
is_hidden?: boolean
/**
* If `true`, the index is the write index for the alias.
* @server_default false
*/
is_write_index?: boolean
/**
* Value used to route indexing and search operations to a specific shard.
*/
routing?: Routing
/**
* Value used to route search operations to a specific shard.
* If specified, this overwrites the `routing` value for search operations.
*/
search_routing?: Routing
}
21 changes: 21 additions & 0 deletions specification/indices/_types/AliasDefinition.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,33 @@
import { QueryContainer } from '@_types/query_dsl/abstractions'

export class AliasDefinition {
/**
* Query used to limit documents the alias can access.
*/
filter?: QueryContainer
/**
* Value used to route indexing operations to a specific shard.
* If specified, this overwrites the `routing` value for indexing operations.
*/
index_routing?: string
/**
* If `true`, the index is the write index for the alias.
* @server_default false
*/
is_write_index?: boolean
/**
* Value used to route indexing and search operations to a specific shard.
*/
routing?: string
/**
* Value used to route search operations to a specific shard.
* If specified, this overwrites the `routing` value for search operations.
*/
search_routing?: string
/**
* If `true`, the alias is hidden.
* All indices for the alias must have the same `is_hidden` value.
* @server_default false
* @availability stack since=7.16.0
* @availability serverless
*/
Expand Down
3 changes: 3 additions & 0 deletions specification/indices/_types/Downsample.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,8 @@
import { DurationLarge } from '@_types/Time'

export class DownsampleConfig {
/**
* The interval at which to aggregate the original time series index.
*/
fixed_interval: DurationLarge
}
45 changes: 45 additions & 0 deletions specification/indices/analyze/IndicesAnalyzeRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,23 +25,68 @@ import { Field, IndexName } from '@_types/common'
import { TextToAnalyze } from './types'

/**
* Performs analysis on a text string and returns the resulting tokens.
* @doc_id indices-analyze
* @rest_spec_name indices.analyze
* @availability stack since=0.0.0 stability=stable
* @availability serverless stability=stable visibility=public
*/
export interface Request extends RequestBase {
path_parts: {
/**
* Index used to derive the analyzer.
* If specified, the `analyzer` or field parameter overrides this value.
* If no index is specified or the index does not have a default analyzer, the analyze API uses the standard analyzer.
* @doc_id analysis-standard-analyzer
*/
index?: IndexName
}
body: {
/**
* The name of the analyzer that should be applied to the provided `text`.
* This could be a built-in analyzer, or an analyzer that’s been configured in the index.
* @doc_id analysis-analyzers
*/
analyzer?: string
/**
* Array of token attributes used to filter the output of the `explain` parameter.
*/
attributes?: string[]
/**
* Array of character filters used to preprocess characters before the tokenizer.
* @doc_id analysis-charfilters
*/
char_filter?: Array<CharFilter>
/**
* If `true`, the response includes token attributes and additional details.
* @server_default false
*/
explain?: boolean
/**
* Field used to derive the analyzer.
* To use this parameter, you must specify an index.
* If specified, the `analyzer` parameter overrides this value.
*/
field?: Field
/**
* Array of token filters used to apply after the tokenizer.
* @doc_id analysis-tokenfilters
*/
filter?: Array<TokenFilter>
/**
* Normalizer to use to convert text into a single token.
* @doc_id analysis-normalizers
*/
normalizer?: string
/**
* Text to analyze.
* If an array of strings is provided, it is analyzed as a multi-value field.
*/
text?: TextToAnalyze
/**
* Tokenizer to use to convert text into tokens.
* @doc_id analysis-tokenizers
*/
tokenizer?: Tokenizer
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,20 +21,56 @@ import { RequestBase } from '@_types/Base'
import { ExpandWildcards, Fields, Indices } from '@_types/common'

/**
* Clears the caches of one or more indices.
* For data streams, the API clears the caches of the stream’s backing indices.
* @rest_spec_name indices.clear_cache
* @availability stack since=0.0.0 stability=stable
*/
export interface Request extends RequestBase {
path_parts: {
/**
* Comma-separated list of data streams, indices, and aliases used to limit the request.
* Supports wildcards (`*`).
* To target all data streams and indices, omit this parameter or use `*` or `_all`.
*/
index?: Indices
}
query_parameters: {
/**
* If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices.
* This behavior applies even if the request targets other open indices.
* @server_default true
*/
allow_no_indices?: boolean
/**
* Type of index that wildcard patterns can match.
* If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.
* Supports comma-separated values, such as `open,hidden`.
* Valid values are: `all`, `open`, `closed`, `hidden`, `none`.
* @server_default open
*/
expand_wildcards?: ExpandWildcards
/**
* If `true`, clears the fields cache.
* Use the `fields` parameter to clear the cache of specific fields only.
*/
fielddata?: boolean
/**
* Comma-separated list of field names used to limit the `fielddata` parameter.
*/
fields?: Fields
/**
* If `false`, the request returns an error if it targets a missing or closed index.
* @server_default false
*/
ignore_unavailable?: boolean
/**
* If `true`, clears the query cache.
*/
query?: boolean
/**
* If `true`, clears the request cache.
*/
request?: boolean
}
}
30 changes: 30 additions & 0 deletions specification/indices/clone/IndicesCloneRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,21 +25,51 @@ import { IndexName, Name, WaitForActiveShards } from '@_types/common'
import { Duration } from '@_types/Time'

/**
* Clones an existing index.
* @rest_spec_name indices.clone
* @availability stack since=7.4.0 stability=stable
*/
export interface Request extends RequestBase {
path_parts: {
/**
* Name of the source index to clone.
*/
index: IndexName
/**
* Name of the target index to create.
* @doc_id indices-clone-index
*/
target: Name
}
query_parameters: {
/**
* Period to wait for a connection to the master node.
* If no response is received before the timeout expires, the request fails and returns an error.
* @server_default 30s
*/
master_timeout?: Duration
/**
* Period to wait for a response.
* If no response is received before the timeout expires, the request fails and returns an error.
* @server_default 30s
*/
timeout?: Duration
/**
* The number of shard copies that must be active before proceeding with the operation.
* Set to `all` or any positive integer up to the total number of shards in the index (`number_of_replicas+1`).
* @server_default 1
*/
wait_for_active_shards?: WaitForActiveShards
}
body: {
/**
* Aliases for the resulting index.
*/
aliases?: Dictionary<IndexName, Alias>
/**
* Configuration options for the target index.
* @doc_id index-modules-settings
*/
settings?: Dictionary<string, UserDefinedValue>
}
}
36 changes: 36 additions & 0 deletions specification/indices/close/CloseIndexRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,20 +22,56 @@ import { ExpandWildcards, Indices, WaitForActiveShards } from '@_types/common'
import { Duration } from '@_types/Time'

/**
* Closes an index.
* @doc_id indices-close
* @rest_spec_name indices.close
* @availability stack since=0.0.0 stability=stable
* @availability serverless stability=stable visibility=private
*/
export interface Request extends RequestBase {
path_parts: {
/**
* Comma-separated list or wildcard expression of index names used to limit the request.
*/
index: Indices
}
query_parameters: {
/**
* If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices.
* This behavior applies even if the request targets other open indices.
* @server_default true
*/
allow_no_indices?: boolean
/**
* Type of index that wildcard patterns can match.
* If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.
* Supports comma-separated values, such as `open,hidden`.
* Valid values are: `all`, `open`, `closed`, `hidden`, `none`.
* @server_default open
*/
expand_wildcards?: ExpandWildcards
/**
* If `false`, the request returns an error if it targets a missing or closed index.
* @server_default false
*/
ignore_unavailable?: boolean
/**
* Period to wait for a connection to the master node.
* If no response is received before the timeout expires, the request fails and returns an error.
* @server_default 30s
*/
master_timeout?: Duration
/**
* Period to wait for a response.
* If no response is received before the timeout expires, the request fails and returns an error.
* @server_default 30s
*/
timeout?: Duration
/**
* The number of shard copies that must be active before proceeding with the operation.
* Set to `all` or any positive integer up to the total number of shards in the index (`number_of_replicas+1`).
* @server_default 1
*/
wait_for_active_shards?: WaitForActiveShards
}
}
Loading