Skip to content

Commit d35f2b0

Browse files
committed
[DOCS] Edit index operation summaries (#3268)
(cherry picked from commit 7d436a0)
1 parent 273d62c commit d35f2b0

23 files changed

+437
-128
lines changed

output/openapi/elasticsearch-openapi.json

Lines changed: 86 additions & 48 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: 8 additions & 2 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: 90 additions & 57 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: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,8 @@ index-modules-slowlog-slowlog,https://www.elastic.co/guide/en/elasticsearch/refe
210210
index-modules,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/index-modules.html
211211
index,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/index.html
212212
indexing-buffer,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/indexing-buffer.html
213+
index-modules-merge,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/index-modules-merge.html
214+
index-templates,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/index-templates.html
213215
indices-aliases,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/indices-aliases.html
214216
indices-analyze,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/indices-analyze.html
215217
indices-clearcache,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/indices-clearcache.html
@@ -521,6 +523,7 @@ search-aggregations-metrics-top-metrics,https://www.elastic.co/guide/en/elastics
521523
search-aggregations-metrics-valuecount-aggregation,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/search-aggregations-metrics-valuecount-aggregation.html
522524
search-aggregations-metrics-weight-avg-aggregation,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/search-aggregations-metrics-weight-avg-aggregation.html
523525
search-aggregations-bucket-variablewidthhistogram-aggregation,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/search-aggregations-bucket-variablewidthhistogram-aggregation.html
526+
search-analyzer,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/search-analyzer.html
524527
search-count,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/search-count.html
525528
search-explain,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/search-explain.html
526529
search-field-caps,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/search-field-caps.html

specification/indices/clear_cache/IndicesIndicesClearCacheRequest.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,9 @@ 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.
24+
* Clear the cache.
25+
* Clear the cache of one or more indices.
26+
* For data streams, the API clears the caches of the stream's backing indices.
2627
* @rest_spec_name indices.clear_cache
2728
* @availability stack stability=stable
2829
* @availability serverless stability=stable visibility=private

specification/indices/clone/IndicesCloneRequest.ts

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,30 @@ import { IndexName, Name, WaitForActiveShards } from '@_types/common'
2525
import { Duration } from '@_types/Time'
2626

2727
/**
28-
* Clones an existing index.
28+
* Clone an index.
29+
* Clone an existing index into a new index.
30+
* Each original primary shard is cloned into a new primary shard in the new index.
31+
*
32+
* IMPORTANT: Elasticsearch does not apply index templates to the resulting index.
33+
* The API also does not copy index metadata from the original index.
34+
* Index metadata includes aliases, index lifecycle management phase definitions, and cross-cluster replication (CCR) follower information.
35+
* For example, if you clone a CCR follower index, the resulting clone will not be a follower index.
36+
*
37+
* The clone API copies most index settings from the source index to the resulting index, with the exception of `index.number_of_replicas` and `index.auto_expand_replicas`.
38+
* To set the number of replicas in the resulting index, configure these settings in the clone request.
39+
*
40+
* Cloning works as follows:
41+
*
42+
* * First, it creates a new target index with the same definition as the source index.
43+
* * Then it hard-links segments from the source index into the target index. If the file system does not support hard-linking, all segments are copied into the new index, which is a much more time consuming process.
44+
* * Finally, it recovers the target index as though it were a closed index which had just been re-opened.
45+
*
46+
* IMPORTANT: Indices can only be cloned if they meet the following requirements:
47+
*
48+
* * The target index must not exist.
49+
* * The source index must have the same number of primary shards as the target index.
50+
* * The node handling the clone process must have sufficient free disk space to accommodate a second copy of the existing index.
51+
*
2952
* @rest_spec_name indices.clone
3053
* @availability stack since=7.4.0 stability=stable
3154
*/

specification/indices/close/CloseIndexRequest.ts

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,24 @@ import { ExpandWildcards, Indices, WaitForActiveShards } from '@_types/common'
2222
import { Duration } from '@_types/Time'
2323

2424
/**
25-
* Closes an index.
25+
* Close an index.
26+
* A closed index is blocked for read or write operations and does not allow all operations that opened indices allow.
27+
* It is not possible to index documents or to search for documents in a closed index.
28+
* Closed indices do not have to maintain internal data structures for indexing or searching documents, which results in a smaller overhead on the cluster.
29+
*
30+
* When opening or closing an index, the master node is responsible for restarting the index shards to reflect the new state of the index.
31+
* The shards will then go through the normal recovery process.
32+
* The data of opened and closed indices is automatically replicated by the cluster to ensure that enough shard copies are safely kept around at all times.
33+
*
34+
* You can open and close multiple indices.
35+
* An error is thrown if the request explicitly refers to a missing index.
36+
* This behaviour can be turned off using the `ignore_unavailable=true` parameter.
37+
*
38+
* By default, you must explicitly name the indices you are opening or closing.
39+
* To open or close indices with `_all`, `*`, or other wildcard expressions, change the` action.destructive_requires_name` setting to `false`. This setting can also be changed with the cluster update settings API.
40+
*
41+
* Closed indices consume a significant amount of disk-space which can cause problems in managed environments.
42+
* Closing indices can be turned off with the cluster settings API by setting `cluster.indices.close.enable` to `false`.
2643
* @doc_id indices-close
2744
* @rest_spec_name indices.close
2845
* @availability stack stability=stable

specification/indices/disk_usage/IndicesDiskUsageRequest.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,10 @@ import { RequestBase } from '@_types/Base'
2121
import { ExpandWildcards, Indices } from '@_types/common'
2222

2323
/**
24-
* Analyzes the disk usage of each field of an index or data stream.
24+
* Analyze the index disk usage.
25+
* Analyze the disk usage of each field of an index or data stream.
26+
* This API might not support indices created in previous Elasticsearch versions.
27+
* The result of a small index can be inaccurate as some parts of an index might not be analyzed by the API.
2528
* @doc_id indices-disk-usage
2629
* @rest_spec_name indices.disk_usage
2730
* @availability stack since=7.15.0 stability=experimental

specification/indices/downsample/Request.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,14 @@ import { RequestBase } from '@_types/Base'
2222
import { IndexName } from '@_types/common'
2323

2424
/**
25-
* Aggregates a time series (TSDS) index and stores pre-computed statistical summaries (`min`, `max`, `sum`, `value_count` and `avg`) for each metric field grouped by a configured time interval.
25+
* Downsample an index.
26+
* Aggregate a time series (TSDS) index and store pre-computed statistical summaries (`min`, `max`, `sum`, `value_count` and `avg`) for each metric field grouped by a configured time interval.
27+
* For example, a TSDS index that contains metrics sampled every 10 seconds can be downsampled to an hourly index.
28+
* All documents within an hour interval are summarized and stored as a single document in the downsample index.
29+
*
30+
* NOTE: Only indices in a time series data stream are supported.
31+
* Neither field nor document level security can be defined on the source index.
32+
* The source index must be read only (`index.blocks.write: true`).
2633
* @doc_id indices-downsample-data-stream
2734
* @rest_spec_name indices.downsample
2835
* @availability stack since=8.5.0 stability=experimental

specification/indices/field_usage_stats/IndicesFieldUsageStatsRequest.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,10 @@ import {
2727
import { Duration } from '@_types/Time'
2828

2929
/**
30-
* Returns field usage information for each shard and field of an index.
30+
* Get field usage stats.
31+
* Get field usage information for each shard and field of an index.
32+
* Field usage statistics are automatically captured when queries are running on a cluster.
33+
* A shard-level search request that accesses a given field, even if multiple times during that request, is counted as a single use.
3134
* @rest_spec_name indices.field_usage_stats
3235
* @availability stack since=7.15.0 stability=experimental
3336
* @availability serverless stability=experimental visibility=private

specification/indices/flush/IndicesFlushRequest.ts

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,17 @@ import { RequestBase } from '@_types/Base'
2121
import { ExpandWildcards, Indices } from '@_types/common'
2222

2323
/**
24-
* Flushes one or more data streams or indices.
24+
* Flush data streams or indices.
25+
* Flushing a data stream or index is the process of making sure that any data that is currently only stored in the transaction log is also permanently stored in the Lucene index.
26+
* When restarting, Elasticsearch replays any unflushed operations from the transaction log into the Lucene index to bring it back into the state that it was in before the restart.
27+
* Elasticsearch automatically triggers flushes as needed, using heuristics that trade off the size of the unflushed transaction log against the cost of performing each flush.
28+
*
29+
* After each operation has been flushed it is permanently stored in the Lucene index.
30+
* This may mean that there is no need to maintain an additional copy of it in the transaction log.
31+
* The transaction log is made up of multiple files, called generations, and Elasticsearch will delete any generation files when they are no longer needed, freeing up disk space.
32+
*
33+
* It is also possible to trigger a flush on one or more indices using the flush API, although it is rare for users to need to call this API directly.
34+
* If you call the flush API after indexing some documents then a successful response indicates that Elasticsearch has flushed all the documents that were indexed before the flush API was called.
2535
* @doc_id indices-flush
2636
* @rest_spec_name indices.flush
2737
* @availability stack stability=stable

specification/indices/forcemerge/IndicesForceMergeRequest.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,23 @@ import { ExpandWildcards, Indices } from '@_types/common'
2222
import { long } from '@_types/Numeric'
2323

2424
/**
25+
* Force a merge.
26+
* Perform the force merge operation on the shards of one or more indices.
27+
* For data streams, the API forces a merge on the shards of the stream's backing indices.
28+
*
29+
* Merging reduces the number of segments in each shard by merging some of them together and also frees up the space used by deleted documents.
30+
* Merging normally happens automatically, but sometimes it is useful to trigger a merge manually.
31+
*
32+
* WARNING: We recommend force merging only a read-only index (meaning the index is no longer receiving writes).
33+
* When documents are updated or deleted, the old version is not immediately removed but instead soft-deleted and marked with a "tombstone".
34+
* These soft-deleted documents are automatically cleaned up during regular segment merges.
35+
* But force merge can cause very large (greater than 5 GB) segments to be produced, which are not eligible for regular merges.
36+
* So the number of soft-deleted documents can then grow rapidly, resulting in higher disk usage and worse search performance.
37+
* If you regularly force merge an index receiving writes, this can also make snapshots more expensive, since the new documents can't be backed up incrementally.
2538
* @rest_spec_name indices.forcemerge
2639
* @availability stack since=2.1.0 stability=stable
2740
* @availability serverless stability=stable visibility=private
41+
* @ext_doc_id index-modules-merge
2842
*/
2943
export interface Request extends RequestBase {
3044
path_parts: {

specification/indices/promote_data_stream/IndicesPromoteDataStreamRequest.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,17 @@ import { IndexName } from '@_types/common'
2222
import { Duration } from '@_types/Time'
2323

2424
/**
25+
* Promote a data stream.
26+
* Promote a data stream from a replicated data stream managed by cross-cluster replication (CCR) to a regular data stream.
27+
*
28+
* With CCR auto following, a data stream from a remote cluster can be replicated to the local cluster.
29+
* These data streams can't be rolled over in the local cluster.
30+
* These replicated data streams roll over only if the upstream data stream rolls over.
31+
* In the event that the remote cluster is no longer available, the data stream in the local cluster can be promoted to a regular data stream, which allows these data streams to be rolled over in the local cluster.
32+
*
33+
* NOTE: When promoting a data stream, ensure the local cluster has a data stream enabled index template that matches the data stream.
34+
* If this is missing, the data stream will not be able to roll over until a matching index template is created.
35+
* This will affect the lifecycle management of the data stream and interfere with the data stream size and retention.
2536
* @rest_spec_name indices.promote_data_stream
2637
* @availability stack since=7.9.0 stability=stable
2738
*/

specification/indices/put_template/IndicesPutTemplateRequest.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,21 @@ import { Duration } from '@_types/Time'
2929
/**
3030
* Create or update an index template.
3131
* Index templates define settings, mappings, and aliases that can be applied automatically to new indices.
32+
* Elasticsearch applies templates to new indices based on an index pattern that matches the index name.
33+
*
34+
* IMPORTANT: This documentation is about legacy index templates, which are deprecated and will be replaced by the composable templates introduced in Elasticsearch 7.8.
35+
*
36+
* Composable templates always take precedence over legacy templates.
37+
* If no composable template matches a new index, matching legacy templates are applied according to their order.
38+
*
39+
* Index templates are only applied during index creation.
40+
* Changes to index templates do not affect existing indices.
41+
* Settings and mappings specified in create index API requests override any settings or mappings specified in an index template.
3242
* @rest_spec_name indices.put_template
3343
* @availability stack stability=stable
3444
* @availability serverless stability=stable visibility=public
45+
* @cluster_privileges manage_index_templates, manage
46+
* @ext_doc_id index-templates
3547
*/
3648
export interface Request extends RequestBase {
3749
path_parts: {

specification/indices/recovery/IndicesRecoveryRequest.ts

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,27 @@ import { RequestBase } from '@_types/Base'
2121
import { Indices } from '@_types/common'
2222

2323
/**
24-
* Returns information about ongoing and completed shard recoveries for one or more indices.
25-
* For data streams, the API returns information for the stream’s backing indices.
24+
* Get index recovery information.
25+
* Get information about ongoing and completed shard recoveries for one or more indices.
26+
* For data streams, the API returns information for the stream's backing indices.
27+
*
28+
* Shard recovery is the process of initializing a shard copy, such as restoring a primary shard from a snapshot or creating a replica shard from a primary shard.
29+
* When a shard recovery completes, the recovered shard is available for search and indexing.
30+
*
31+
* Recovery automatically occurs during the following processes:
32+
*
33+
* * When creating an index for the first time.
34+
* * When a node rejoins the cluster and starts up any missing primary shard copies using the data that it holds in its data path.
35+
* * Creation of new replica shard copies from the primary.
36+
* * Relocation of a shard copy to a different node in the same cluster.
37+
* * A snapshot restore operation.
38+
* * A clone, shrink, or split operation.
39+
*
40+
* You can determine the cause of a shard recovery using the recovery or cat recovery APIs.
41+
*
42+
* The index recovery API reports information about completed recoveries only for shard copies that currently exist in the cluster.
43+
* It only reports the last recovery for each shard copy and does not report historical information about earlier recoveries, nor does it report information about the recoveries of shard copies that no longer exist.
44+
* This means that if a shard copy completes a recovery and then Elasticsearch relocates it onto a different node then the information about the original recovery will not be shown in the recovery API.
2645
* @rest_spec_name indices.recovery
2746
* @availability stack stability=stable
2847
* @availability serverless stability=stable visibility=private

specification/indices/reload_search_analyzers/ReloadSearchAnalyzersRequest.ts

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

2323
/**
24+
* Reload search analyzers.
25+
* Reload an index's search analyzers and their resources.
26+
* For data streams, the API reloads search analyzers and resources for the stream's backing indices.
27+
*
28+
* IMPORTANT: After reloading the search analyzers you should clear the request cache to make sure it doesn't contain responses derived from the previous versions of the analyzer.
29+
*
30+
* You can use the reload search analyzers API to pick up changes to synonym files used in the `synonym_graph` or `synonym` token filter of a search analyzer.
31+
* To be eligible, the token filter must have an `updateable` flag of `true` and only be used in search analyzers.
32+
*
33+
* NOTE: This API does not perform a reload for each shard of an index.
34+
* Instead, it performs a reload for each node containing index shards.
35+
* As a result, the total shard count returned by the API can differ from the number of index shards.
36+
* Because reloading affects every node with an index shard, it is important to update the synonym file on every data node in the cluster--including nodes that don't contain a shard replica--before using this API.
37+
* This ensures the synonym file is updated everywhere in the cluster in case shards are relocated in the future.
2438
* @rest_spec_name indices.reload_search_analyzers
2539
* @availability stack since=7.3.0 stability=stable
40+
* @ext_doc_id search-analyzer
2641
*/
2742
export interface Request extends RequestBase {
2843
path_parts: {

0 commit comments

Comments
 (0)