|
@@ -409,3 +409,76 @@
|
|
|
indices.delete_data_stream:
|
|
|
name: simple-data-stream1
|
|
|
- is_true: acknowledged
|
|
|
+
|
|
|
+---
|
|
|
+"Verify data stream resolvability in rollup search":
|
|
|
+ - skip:
|
|
|
+ version: " - 7.99.99"
|
|
|
+ reason: "change to 7.8.99 after backport"
|
|
|
+ features: allowed_warnings
|
|
|
+
|
|
|
+ - do:
|
|
|
+ allowed_warnings:
|
|
|
+ - "index template [my-template1] has index patterns [simple-data-stream1] matching patterns from existing older templates [global] with patterns (global => [*]); this template [my-template1] will take precedence during new index creation"
|
|
|
+ indices.put_index_template:
|
|
|
+ name: my-template1
|
|
|
+ body:
|
|
|
+ index_patterns: [simple-data-stream1]
|
|
|
+ template:
|
|
|
+ mappings:
|
|
|
+ properties:
|
|
|
+ '@timestamp':
|
|
|
+ type: date
|
|
|
+ partition:
|
|
|
+ type: keyword
|
|
|
+ price:
|
|
|
+ type: integer
|
|
|
+ data_stream:
|
|
|
+ timestamp_field: '@timestamp'
|
|
|
+
|
|
|
+ - do:
|
|
|
+ indices.create_data_stream:
|
|
|
+ name: simple-data-stream1
|
|
|
+ - is_true: acknowledged
|
|
|
+
|
|
|
+ - do:
|
|
|
+ index:
|
|
|
+ index: simple-data-stream1
|
|
|
+ body: { partition: a, price: 1, '@timestamp': '2020-12-12T00:00:00.000Z' }
|
|
|
+
|
|
|
+ - do:
|
|
|
+ index:
|
|
|
+ index: simple-data-stream1
|
|
|
+ body: { partition: a, price: 2, '@timestamp': '2020-12-12T01:00:00.000Z' }
|
|
|
+
|
|
|
+ - do:
|
|
|
+ index:
|
|
|
+ index: simple-data-stream1
|
|
|
+ body: { partition: b, price: 3, '@timestamp': '2020-12-12T01:00:00.000Z' }
|
|
|
+
|
|
|
+ - do:
|
|
|
+ indices.refresh:
|
|
|
+ index: simple-data-stream1
|
|
|
+
|
|
|
+ - do:
|
|
|
+ rollup.rollup_search:
|
|
|
+ index: "simple-data-stream1"
|
|
|
+ body:
|
|
|
+ size: 0
|
|
|
+ aggs:
|
|
|
+ histo:
|
|
|
+ date_histogram:
|
|
|
+ field: "@timestamp"
|
|
|
+ calendar_interval: "1h"
|
|
|
+ time_zone: "UTC"
|
|
|
+
|
|
|
+ - length: { aggregations.histo.buckets: 2 }
|
|
|
+ - match: { aggregations.histo.buckets.0.key_as_string: "2020-12-12T00:00:00.000Z" }
|
|
|
+ - match: { aggregations.histo.buckets.0.doc_count: 1 }
|
|
|
+ - match: { aggregations.histo.buckets.1.key_as_string: "2020-12-12T01:00:00.000Z" }
|
|
|
+ - match: { aggregations.histo.buckets.1.doc_count: 2 }
|
|
|
+
|
|
|
+ - do:
|
|
|
+ indices.delete_data_stream:
|
|
|
+ name: simple-data-stream1
|
|
|
+ - is_true: acknowledged
|