Skip to content

Commit 91ef808

Browse files
committed
Added yaml file for the search load / shard level
1 parent 8b1f24d commit 91ef808

File tree

1 file changed

+54
-0
lines changed
  • rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/indices.stats

1 file changed

+54
-0
lines changed
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
---
2+
"Search load is tracked at shard level":
3+
- do:
4+
indices.create:
5+
index: testindex
6+
body:
7+
settings:
8+
index.number_of_shards: 1
9+
index.number_of_replicas: 0
10+
mappings:
11+
properties:
12+
name:
13+
type: text
14+
description:
15+
type: text
16+
price:
17+
type: double
18+
19+
- do:
20+
indices.stats:
21+
index: "testindex"
22+
level: shards
23+
metric: [ search ]
24+
25+
- match: { _all.total.search.recent_search_load: 0.0 }
26+
- match: { indices.testindex.total.search.recent_search_load: 0.0 }
27+
- match: { indices.testindex.shards.0.0.search.recent_search_load: 0.0 }
28+
29+
- do:
30+
index:
31+
index: testindex
32+
body: { "name": "specialty coffee", "description": "arabica coffee beans", "price": 100 }
33+
- do:
34+
index:
35+
index: testindex
36+
body: { "name": "commercial coffee", "description": "robusta coffee beans", "price": 50 }
37+
- do:
38+
index:
39+
index: testindex
40+
body: { "name": "raw coffee", "description": "colombian coffee beans", "price": 25 }
41+
- do:
42+
index:
43+
index: testindex
44+
body: { "name": "book", "description": "some book", "price": 1000 }
45+
46+
- do:
47+
indices.stats:
48+
index: "testindex"
49+
level: shards
50+
metric: [ search ]
51+
52+
- gte: { _all.total.search.recent_search_load: 0.0 }
53+
- gte: { indices.testindex.total.search.recent_search_load: 0.0 }
54+
- gte: { indices.testindex.shards.0.0.search.recent_search_load: 0.0 }

0 commit comments

Comments
 (0)