Skip to content

Commit

Permalink
Data stream support for async search
Browse files Browse the repository at this point in the history
  • Loading branch information
danhermann authored Jul 9, 2020
1 parent c26d2b5 commit c7e9777
Showing 1 changed file with 71 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit c7e9777

Please sign in to comment.