Skip to content

Commit eecd532

Browse files
[DOCS] Adds descriptions to index APIs (A-F) (#2226)
Co-authored-by: Abdon Pijpelink <[email protected]>
1 parent 6a340c7 commit eecd532

19 files changed

+632
-128
lines changed

output/schema/schema.json

Lines changed: 206 additions & 106 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

specification/_doc_ids/table.csv

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ cluster-nodes-hot-threads,https://www.elastic.co/guide/en/elasticsearch/referenc
6060
cluster-nodes-info,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/cluster-nodes-info.html
6161
cluster-nodes-stats,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/cluster-nodes-stats.html
6262
cluster-nodes-usage,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/cluster-nodes-usage.html
63+
indices-downsample-data-stream,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/indices-downsample-data-stream.html
6364
search-count,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/search-count.html
6465
docs-index_,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/docs-index_.html
6566
modules-gateway-dangling-indices,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/modules-gateway-dangling-indices.html
@@ -98,6 +99,7 @@ index-modules-blocks,https://www.elastic.co/guide/en/elasticsearch/reference/{br
9899
indices-analyze,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/indices-analyze.html
99100
indices-clearcache,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/indices-clearcache.html
100101
indices-clone-index,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/indices-clone-index.html
102+
indices-close,https://www.elastic.co/guide/en/elasticsearch/reference{branch}/indices-close.html
101103
indices-open-close,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/indices-open-close.html
102104
indices-create-index,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/indices-create-index.html
103105
data-streams,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/data-streams.html
@@ -146,6 +148,7 @@ logstash-api-delete-pipeline,https://www.elastic.co/guide/en/elasticsearch/refer
146148
logstash-api-get-pipeline,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/logstash-api-get-pipeline.html
147149
logstash-api-put-pipeline,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/logstash-api-put-pipeline.html
148150
docs-multi-get,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/docs-multi-get.html
151+
mapping,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/mapping.html
149152
migration-api-deprecation,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/migration-api-deprecation.html
150153
migration-api-feature-upgrade,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/migration-api-feature-upgrade.html
151154
ml-close-job,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/ml-close-job.html
@@ -352,7 +355,12 @@ search-aggregations-bucket-categorize-text-aggregation,https://www.elastic.co/gu
352355
search-aggregations-bucket-significantterms-aggregation,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/search-aggregations-bucket-significantterms-aggregation.html
353356
search-aggregations-pipeline-bucket-path,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/search-aggregations-pipeline.html#buckets-path-syntax
354357
ml-feature-importance,https://www.elastic.co/guide/en/machine-learning/{branch}/ml-feature-importance.html
358+
analysis-analyzers,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/analysis-analyzers.html
359+
analysis-charfilters,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/analysis-charfilters.html
355360
analysis-normalizers,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/analysis-normalizers.html
361+
analysis-standard-analyzer,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/analysis-standard-analyzer.html
362+
analysis-tokenfilters,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/analysis-tokenfilters.html
363+
analysis-tokenizers,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/analysis-tokenizers.html
356364
geo-shape,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/geo-shape.html
357365
shape,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/shape.html
358366
mapping-meta-field,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/mapping-meta-field.html

specification/indices/_types/Alias.ts

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,33 @@ import { Routing } from '@_types/common'
2121
import { QueryContainer } from '@_types/query_dsl/abstractions'
2222

2323
export class Alias {
24+
/**
25+
* Query used to limit documents the alias can access.
26+
*/
2427
filter?: QueryContainer
28+
/**
29+
* Value used to route indexing operations to a specific shard.
30+
* If specified, this overwrites the `routing` value for indexing operations.
31+
*/
2532
index_routing?: Routing
33+
/**
34+
* If `true`, the alias is hidden.
35+
* All indices for the alias must have the same `is_hidden` value.
36+
* @server_default false
37+
*/
2638
is_hidden?: boolean
39+
/**
40+
* If `true`, the index is the write index for the alias.
41+
* @server_default false
42+
*/
2743
is_write_index?: boolean
44+
/**
45+
* Value used to route indexing and search operations to a specific shard.
46+
*/
2847
routing?: Routing
48+
/**
49+
* Value used to route search operations to a specific shard.
50+
* If specified, this overwrites the `routing` value for search operations.
51+
*/
2952
search_routing?: Routing
3053
}

specification/indices/_types/AliasDefinition.ts

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,33 @@
2020
import { QueryContainer } from '@_types/query_dsl/abstractions'
2121

2222
export class AliasDefinition {
23+
/**
24+
* Query used to limit documents the alias can access.
25+
*/
2326
filter?: QueryContainer
27+
/**
28+
* Value used to route indexing operations to a specific shard.
29+
* If specified, this overwrites the `routing` value for indexing operations.
30+
*/
2431
index_routing?: string
32+
/**
33+
* If `true`, the index is the write index for the alias.
34+
* @server_default false
35+
*/
2536
is_write_index?: boolean
37+
/**
38+
* Value used to route indexing and search operations to a specific shard.
39+
*/
2640
routing?: string
41+
/**
42+
* Value used to route search operations to a specific shard.
43+
* If specified, this overwrites the `routing` value for search operations.
44+
*/
2745
search_routing?: string
2846
/**
47+
* If `true`, the alias is hidden.
48+
* All indices for the alias must have the same `is_hidden` value.
49+
* @server_default false
2950
* @availability stack since=7.16.0
3051
* @availability serverless
3152
*/

specification/indices/_types/Downsample.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,8 @@
2020
import { DurationLarge } from '@_types/Time'
2121

2222
export class DownsampleConfig {
23+
/**
24+
* The interval at which to aggregate the original time series index.
25+
*/
2326
fixed_interval: DurationLarge
2427
}

specification/indices/analyze/IndicesAnalyzeRequest.ts

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,23 +25,68 @@ import { Field, IndexName } from '@_types/common'
2525
import { TextToAnalyze } from './types'
2626

2727
/**
28+
* Performs analysis on a text string and returns the resulting tokens.
29+
* @doc_id indices-analyze
2830
* @rest_spec_name indices.analyze
2931
* @availability stack since=0.0.0 stability=stable
3032
* @availability serverless stability=stable visibility=public
3133
*/
3234
export interface Request extends RequestBase {
3335
path_parts: {
36+
/**
37+
* Index used to derive the analyzer.
38+
* If specified, the `analyzer` or field parameter overrides this value.
39+
* If no index is specified or the index does not have a default analyzer, the analyze API uses the standard analyzer.
40+
* @doc_id analysis-standard-analyzer
41+
*/
3442
index?: IndexName
3543
}
3644
body: {
45+
/**
46+
* The name of the analyzer that should be applied to the provided `text`.
47+
* This could be a built-in analyzer, or an analyzer that’s been configured in the index.
48+
* @doc_id analysis-analyzers
49+
*/
3750
analyzer?: string
51+
/**
52+
* Array of token attributes used to filter the output of the `explain` parameter.
53+
*/
3854
attributes?: string[]
55+
/**
56+
* Array of character filters used to preprocess characters before the tokenizer.
57+
* @doc_id analysis-charfilters
58+
*/
3959
char_filter?: Array<CharFilter>
60+
/**
61+
* If `true`, the response includes token attributes and additional details.
62+
* @server_default false
63+
*/
4064
explain?: boolean
65+
/**
66+
* Field used to derive the analyzer.
67+
* To use this parameter, you must specify an index.
68+
* If specified, the `analyzer` parameter overrides this value.
69+
*/
4170
field?: Field
71+
/**
72+
* Array of token filters used to apply after the tokenizer.
73+
* @doc_id analysis-tokenfilters
74+
*/
4275
filter?: Array<TokenFilter>
76+
/**
77+
* Normalizer to use to convert text into a single token.
78+
* @doc_id analysis-normalizers
79+
*/
4380
normalizer?: string
81+
/**
82+
* Text to analyze.
83+
* If an array of strings is provided, it is analyzed as a multi-value field.
84+
*/
4485
text?: TextToAnalyze
86+
/**
87+
* Tokenizer to use to convert text into tokens.
88+
* @doc_id analysis-tokenizers
89+
*/
4590
tokenizer?: Tokenizer
4691
}
4792
}

specification/indices/clear_cache/IndicesIndicesClearCacheRequest.ts

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,20 +21,56 @@ import { RequestBase } from '@_types/Base'
2121
import { ExpandWildcards, Fields, Indices } from '@_types/common'
2222

2323
/**
24+
* Clears the caches of one or more indices.
25+
* For data streams, the API clears the caches of the stream’s backing indices.
2426
* @rest_spec_name indices.clear_cache
2527
* @availability stack since=0.0.0 stability=stable
2628
*/
2729
export interface Request extends RequestBase {
2830
path_parts: {
31+
/**
32+
* Comma-separated list of data streams, indices, and aliases used to limit the request.
33+
* Supports wildcards (`*`).
34+
* To target all data streams and indices, omit this parameter or use `*` or `_all`.
35+
*/
2936
index?: Indices
3037
}
3138
query_parameters: {
39+
/**
40+
* If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices.
41+
* This behavior applies even if the request targets other open indices.
42+
* @server_default true
43+
*/
3244
allow_no_indices?: boolean
45+
/**
46+
* Type of index that wildcard patterns can match.
47+
* If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.
48+
* Supports comma-separated values, such as `open,hidden`.
49+
* Valid values are: `all`, `open`, `closed`, `hidden`, `none`.
50+
* @server_default open
51+
*/
3352
expand_wildcards?: ExpandWildcards
53+
/**
54+
* If `true`, clears the fields cache.
55+
* Use the `fields` parameter to clear the cache of specific fields only.
56+
*/
3457
fielddata?: boolean
58+
/**
59+
* Comma-separated list of field names used to limit the `fielddata` parameter.
60+
*/
3561
fields?: Fields
62+
/**
63+
* If `false`, the request returns an error if it targets a missing or closed index.
64+
* @server_default false
65+
*/
3666
ignore_unavailable?: boolean
67+
/**
68+
* If `true`, clears the query cache.
69+
*/
3770
query?: boolean
71+
/**
72+
* If `true`, clears the request cache.
73+
*/
3874
request?: boolean
3975
}
4076
}

specification/indices/clone/IndicesCloneRequest.ts

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,21 +25,51 @@ import { IndexName, Name, WaitForActiveShards } from '@_types/common'
2525
import { Duration } from '@_types/Time'
2626

2727
/**
28+
* Clones an existing index.
2829
* @rest_spec_name indices.clone
2930
* @availability stack since=7.4.0 stability=stable
3031
*/
3132
export interface Request extends RequestBase {
3233
path_parts: {
34+
/**
35+
* Name of the source index to clone.
36+
*/
3337
index: IndexName
38+
/**
39+
* Name of the target index to create.
40+
* @doc_id indices-clone-index
41+
*/
3442
target: Name
3543
}
3644
query_parameters: {
45+
/**
46+
* Period to wait for a connection to the master node.
47+
* If no response is received before the timeout expires, the request fails and returns an error.
48+
* @server_default 30s
49+
*/
3750
master_timeout?: Duration
51+
/**
52+
* Period to wait for a response.
53+
* If no response is received before the timeout expires, the request fails and returns an error.
54+
* @server_default 30s
55+
*/
3856
timeout?: Duration
57+
/**
58+
* The number of shard copies that must be active before proceeding with the operation.
59+
* Set to `all` or any positive integer up to the total number of shards in the index (`number_of_replicas+1`).
60+
* @server_default 1
61+
*/
3962
wait_for_active_shards?: WaitForActiveShards
4063
}
4164
body: {
65+
/**
66+
* Aliases for the resulting index.
67+
*/
4268
aliases?: Dictionary<IndexName, Alias>
69+
/**
70+
* Configuration options for the target index.
71+
* @doc_id index-modules-settings
72+
*/
4373
settings?: Dictionary<string, UserDefinedValue>
4474
}
4575
}

specification/indices/close/CloseIndexRequest.ts

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,20 +22,56 @@ import { ExpandWildcards, Indices, WaitForActiveShards } from '@_types/common'
2222
import { Duration } from '@_types/Time'
2323

2424
/**
25+
* Closes an index.
26+
* @doc_id indices-close
2527
* @rest_spec_name indices.close
2628
* @availability stack since=0.0.0 stability=stable
2729
* @availability serverless stability=stable visibility=private
2830
*/
2931
export interface Request extends RequestBase {
3032
path_parts: {
33+
/**
34+
* Comma-separated list or wildcard expression of index names used to limit the request.
35+
*/
3136
index: Indices
3237
}
3338
query_parameters: {
39+
/**
40+
* If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices.
41+
* This behavior applies even if the request targets other open indices.
42+
* @server_default true
43+
*/
3444
allow_no_indices?: boolean
45+
/**
46+
* Type of index that wildcard patterns can match.
47+
* If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.
48+
* Supports comma-separated values, such as `open,hidden`.
49+
* Valid values are: `all`, `open`, `closed`, `hidden`, `none`.
50+
* @server_default open
51+
*/
3552
expand_wildcards?: ExpandWildcards
53+
/**
54+
* If `false`, the request returns an error if it targets a missing or closed index.
55+
* @server_default false
56+
*/
3657
ignore_unavailable?: boolean
58+
/**
59+
* Period to wait for a connection to the master node.
60+
* If no response is received before the timeout expires, the request fails and returns an error.
61+
* @server_default 30s
62+
*/
3763
master_timeout?: Duration
64+
/**
65+
* Period to wait for a response.
66+
* If no response is received before the timeout expires, the request fails and returns an error.
67+
* @server_default 30s
68+
*/
3869
timeout?: Duration
70+
/**
71+
* The number of shard copies that must be active before proceeding with the operation.
72+
* Set to `all` or any positive integer up to the total number of shards in the index (`number_of_replicas+1`).
73+
* @server_default 1
74+
*/
3975
wait_for_active_shards?: WaitForActiveShards
4076
}
4177
}

0 commit comments

Comments
 (0)