This filtertype will iterate over the actionable list and match indices or snapshots based on whether they fit within the given time range. They will remain in, or be removed from the actionable list based on the value of exclude.
- filtertype: period source: name range_from: -1 range_to: -1 timestring: '%Y.%m.%d' unit: weeks week_starts_on: sunday
Empty values and commented lines will result in the default value, if any, being selected. If a setting is set, but not used by a given filtertype, it may generate an error.
For the purposes of this filter, a unit can be one of
years. Unless an epoch timestamp
is provided, reckoning will be centered on execution time. Reckoning is
truncated to the most recent whole unit. For example, if I selected
unit, and I began execution at 02:35, then the point of reckoning would be
02:00. This is relatively easy with
years, but slightly
more complicated with
weeks. Some users may wish to reckon weeks by the ISO
standard, which starts weeks on Monday. Others may wish to use Sunday as the
first day of the week. Both are acceptable options with the
The default behavior for
weeks is to have Sunday be the start of the week.
This can be overridden with week_starts_on as follows:
- filtertype: period source: name range_from: -1 range_to: -1 timestring: '%Y.%m.%d' unit: weeks week_starts_on: monday
range_from and range_to are counters of whole
units. A negative number indicates a whole unit in the past, while
a positive number indicates a whole unit in the future. A
0 indicates the
present unit. With such a timeline mentality, it is relatively easy to create
a date range that will meet your needs.
If the time of execution time is 2017-04-03T13:45:23.831, this table will help you figure out what the previous whole unit, current unit, and next whole unit will be, in ISO8601 format.
Ranges must be from older dates to newer dates, or smaller numbers (including negative numbers) to larger numbers or Curator will return an exception.
period filter demonstrating how to select all daily indices by
timestring found in the index name from last month might look like this:
- filtertype: period source: name range_from: -1 range_to: -1 timestring: '%Y.%m.%d' unit: months
range_to both be the same value will mean that only
that whole unit will be selected, in this case, a month.