mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-22 21:05:23 +00:00
docs: Updated examples and added note about the fact that the /
for date rounding in date math index names should be url encoded as %2F
This commit is contained in:
parent
533af17068
commit
999ede63e7
@ -88,13 +88,15 @@ You must enclose date math index name expressions within angle brackets. For exa
|
||||
|
||||
[source,js]
|
||||
----------------------------------------------------------------------
|
||||
curl -XGET 'localhost:9200/<logstash-{now/d-2d}>/_search' {
|
||||
curl -XGET 'localhost:9200/<logstash-{now%2Fd-2d}>/_search' {
|
||||
"query" : {
|
||||
...
|
||||
}
|
||||
}
|
||||
----------------------------------------------------------------------
|
||||
|
||||
NOTE: The `/` used for date rounding must be url encoded as `%2F` in any url.
|
||||
|
||||
The following example shows different forms of date math index names and the final index names
|
||||
they resolve to given the current time is 22rd March 2024 noon utc.
|
||||
|
||||
@ -119,7 +121,7 @@ three days, assuming the indices use the default Logstash index name format,
|
||||
|
||||
[source,js]
|
||||
----------------------------------------------------------------------
|
||||
curl -XGET 'localhost:9200/<logstash-{now/d-2d}>,<logstash-{now/d-1d}>,<logstash-{now/d}>/_search' {
|
||||
curl -XGET 'localhost:9200/<logstash-{now%2Fd-2d}>,<logstash-{now%2Fd-1d}>,<logstash-{now%2Fd}>/_search' {
|
||||
"query" : {
|
||||
...
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user