Skip to content

Update aliases.md #1419

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
4 changes: 2 additions & 2 deletions manage-data/data-store/aliases.md
Original file line number Diff line number Diff line change
Expand Up @@ -209,8 +209,8 @@ PUT _index_template/my-index-template
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>
PUT %3Cmy-index-%7Bnow%2Fd%7D-000001%3E
# Index with index aliases
PUT <my-index-{now/d}-000001>
Comment on lines -212 to +213
Copy link
Contributor

@leemthompo leemthompo May 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this a good suggestion because Kibana console requires URL-encoded characters for special syntax like angle brackets. The change would have replaced a working example (PUT %3Cmy-index-%7Bnow%2Fd%7D-000001%3E) with non-functional code (PUT <my-index-{now/d}-000001>).

A better approach is to keep the URL-encoded (working) version while using clearer comments to explain what it represents. Perhaps something like:

# The following command uses URL encoding required by Kibana Console.
# This is equivalent to the command: PUT <my-index-{now/d}-000001>

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kderusso can you keep me honest here? I'm not sure if we document this URL-encoding requirement anywhere and if that's a gap we should fill.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct, the existing example works, but the updated example will return an error in the dev console:

{
  "error": "no handler found for uri [/%3Cmy-index-%7Bnow/d%7D-000001%3E?pretty=true] and method [PUT]"
}

I like your suggestion to update the comment accordingly!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

++ to that, your comment is a great idea. We need to show users that theoretically the call is <my-index-{now/d}-000001> but we have to encode the characters. That is also explained in some KBs already.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@martinsbleu if you'd like to keep the existing example but update the comment per my recommendation that would be a nice improvement

{
"aliases": {
"my-alias": {}
Expand Down
Loading