Skip to content

Commit 1f0b816

Browse files
authored
Add more index API examples (#3430) (#3444)
(cherry picked from commit 0664ce5)
1 parent 4e54961 commit 1f0b816

File tree

95 files changed

+1542
-353
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

95 files changed

+1542
-353
lines changed

output/openapi/elasticsearch-openapi.json

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

output/openapi/elasticsearch-serverless-openapi.json

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

output/schema/schema.json

Lines changed: 350 additions & 175 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: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,9 @@ connector-update-status,https://www.elastic.co/guide/en/elasticsearch/reference/
119119
convert-processor,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/convert-processor.html
120120
cron-expressions,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/api-conventions.html#api-cron-expressions
121121
csv-processor,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/csv-processor.html
122+
dangling-index-delete,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/dangling-index-delete.html
123+
dangling-index-import,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/dangling-index-import.html
124+
dangling-indices-list,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/dangling-indices-list.html
122125
data-processor,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/date-processor.html
123126
data-stream-path-param,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/indices-create-data-stream.html#indices-create-data-stream-api-path-params
124127
data-streams,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/data-streams.html
@@ -226,6 +229,7 @@ index,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/index.htm
226229
indexing-buffer,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/indexing-buffer.html
227230
index-modules-merge,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/index-modules-merge.html
228231
index-templates,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/index-templates.html
232+
index-templates-v1,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/indices-templates-v1.html
229233
indices-aliases,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/indices-aliases.html
230234
indices-analyze,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/indices-analyze.html
231235
indices-clearcache,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/indices-clearcache.html
@@ -234,28 +238,39 @@ indices-close,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/i
234238
indices-component-template,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/indices-component-template.html
235239
indices-create-data-stream,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/indices-create-data-stream.html
236240
indices-create-index,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/indices-create-index.html
241+
indices-delete-alias,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/indices-delete-alias.html
237242
indices-delete-index,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/indices-delete-index.html
243+
indices-delete-template,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/indices-delete-template.html
244+
indices-delete-template-v1,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/indices-delete-template-v1.html
238245
indices-disk-usage,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/indices-disk-usage.html
239246
indices-downsample-data-stream,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/indices-downsample-data-stream.html
240247
indices-exists,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/indices-exists.html
241248
indices-flush,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/indices-flush.html
242249
indices-forcemerge,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/indices-forcemerge.html
250+
indices-get-alias,
251+
https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/indices-get-alias.html
243252
indices-get-field-mapping,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/indices-get-field-mapping.html
244253
indices-get-index,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/indices-get-index.html
245254
indices-get-mapping,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/indices-get-mapping.html
246255
indices-get-settings,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/indices-get-settings.html
256+
indices-get-template,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/indices-get-template.html
257+
indices-get-template-v1,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/indices-get-template-v1.html
247258
indices-open-close,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/indices-open-close.html
248259
indices-put-mapping,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/indices-put-mapping.html
249260
indices-recovery,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/indices-recovery.html
250261
indices-refresh,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/indices-refresh.html
251262
indices-reload-analyzers,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/indices-reload-analyzers.html
263+
indices-resolve-cluster-api,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/indices-resolve-cluster-api.html
252264
indices-resolve-index-api,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/indices-resolve-index-api.html
253265
indices-rollover-index,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/indices-rollover-index.html
254266
indices-segments,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/indices-segments.html
255267
indices-shards-stores,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/indices-shards-stores.html
256268
indices-shrink-index,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/indices-shrink-index.html
269+
indices-simulate,https://www.elastic.co/guide/en/elasticsearch/reference/{master}/indices-simulate-index.html
270+
indices-simulate-template,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/indices-simulate-template.html
257271
indices-split-index,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/indices-split-index.html
258272
indices-stats,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/indices-stats.html
273+
indices-template-exists-v1,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/indices-template-exists-v1.html
259274
indices-templates,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/indices-templates.html
260275
indices-update-settings,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/indices-update-settings.html
261276
infer-trained-model-deployment,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/infer-trained-model-deployment.html
@@ -281,6 +296,7 @@ logstash-logstash-settings-file,https://www.elastic.co/guide/en/logstash/{branch
281296
lowercase-processor,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/lowercase-processor.html
282297
mapping-date-format,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/mapping-date-format.html
283298
mapping-meta-field,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/mapping-meta-field.html
299+
mapping-params,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/mapping-params.html
284300
mapping-metadata,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/mapping-fields.html
285301
mapping-roles,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/mapping-roles.html
286302
mapping-settings-limit,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/mapping-settings-limit.html

specification/_global/field_caps/FieldCapabilitiesRequest.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ import { QueryContainer } from '@_types/query_dsl/abstractions'
3333
* @rest_spec_name field_caps
3434
* @availability stack since=5.4.0 stability=stable
3535
* @availability serverless stability=stable visibility=public
36-
* @index_privileges view_index_metadata,read,manage
36+
* @index_privileges view_index_metadata,read
3737
* @doc_tag search
3838
*/
3939
export interface Request extends RequestBase {

specification/cluster/delete_component_template/ClusterDeleteComponentTemplateRequest.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ import { Duration } from '@_types/Time'
2323

2424
/**
2525
* Delete component templates.
26-
* Deletes component templates.
2726
* Component templates are building blocks for constructing index templates that specify index mappings, settings, and aliases.
2827
* @rest_spec_name cluster.delete_component_template
2928
* @availability stack since=7.8.0 stability=stable

specification/cluster/get_component_template/ClusterGetComponentTemplateRequest.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import { Duration } from '@_types/Time'
2323

2424
/**
2525
* Get component templates.
26-
* Retrieves information about component templates.
26+
* Get information about component templates.
2727
* @rest_spec_name cluster.get_component_template
2828
* @availability stack since=7.8.0 stability=stable
2929
* @availability serverless stability=stable visibility=public

specification/cluster/put_component_template/ClusterPutComponentTemplateRequest.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ import { Duration } from '@_types/Time'
2424

2525
/**
2626
* Create or update a component template.
27-
* Creates or updates a component template.
2827
* Component templates are building blocks for constructing index templates that specify index mappings, settings, and aliases.
2928
*
3029
* An index template can be composed of multiple component templates.
@@ -39,6 +38,11 @@ import { Duration } from '@_types/Time'
3938
*
4039
* You can use C-style `/* *\/` block comments in component templates.
4140
* You can include comments anywhere in the request body except before the opening curly bracket.
41+
*
42+
* **Applying component templates**
43+
*
44+
* You cannot directly apply a component template to a data stream or index.
45+
* To be applied, a component template must be included in an index template's `composed_of` list.
4246
* @rest_spec_name cluster.put_component_template
4347
* @availability stack since=7.8.0 stability=stable
4448
* @availability serverless stability=stable visibility=public
@@ -81,7 +85,7 @@ export interface Request extends RequestBase {
8185
version?: VersionNumber
8286
/**
8387
* Optional user metadata about the component template.
84-
* May have any contents. This map is not automatically generated by Elasticsearch.
88+
* It may have any contents. This map is not automatically generated by Elasticsearch.
8589
* This information is stored in the cluster state, so keeping it short is preferable.
8690
* To unset `_meta`, replace the template without specifying this information.
8791
*/
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
summary: Create a template
2+
# method_request: PUT _component_template/template_1
3+
# description:
4+
# type: request
5+
value:
6+
template:
7+
settings:
8+
number_of_shards: 1
9+
mappings:
10+
_source:
11+
enabled: false
12+
properties:
13+
host_name:
14+
type: keyword
15+
created_at:
16+
type: date
17+
format: 'EEE MMM dd HH:mm:ss Z yyyy'
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
summary: Create a template with aliases
2+
# method_request: PUT _component_template/template_1
3+
description: >
4+
You can include index aliases in a component template.
5+
During index creation, the `{index}` placeholder in the alias name will be replaced with the actual index name that the template gets applied to.
6+
# type: request
7+
value:
8+
template:
9+
settings:
10+
number_of_shards: 1
11+
aliases:
12+
alias1: {}
13+
alias2:
14+
filter:
15+
term:
16+
user.id: kimchy
17+
routing: shard-1
18+
'{index}-alias': {}

0 commit comments

Comments
 (0)