-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Michael Froh <[email protected]>
- Loading branch information
Showing
4 changed files
with
94 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
88 changes: 88 additions & 0 deletions
88
rest-api-spec/src/main/resources/rest-api-spec/test/search_shards/20_slice.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
--- | ||
"Search shards with slice specified in body": | ||
- skip: | ||
version: " - 2.99.99" | ||
reason: "Added slice body to search_shards in 2.19" | ||
- do: | ||
indices.create: | ||
index: test_index | ||
body: | ||
settings: | ||
index: | ||
number_of_shards: 7 | ||
number_of_replicas: 0 | ||
|
||
- do: | ||
search_shards: | ||
index: test_index | ||
body: | ||
slice: | ||
id: 0 | ||
max: 3 | ||
- length: { shards: 3 } | ||
- match: { shards.0.0.index: "test_index" } | ||
- match: { shards.0.0.shard: 0 } | ||
- match: { shards.1.0.shard: 3 } | ||
- match: { shards.2.0.shard: 6 } | ||
|
||
- do: | ||
search_shards: | ||
index: test_index | ||
body: | ||
slice: | ||
id: 1 | ||
max: 3 | ||
- length: { shards: 2 } | ||
- match: { shards.0.0.index: "test_index" } | ||
- match: { shards.0.0.shard: 1 } | ||
- match: { shards.1.0.shard: 4 } | ||
|
||
- do: | ||
search_shards: | ||
index: test_index | ||
body: | ||
slice: | ||
id: 2 | ||
max: 3 | ||
- length: { shards: 2 } | ||
- match: { shards.0.0.index: "test_index" } | ||
- match: { shards.0.0.shard: 2 } | ||
- match: { shards.1.0.shard: 5 } | ||
|
||
|
||
- do: | ||
search_shards: | ||
index: test_index | ||
preference: "_shards:0,2,4,6" | ||
body: | ||
slice: | ||
id: 0 | ||
max: 3 | ||
- length: { shards: 2 } | ||
- match: { shards.0.0.index: "test_index" } | ||
- match: { shards.0.0.shard: 0 } | ||
- match: { shards.1.0.shard: 6 } | ||
|
||
- do: | ||
search_shards: | ||
index: test_index | ||
preference: "_shards:0,2,4,6" | ||
body: | ||
slice: | ||
id: 1 | ||
max: 3 | ||
- length: { shards: 1 } | ||
- match: { shards.0.0.index: "test_index" } | ||
- match: { shards.0.0.shard: 2 } | ||
|
||
- do: | ||
search_shards: | ||
index: test_index | ||
preference: "_shards:0,2,4,6" | ||
body: | ||
slice: | ||
id: 2 | ||
max: 3 | ||
- length: { shards: 1 } | ||
- match: { shards.0.0.index: "test_index" } | ||
- match: { shards.0.0.shard: 4 } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters