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

Update aliases.md #1419

wants to merge 1 commit into from

Conversation

martinsbleu
Copy link

No description provided.

Copy link

❌ Author of the following commits did not sign a Contributor Agreement:
e40e359

Please, read and sign the above mentioned agreement if you want to contribute to this project

Comment on lines -212 to +213
# PUT <my-index-{now/d}-000001>
PUT %3Cmy-index-%7Bnow%2Fd%7D-000001%3E
# Index with index aliases
PUT <my-index-{now/d}-000001>
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

@leemthompo
Copy link
Contributor

Thanks for the contribution @martinsbleu! FYI it would be helpful to put a summary of the suggested changes in the PR description to help us understand the motivation :)

@eedugon
Copy link
Contributor

eedugon commented May 21, 2025

As far as I know, doing this in Kibana devTools console doesn't really work (at least with older versions):

PUT <my-index-{now/d}-000001>

That returns an error.

The way to create an index with the right date pattern in the name is:

PUT %3Cmy-index-%7Bnow%2Fd%7D-000001%3E

That returns:

{
  "acknowledged": true,
  "shards_acknowledged": true,
  "index": "my-index-2025.05.21-000002"
}

@martinsbleu : where are you able to do directly a PUT <my-index-{now/d}-000001> without encoding the characters?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants