|
@@ -230,13 +230,13 @@ dynamic templates:
|
|
|
refresh: true
|
|
|
body:
|
|
|
- '{ "create": { "dynamic_templates": { "data": "counter_metric" } } }'
|
|
|
- - '{ "@timestamp": "2023-09-01T13:03:08.138Z","data": "10", "attributes.dim": "A", "attributes.another.dim": "C" }'
|
|
|
+ - '{ "@timestamp": "2023-09-01T13:03:08.138Z", "data": "10", "attributes.dim1": "A", "attributes.dim2": "1", "attributes.another.dim1": "C", "attributes.another.dim2": "10" }'
|
|
|
- '{ "create": { "dynamic_templates": { "data": "counter_metric" } } }'
|
|
|
- - '{ "@timestamp": "2023-09-01T13:03:09.138Z","data": "20", "attributes.dim": "A", "attributes.another.dim": "C" }'
|
|
|
+ - '{ "@timestamp": "2023-09-01T13:03:09.138Z", "data": "20", "attributes.dim1": "A", "attributes.dim2": "1", "attributes.another.dim1": "C", "attributes.another.dim2": "10" }'
|
|
|
- '{ "create": { "dynamic_templates": { "data": "counter_metric" } } }'
|
|
|
- - '{ "@timestamp": "2023-09-01T13:03:10.138Z","data": "30", "attributes.dim": "B", "attributes.another.dim": "D" }'
|
|
|
+ - '{ "@timestamp": "2023-09-01T13:03:10.138Z", "data": "30", "attributes.dim1": "B", "attributes.dim2": "2", "attributes.another.dim1": "D", "attributes.another.dim2": "20" }'
|
|
|
- '{ "create": { "dynamic_templates": { "data": "counter_metric" } } }'
|
|
|
- - '{ "@timestamp": "2023-09-01T13:03:10.238Z","data": "40", "attributes.dim": "B", "attributes.another.dim": "D" }'
|
|
|
+ - '{ "@timestamp": "2023-09-01T13:03:10.238Z", "data": "40", "attributes.dim1": "B", "attributes.dim2": "2", "attributes.another.dim1": "D", "attributes.another.dim2": "20" }'
|
|
|
|
|
|
- do:
|
|
|
search:
|
|
@@ -255,14 +255,14 @@ dynamic templates:
|
|
|
filterA:
|
|
|
filter:
|
|
|
term:
|
|
|
- dim: A
|
|
|
+ dim1: A
|
|
|
aggs:
|
|
|
tsids:
|
|
|
terms:
|
|
|
field: _tsid
|
|
|
|
|
|
- length: { aggregations.filterA.tsids.buckets: 1 }
|
|
|
- - match: { aggregations.filterA.tsids.buckets.0.key: "KPLatIF-tbSjI8l9LcbTur4gYpiKF9nXxRUMHnJBiqqP58deEIun8H8" }
|
|
|
+ - match: { aggregations.filterA.tsids.buckets.0.key: "MD2HE8yse1ZklY-p0-bRcC8gYpiK8yYWLhfZ18WLDvTuBX1YJX1Ll7UMNJqYNES5Eg" }
|
|
|
- match: { aggregations.filterA.tsids.buckets.0.doc_count: 2 }
|
|
|
|
|
|
- do:
|
|
@@ -274,14 +274,52 @@ dynamic templates:
|
|
|
filterA:
|
|
|
filter:
|
|
|
term:
|
|
|
- another.dim: C
|
|
|
+ dim2: 1
|
|
|
aggs:
|
|
|
tsids:
|
|
|
terms:
|
|
|
field: _tsid
|
|
|
|
|
|
- length: { aggregations.filterA.tsids.buckets: 1 }
|
|
|
- - match: { aggregations.filterA.tsids.buckets.0.key: "KPLatIF-tbSjI8l9LcbTur4gYpiKF9nXxRUMHnJBiqqP58deEIun8H8" }
|
|
|
+ - match: { aggregations.filterA.tsids.buckets.0.key: "MD2HE8yse1ZklY-p0-bRcC8gYpiK8yYWLhfZ18WLDvTuBX1YJX1Ll7UMNJqYNES5Eg" }
|
|
|
+ - match: { aggregations.filterA.tsids.buckets.0.doc_count: 2 }
|
|
|
+
|
|
|
+ - do:
|
|
|
+ search:
|
|
|
+ index: k9s
|
|
|
+ body:
|
|
|
+ size: 0
|
|
|
+ aggs:
|
|
|
+ filterA:
|
|
|
+ filter:
|
|
|
+ term:
|
|
|
+ another.dim1: C
|
|
|
+ aggs:
|
|
|
+ tsids:
|
|
|
+ terms:
|
|
|
+ field: _tsid
|
|
|
+
|
|
|
+ - length: { aggregations.filterA.tsids.buckets: 1 }
|
|
|
+ - match: { aggregations.filterA.tsids.buckets.0.key: "MD2HE8yse1ZklY-p0-bRcC8gYpiK8yYWLhfZ18WLDvTuBX1YJX1Ll7UMNJqYNES5Eg" }
|
|
|
+ - match: { aggregations.filterA.tsids.buckets.0.doc_count: 2 }
|
|
|
+
|
|
|
+ - do:
|
|
|
+ search:
|
|
|
+ index: k9s
|
|
|
+ body:
|
|
|
+ size: 0
|
|
|
+ aggs:
|
|
|
+ filterA:
|
|
|
+ filter:
|
|
|
+ term:
|
|
|
+ another.dim2: 10
|
|
|
+ aggs:
|
|
|
+ tsids:
|
|
|
+ terms:
|
|
|
+ field: _tsid
|
|
|
+
|
|
|
+ - length: { aggregations.filterA.tsids.buckets: 1 }
|
|
|
+ - match: { aggregations.filterA.tsids.buckets.0.key: "MD2HE8yse1ZklY-p0-bRcC8gYpiK8yYWLhfZ18WLDvTuBX1YJX1Ll7UMNJqYNES5Eg" }
|
|
|
- match: { aggregations.filterA.tsids.buckets.0.doc_count: 2 }
|
|
|
|
|
|
---
|
|
@@ -425,13 +463,13 @@ dynamic templates with nesting:
|
|
|
refresh: true
|
|
|
body:
|
|
|
- '{ "create": { "dynamic_templates": { "data": "counter_metric" } } }'
|
|
|
- - '{ "@timestamp": "2023-09-01T13:03:08.138Z","data": "10", "resource.attributes.dim": "A", "resource.attributes.another.dim": "C", "attributes.more.dim": "E" }'
|
|
|
+ - '{ "@timestamp": "2023-09-01T13:03:08.138Z","data": "10", "resource.attributes.dim1": "A", "resource.attributes.another.dim1": "1", "attributes.dim2": "C", "attributes.another.dim2": "10" }'
|
|
|
- '{ "create": { "dynamic_templates": { "data": "counter_metric" } } }'
|
|
|
- - '{ "@timestamp": "2023-09-01T13:03:09.138Z","data": "20", "resource.attributes.dim": "A", "resource.attributes.another.dim": "C", "attributes.more.dim": "E" }'
|
|
|
+ - '{ "@timestamp": "2023-09-01T13:03:09.138Z","data": "20", "resource.attributes.dim1": "A", "resource.attributes.another.dim1": "1", "attributes.dim2": "C", "attributes.another.dim2": "10" }'
|
|
|
- '{ "create": { "dynamic_templates": { "data": "counter_metric" } } }'
|
|
|
- - '{ "@timestamp": "2023-09-01T13:03:10.138Z","data": "30", "resource.attributes.dim": "B", "resource.attributes.another.dim": "D", "attributes.more.dim": "F" }'
|
|
|
+ - '{ "@timestamp": "2023-09-01T13:03:10.138Z","data": "30", "resource.attributes.dim1": "B", "resource.attributes.another.dim1": "2", "attributes.dim2": "D", "attributes.another.dim2": "20" }'
|
|
|
- '{ "create": { "dynamic_templates": { "data": "counter_metric" } } }'
|
|
|
- - '{ "@timestamp": "2023-09-01T13:03:10.238Z","data": "40", "resource.attributes.dim": "B", "resource.attributes.another.dim": "D", "attributes.more.dim": "F" }'
|
|
|
+ - '{ "@timestamp": "2023-09-01T13:03:10.238Z","data": "40", "resource.attributes.dim1": "B", "resource.attributes.another.dim1": "2", "attributes.dim2": "D", "attributes.another.dim2": "20" }'
|
|
|
|
|
|
- do:
|
|
|
search:
|
|
@@ -450,14 +488,33 @@ dynamic templates with nesting:
|
|
|
filterA:
|
|
|
filter:
|
|
|
term:
|
|
|
- dim: A
|
|
|
+ dim1: A
|
|
|
+ aggs:
|
|
|
+ tsids:
|
|
|
+ terms:
|
|
|
+ field: _tsid
|
|
|
+
|
|
|
+ - length: { aggregations.filterA.tsids.buckets: 1 }
|
|
|
+ - match: { aggregations.filterA.tsids.buckets.0.key: "MK0AtuFZowY4QPzoYEAZNK7zJhYuIGKYiosO9O4X2dfFtp-JEbk39FSSMEq_vwX7uw" }
|
|
|
+ - match: { aggregations.filterA.tsids.buckets.0.doc_count: 2 }
|
|
|
+
|
|
|
+ - do:
|
|
|
+ search:
|
|
|
+ index: k9s
|
|
|
+ body:
|
|
|
+ size: 0
|
|
|
+ aggs:
|
|
|
+ filterA:
|
|
|
+ filter:
|
|
|
+ term:
|
|
|
+ dim2: C
|
|
|
aggs:
|
|
|
tsids:
|
|
|
terms:
|
|
|
field: _tsid
|
|
|
|
|
|
- length: { aggregations.filterA.tsids.buckets: 1 }
|
|
|
- - match: { aggregations.filterA.tsids.buckets.0.key: "LEjiJ4ATCXWlzeFvhGQ9lYlnP-nRIGKYihfZ18WoJ94t9a8OpbsCdwZALomb" }
|
|
|
+ - match: { aggregations.filterA.tsids.buckets.0.key: "MK0AtuFZowY4QPzoYEAZNK7zJhYuIGKYiosO9O4X2dfFtp-JEbk39FSSMEq_vwX7uw" }
|
|
|
- match: { aggregations.filterA.tsids.buckets.0.doc_count: 2 }
|
|
|
|
|
|
- do:
|
|
@@ -469,14 +526,14 @@ dynamic templates with nesting:
|
|
|
filterA:
|
|
|
filter:
|
|
|
term:
|
|
|
- another.dim: C
|
|
|
+ another.dim1: 1
|
|
|
aggs:
|
|
|
tsids:
|
|
|
terms:
|
|
|
field: _tsid
|
|
|
|
|
|
- length: { aggregations.filterA.tsids.buckets: 1 }
|
|
|
- - match: { aggregations.filterA.tsids.buckets.0.key: "LEjiJ4ATCXWlzeFvhGQ9lYlnP-nRIGKYihfZ18WoJ94t9a8OpbsCdwZALomb" }
|
|
|
+ - match: { aggregations.filterA.tsids.buckets.0.key: "MK0AtuFZowY4QPzoYEAZNK7zJhYuIGKYiosO9O4X2dfFtp-JEbk39FSSMEq_vwX7uw" }
|
|
|
- match: { aggregations.filterA.tsids.buckets.0.doc_count: 2 }
|
|
|
|
|
|
- do:
|
|
@@ -488,14 +545,14 @@ dynamic templates with nesting:
|
|
|
filterA:
|
|
|
filter:
|
|
|
term:
|
|
|
- more.dim: E
|
|
|
+ another.dim2: 10
|
|
|
aggs:
|
|
|
tsids:
|
|
|
terms:
|
|
|
field: _tsid
|
|
|
|
|
|
- length: { aggregations.filterA.tsids.buckets: 1 }
|
|
|
- - match: { aggregations.filterA.tsids.buckets.0.key: "LEjiJ4ATCXWlzeFvhGQ9lYlnP-nRIGKYihfZ18WoJ94t9a8OpbsCdwZALomb" }
|
|
|
+ - match: { aggregations.filterA.tsids.buckets.0.key: "MK0AtuFZowY4QPzoYEAZNK7zJhYuIGKYiosO9O4X2dfFtp-JEbk39FSSMEq_vwX7uw" }
|
|
|
- match: { aggregations.filterA.tsids.buckets.0.doc_count: 2 }
|
|
|
|
|
|
---
|