How to reindex using last weeks

I have a metricbeat index. "metricbeat" index contains documents from 2019 and 2020. I want to re-index the documents from last weekend (w-1) and (w-2) (w-n).


POST _reindex
  "source": {
    "index": "metricbeat*"
  "dest": {
    "pipeline": "metricbeat_reindex",
    "index": "metricbeat-lastweek"

I'm looking for a pipeline "metricbeat_reindex" to determine the documents of the past week (w-1) and (w-n).

I'm just wondering if you should not use this: ? With w as the date_rounding parameter.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.