elasticsearch_dsl/search/aggregations/params/gap_policy.rs
1/// Gap policies are a mechanism to inform the pipeline aggregation about the desired behavior when
2/// "gappy" or missing data is encountered. All pipeline aggregations accept the `gap_policy`
3/// parameter.
4#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize)]
5#[serde(rename_all = "snake_case")]
6pub enum GapPolicy {
7 /// This option treats missing data as if the bucket does not exist. It will skip the bucket
8 /// and continue calculating using the next available value.
9 Skip,
10
11 /// This option will replace missing values with a zero (0) and pipeline aggregation
12 /// computation will proceed as normal.
13 InsertZeros,
14
15 /// This option is similar to skip, except if the metric provides a non-null, non-NaN value
16 /// this value is used, otherwise the empty bucket is skipped.
17 KeepValues,
18}