Skip to content

Commit

Permalink
replace api links (#432)
Browse files Browse the repository at this point in the history
  • Loading branch information
colleenmcginnis authored Feb 12, 2025
1 parent b85ff6e commit 6995410
Show file tree
Hide file tree
Showing 48 changed files with 199 additions and 199 deletions.
12 changes: 6 additions & 6 deletions manage-data/data-store/aliases.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Aliases enable you to:

* Query multiple indices/data streams together with a single name
* Change which indices/data streams your application uses in real time
* [Reindex](https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-reindex.html) data without downtime
* [Reindex](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-reindex) data without downtime


## Alias types [alias-types]
Expand All @@ -26,7 +26,7 @@ An alias cannot point to both data streams and indices. You also cannot add a da

## Add an alias [add-alias]

To add an existing data stream or index to an alias, use the [aliases API](https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-aliases.html)'s `add` action. If the alias doesn’t exist, the request creates it.
To add an existing data stream or index to an alias, use the [aliases API](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-update-aliases)'s `add` action. If the alias doesn’t exist, the request creates it.

```console
POST _aliases
Expand Down Expand Up @@ -169,7 +169,7 @@ Allowing the action list to succeed partially may not provide the desired result

## Add an alias at index creation [add-alias-at-creation]

You can also use a [component](https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-component-template.html) or [index template](https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-put-template.html) to add index or data stream aliases when they are created.
You can also use a [component](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cluster-put-component-template) or [index template](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-put-index-template) to add index or data stream aliases when they are created.

```console
# Component template with index aliases
Expand Down Expand Up @@ -201,7 +201,7 @@ PUT _index_template/my-index-template
}
```

You can also specify index aliases in [create index API](https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-create-index.html) requests.
You can also specify index aliases in [create index API](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-create) requests.

```console
# PUT <my-index-{now/d}-000001>
Expand All @@ -216,7 +216,7 @@ PUT %3Cmy-index-%7Bnow%2Fd%7D-000001%3E

## View aliases [view-aliases]

To get a list of your cluster’s aliases, use the [get alias API](https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-get-alias.html) with no argument.
To get a list of your cluster’s aliases, use the [get alias API](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-get-alias) with no argument.

```console
GET _alias
Expand Down Expand Up @@ -306,7 +306,7 @@ POST _aliases
```

::::{note}
Filters are only applied when using the [Query DSL](../../explore-analyze/query-filter/languages/querydsl.md), and are not applied when [retrieving a document by ID](https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-get.html).
Filters are only applied when using the [Query DSL](../../explore-analyze/query-filter/languages/querydsl.md), and are not applied when [retrieving a document by ID](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-get).
::::


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ Fields in the target, downsampled index are created based on fields in the origi

## Running downsampling on time series data [running-downsampling]

To downsample a time series index, use the [Downsample API](https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-downsample-data-stream.html) and set `fixed_interval` to the level of granularity that you’d like:
To downsample a time series index, use the [Downsample API](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-downsample) and set `fixed_interval` to the level of granularity that you’d like:

