[DOCS] Adds example of better index resolve to transforms at scale (#92234)

Co-authored-by: Przemysław Witek <przemyslaw.witek@elastic.co>
This commit is contained in:
István Zoltán Szabó 2022-12-12 15:18:49 +01:00 committed by GitHub
parent ebc09dd8d6
commit 6561c47317
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -116,6 +116,23 @@ example, greater than `2020-01-01T00:00:00`) to limit which historical indices
are accessed. If you use a relative time value (for example, `now-30d`) then are accessed. If you use a relative time value (for example, `now-30d`) then
this date range is re-evaluated at the point of each checkpoint execution. this date range is re-evaluated at the point of each checkpoint execution.
Consider using <<api-date-math-index-names,date math>> in your index names to
reduce the number of indices to resolve in your queries. Add a date pattern
- for example, `yyyy-MM-dd` - to your index names and use it to limit your query
to a specific date. The example below queries indices only from yesterday and
today:
[source,js]
----------------------------------
"source": {
"index": [
"<mydata-{now/d-1d{yyyy-MM-dd}}*>",
"<mydata-{now/d{yyyy-MM-dd}}*>"
]
},
----------------------------------
// NOTCONSOLE
[discrete] [discrete]
[[optimize-shading-strategy]] [[optimize-shading-strategy]]