Data stream support for async search

This commit is contained in:
Dan Hermann 2020-07-09 13:12:04 -05:00 committed by GitHub
parent c26d2b5fa5
commit c7e977701a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 71 additions and 0 deletions

View File

@ -338,3 +338,74 @@
indices.delete_data_stream:
name: simple-data-stream1
- is_true: acknowledged
---
"Verify data stream resolvability in async 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
data_stream:
timestamp_field: '@timestamp'
- do:
indices.create_data_stream:
name: simple-data-stream1
- is_true: acknowledged
- do:
index:
index: simple-data-stream1
body: { max: 2 }
- do:
index:
index: simple-data-stream1
body: { max: 1 }
- do:
index:
index: simple-data-stream1
body: { max: 3 }
- do:
indices.refresh:
index: simple-data-stream1
- do:
async_search.submit:
index: simple-data-stream1
batched_reduce_size: 2
wait_for_completion_timeout: 10s
body:
query:
match_all: {}
aggs:
max:
max:
field: max
sort: max
- is_false: id
- match: { is_partial: false }
- length: { response.hits.hits: 3 }
- match: { response.hits.hits.0._source.max: 1 }
- match: { response.aggregations.max.value: 3.0 }
- do:
indices.delete_data_stream:
name: simple-data-stream1
- is_true: acknowledged