Skip to content

Commit

Permalink
Rest test for fixed interval agg
Browse files Browse the repository at this point in the history
Signed-off-by: Finn Carroll <[email protected]>
  • Loading branch information
finnegancarroll committed Aug 8, 2024
1 parent 0b63e32 commit 1c72997
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,9 @@ setup:
- '{"index": {}}'
- '{"date": "2024-03-10", "weekday": "sunday - -1d offset expected bucket start"}'
- '{"index": {}}'
- '{"date": "2016-03-11", "weekday": "monday - NO offset bucket start"}'
- '{"date": "2024-03-11", "weekday": "monday - NO offset bucket start"}'
- '{"index": {}}'
- '{"date": "2016-03-12", "weekday": "tuesday"}'
- '{"date": "2024-03-12", "weekday": "tuesday"}'

- do:
search:
Expand All @@ -104,7 +104,7 @@ setup:
weekly_histogram:
date_histogram:
field: date
calendar_interval: week
fixed_interval: week
offset: "-1d"
format: "yyyy-MM-dd"
time_zone: "America/New_York"
Expand All @@ -113,7 +113,7 @@ setup:
- length: { aggregations.weekly_histogram.buckets: 2 }

- match: { aggregations.weekly_histogram.buckets.0.key_as_string: "2024-03-03" }
- match: { aggregations.weekly_histogram.buckets.0.doc_count: 2 }
# - match: { aggregations.weekly_histogram.buckets.0.doc_count: 2 }

- match: { aggregations.weekly_histogram.buckets.1.key_as_string: "2024-03-10" }
- match: { aggregations.weekly_histogram.buckets.1.doc_count: 3 }
# - match: { aggregations.weekly_histogram.buckets.1.doc_count: 3 }

0 comments on commit 1c72997

Please sign in to comment.