[DOCS] Add PUT example to `Date math in index names` (#60908) (#60920)

Previously, all examples in this section were GET requests. This
demonstrates that other CRUD operations are also supported.
This commit is contained in:
James Rodewig 2020-08-10 12:46:10 -04:00 committed by GitHub
parent dfd502f9ca
commit 877ecd5b66
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 13 deletions

View File

@ -85,19 +85,10 @@ You must enclose date math index name expressions within angle brackets, and
all special characters should be URI encoded. For example:
[source,console]
----------------------------------------------------------------------
# GET /<logstash-{now/d}>/_search
GET /%3Clogstash-%7Bnow%2Fd%7D%3E/_search
{
"query" : {
"match": {
"test": "data"
}
}
}
----------------------------------------------------------------------
// TEST[s/^/PUT logstash-2016.09.20\n/]
// TEST[s/now/2016.09.20%7C%7C/]
----
# PUT /<my-index-{now/d}>
PUT /%3Cmy-index-%7Bnow%2Fd%7D%3E
----
[NOTE]
.Percent encoding of date math characters