```console
POST /my-time-series-index/_downsample/my-downsampled-time-series-index
Expand Down Expand Up @@ -105,7 +105,7 @@ PUT _ilm/policy/my_policy

## Querying downsampled indices [querying-downsampled-indices]

You can use the [`_search`](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-search.html) and [`_async_search`](https://www.elastic.co/guide/en/elasticsearch/reference/current/async-search.html) endpoints to query a downsampled index. Multiple raw data and downsampled indices can be queried in a single request, and a single request can include downsampled indices at different granularities (different bucket timespan). That is, you can query data streams that contain downsampled indices with multiple downsampling intervals (for example, `15m`, `1h`, `1d`).
You can use the [`_search`](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-search) and [`_async_search`](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-async-search-submit) endpoints to query a downsampled index. Multiple raw data and downsampled indices can be queried in a single request, and a single request can include downsampled indices at different granularities (different bucket timespan). That is, you can query data streams that contain downsampled indices with multiple downsampling intervals (for example, `15m`, `1h`, `1d`).

The result of a time based histogram aggregation is in a uniform bucket size and each downsampled index returns data ignoring the downsampling time interval. For example, if you run a `date_histogram` aggregation with `"fixed_interval": "1m"` on a downsampled index that has been downsampled at an hourly resolution (`"fixed_interval": "1h"`), the query returns one bucket with all of the data at minute 0, then 59 empty buckets, and then a bucket with data again for the next hour.

Expand Down
28 changes: 14 additions & 14 deletions manage-data/data-store/index-types/modify-data-stream.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ To add a mapping for a new field to a data stream, following these steps:

1. Adds a mapping for the new `message` field.

2. Use the [update mapping API](https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-put-mapping.html) to add the new field mapping to the data stream. By default, this adds the mapping to the stream’s existing backing indices, including the write index.
2. Use the [update mapping API](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-put-mapping) to add the new field mapping to the data stream. By default, this adds the mapping to the stream’s existing backing indices, including the write index.

The following update mapping API request adds the new `message` field mapping to `my-data-stream`.

Expand Down Expand Up @@ -89,7 +89,7 @@ To add a mapping for a new field to a data stream, following these steps:

### Change an existing field mapping in a data stream [change-existing-field-mapping-in-a-data-stream]

The documentation for each [mapping parameter](https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping-params.html) indicates whether you can update it for an existing field using the [update mapping API](https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-put-mapping.html). To update these parameters for an existing field, follow these steps:
The documentation for each [mapping parameter](https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping-params.html) indicates whether you can update it for an existing field using the [update mapping API](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-put-mapping). To update these parameters for an existing field, follow these steps:

1. Update the index template used by the data stream. This ensures the updated field mapping is added to future backing indices created for the stream.

Expand Down Expand Up @@ -122,9 +122,9 @@ The documentation for each [mapping parameter](https://www.elastic.co/guide/en/e

1. Changes the `host.ip` field’s `ignore_malformed` value to `true`.

2. Use the [update mapping API](https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-put-mapping.html) to apply the mapping changes to the data stream. By default, this applies the changes to the stream’s existing backing indices, including the write index.
2. Use the [update mapping API](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-put-mapping) to apply the mapping changes to the data stream. By default, this applies the changes to the stream’s existing backing indices, including the write index.

The following [update mapping API](https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-put-mapping.html) request targets `my-data-stream`. The request changes the argument for the `host.ip` field’s `ignore_malformed` mapping parameter to `true`.
The following [update mapping API](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-put-mapping) request targets `my-data-stream`. The request changes the argument for the `host.ip` field’s `ignore_malformed` mapping parameter to `true`.

```console
PUT /my-data-stream/_mapping
Expand Down Expand Up @@ -194,7 +194,7 @@ To change a [dynamic index setting](https://www.elastic.co/guide/en/elasticsearc

1. Changes the `index.refresh_interval` setting to `30s` (30 seconds).

2. Use the [update index settings API](https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-update-settings.html) to update the index setting for the data stream. By default, this applies the setting to the stream’s existing backing indices, including the write index.
2. Use the [update index settings API](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-put-settings) to update the index setting for the data stream. By default, this applies the setting to the stream’s existing backing indices, including the write index.

The following update index settings API request updates the `index.refresh_interval` setting for `my-data-stream`.

Expand All @@ -209,14 +209,14 @@ To change a [dynamic index setting](https://www.elastic.co/guide/en/elasticsearc


::::{important}
To change the `index.lifecycle.name` setting, first use the [remove policy API](https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-remove-policy.html) to remove the existing {{ilm-init}} policy. See [Switch lifecycle policies](../../lifecycle/index-lifecycle-management/configure-lifecycle-policy.md#switch-lifecycle-policies).
To change the `index.lifecycle.name` setting, first use the [remove policy API](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ilm-remove-policy) to remove the existing {{ilm-init}} policy. See [Switch lifecycle policies](../../lifecycle/index-lifecycle-management/configure-lifecycle-policy.md#switch-lifecycle-policies).
::::



### Change a static index setting for a data stream [change-static-index-setting-for-a-data-stream]

[Static index settings](https://www.elastic.co/guide/en/elasticsearch/reference/current/index-modules.html#index-modules-settings) can only be set when a backing index is created. You cannot update static index settings using the [update index settings API](https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-update-settings.html).
[Static index settings](https://www.elastic.co/guide/en/elasticsearch/reference/current/index-modules.html#index-modules-settings) can only be set when a backing index is created. You cannot update static index settings using the [update index settings API](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-put-settings).

To apply a new static setting to future backing indices, update the index template used by the data stream. The setting is automatically applied to any backing index created after the update.

Expand Down Expand Up @@ -319,7 +319,7 @@ Follow these steps:
2. Adds the `sort.field` index setting.
3. Adds the `sort.order` index setting.

3. Use the [create data stream API](https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-create-data-stream.html) to manually create the new data stream. The name of the data stream must match the index pattern defined in the new template’s `index_patterns` property.
3. Use the [create data stream API](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-create-data-stream) to manually create the new data stream. The name of the data stream must match the index pattern defined in the new template’s `index_patterns` property.

We do not recommend [indexing new data to create this data stream](set-up-data-stream.md#create-data-stream). Later, you will reindex older data from an existing data stream into this new stream. This could result in one or more backing indices that contains a mix of new and old data.

Expand All @@ -341,7 +341,7 @@ Follow these steps:
4. If you do not want to mix new and old data in your new data stream, pause the indexing of new documents. While mixing old and new data is safe, it could interfere with data retention. See [Mixing new and old data in a data stream](modify-data-stream.md#data-stream-mix-new-old-data).
5. If you use {{ilm-init}} to [automate rollover](../../lifecycle/index-lifecycle-management/tutorial-automate-rollover.md), reduce the {{ilm-init}} poll interval. This ensures the current write index doesn’t grow too large while waiting for the rollover check. By default, {{ilm-init}} checks rollover conditions every 10 minutes.

The following [cluster update settings API](https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-update-settings.html) request lowers the `indices.lifecycle.poll_interval` setting to `1m` (one minute).
The following [cluster update settings API](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cluster-put-settings) request lowers the `indices.lifecycle.poll_interval` setting to `1m` (one minute).

```console
PUT /_cluster/settings
Expand All @@ -354,7 +354,7 @@ Follow these steps:

6. Reindex your data to the new data stream using an `op_type` of `create`.

If you want to partition the data in the order in which it was originally indexed, you can run separate reindex requests. These reindex requests can use individual backing indices as the source. You can use the [get data stream API](https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-get-data-stream.html) to retrieve a list of backing indices.
If you want to partition the data in the order in which it was originally indexed, you can run separate reindex requests. These reindex requests can use individual backing indices as the source. You can use the [get data stream API](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-get-data-stream) to retrieve a list of backing indices.

For example, you plan to reindex data from `my-data-stream` into `new-data-stream`. However, you want to submit a separate reindex request for each backing index in `my-data-stream`, starting with the oldest backing index. This preserves the order in which the data was originally indexed.

Expand Down Expand Up @@ -406,7 +406,7 @@ Follow these steps:
1. First item in the `indices` array for `my-data-stream`. This item contains information about the stream’s oldest backing index, `.ds-my-data-stream-2099.03.07-000001`.


The following [reindex API](https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-reindex.html) request copies documents from `.ds-my-data-stream-2099.03.07-000001` to `new-data-stream`. The request’s `op_type` is `create`.
The following [reindex API](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-reindex) request copies documents from `.ds-my-data-stream-2099.03.07-000001` to `new-data-stream`. The request’s `op_type` is `create`.

```console
POST /_reindex
Expand All @@ -423,7 +423,7 @@ Follow these steps:

You can also use a query to reindex only a subset of documents with each request.

The following [reindex API](https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-reindex.html) request copies documents from `my-data-stream` to `new-data-stream`. The request uses a [`range` query](https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-range-query.html) to only reindex documents with a timestamp within the last week. Note the request’s `op_type` is `create`.
The following [reindex API](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-reindex) request copies documents from `my-data-stream` to `new-data-stream`. The request uses a [`range` query](https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-range-query.html) to only reindex documents with a timestamp within the last week. Note the request’s `op_type` is `create`.

```console
POST /_reindex
Expand Down Expand Up @@ -462,7 +462,7 @@ Follow these steps:
8. Resume indexing using the new data stream. Searches on this stream will now query your new data and the reindexed data.
9. Once you have verified that all reindexed data is available in the new data stream, you can safely remove the old stream.

The following [delete data stream API](https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-delete-data-stream.html) request deletes `my-data-stream`. This request also deletes the stream’s backing indices and any data they contain.
The following [delete data stream API](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-delete-data-stream) request deletes `my-data-stream`. This request also deletes the stream’s backing indices and any data they contain.

```console
DELETE /_data_stream/my-data-stream
Expand All @@ -472,7 +472,7 @@ Follow these steps:

## Update or add an alias to a data stream [data-streams-change-alias]

Use the [aliases API](https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-aliases.html) to update an existing data stream’s aliases. Changing an existing data stream’s aliases in its index pattern has no effect.
Use the [aliases API](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-update-aliases) to update an existing data stream’s aliases. Changing an existing data stream’s aliases in its index pattern has no effect.

For example, the `logs` alias points to a single data stream. The following request swaps the stream for the alias. During this swap, the `logs` alias has no downtime and never points to both streams at the same time.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ This returns:

Before a backing index can be downsampled, the TSDS needs to be rolled over and the old index needs to be made read-only.

Roll over the TSDS using the [rollover API](https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-rollover-index.html):
Roll over the TSDS using the [rollover API](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-rollover):

```console
POST /my-data-stream/_rollover/
Expand All @@ -363,7 +363,7 @@ The old index needs to be set to read-only mode. Run the following request:
PUT /.ds-my-data-stream-2023.07.26-000001/_block/write
```

Next, use the [downsample API](https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-downsample-data-stream.html) to downsample the index, setting the time series interval to one hour:
Next, use the [downsample API](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-downsample) to downsample the index, setting the time series interval to one hour:

```console
POST /.ds-my-data-stream-2023.07.26-000001/_downsample/.ds-my-data-stream-2023.07.26-000001-downsample
Expand All @@ -372,7 +372,7 @@ POST /.ds-my-data-stream-2023.07.26-000001/_downsample/.ds-my-data-stream-2023.0
}
```

Now you can [modify the data stream](https://www.elastic.co/guide/en/elasticsearch/reference/current/modify-data-streams-api.html), and replace the original index with the downsampled one:
Now you can [modify the data stream](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-modify-data-stream), and replace the original index with the downsampled one:

```console
POST _data_stream/_modify
Expand Down
Loading

0 comments on commit 6995410

Please sign in to comment.