-
Notifications
You must be signed in to change notification settings - Fork 89
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
base: main
Are you sure you want to change the base?
Update aliases.md #1419
Conversation
❌ Author of the following commits did not sign a Contributor Agreement: Please, read and sign the above mentioned agreement if you want to contribute to this project |
# PUT <my-index-{now/d}-000001> | ||
PUT %3Cmy-index-%7Bnow%2Fd%7D-000001%3E | ||
# Index with index aliases | ||
PUT <my-index-{now/d}-000001> |
There was a problem hiding this comment.
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>
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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!
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
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 :) |
As far as I know, doing this in Kibana devTools console doesn't really work (at least with older versions):
That returns an error. The way to create an index with the right date pattern in the name is:
That returns:
@martinsbleu : where are you able to do directly a |
No description provided.