forked from elastic/elasticsearch
-
Notifications
You must be signed in to change notification settings - Fork 0
/
10_basic.yml
122 lines (110 loc) · 2.62 KB
/
10_basic.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
---
"Verify that we can still find things with the template":
- do:
search_template:
index: test_search_template
body:
id: test_search_template
params:
f1: v5_old
- match: { hits.total: 1 }
---
"Verify custom cluster metadata still exists after rolling upgrade":
- do:
snapshot.get_repository:
repository: my_repo
- is_true: my_repo
- do:
ingest.get_pipeline:
id: "my_pipeline"
- match: { my_pipeline.description: "_description" }
---
"Index percolator query and use the percolate query in upgraded cluster":
- do:
index:
index: queries
type: doc
id: q4
refresh: true
body:
query:
bool:
minimum_should_match: 2
should:
- term:
field1: value
- term:
field2: value
- do:
search:
index: queries
body:
query:
percolate:
field: query
document:
field1: value
- match: { hits.total: 1 }
- match: { hits.hits.0._id: q1 }
- do:
search:
index: queries
body:
sort: _id
query:
percolate:
field: query
document:
field1: value
field2: value
- match: { hits.total: 3 }
- match: { hits.hits.0._id: q1 }
- match: { hits.hits.1._id: q2 }
- match: { hits.hits.2._id: q4 }
- do:
search:
index: queries
body:
query:
percolate:
field: query
document:
field2: value
field3: value
- match: { hits.total: 1 }
- match: { hits.hits.0._id: q3 }
---
"Find a task result record from the old cluster":
- skip:
features: headers
- do:
search:
index: .tasks
body:
query:
match_all: {}
- match: { hits.total: 1 }
- match: { hits.hits.0._id: '/.+:\d+/' }
- set: {hits.hits.0._id: task_id}
- do:
tasks.get:
task_id: $task_id
- is_false: node_failures
- is_true: task
- do:
headers: { "X-Opaque-Id": "Reindexing Again" }
reindex:
wait_for_completion: false
body:
source:
index: reindexed_index_copy
size: 1
dest:
index: reindexed_index_another_copy
- match: { task: '/.+:\d+/' }
- set: { task: task_id }
- do:
tasks.get:
wait_for_completion: true
task_id: $task_id
- match: { task.headers.X-Opaque-Id: "Reindexing Again" }