Check index sorting with no replica since we cannot ensure that the replica index is ready when forceMerge is called. Closes #24416

This commit is contained in:
Jim Ferenczi 2017-05-02 20:25:09 +02:00
parent db16038061
commit 6fcd24d264
1 changed files with 18 additions and 6 deletions

View File

@ -11,7 +11,7 @@
body:
settings:
number_of_shards: 1
number_of_replicas: 1
number_of_replicas: 0
index.sort.field: rank
mappings:
test:
@ -19,6 +19,10 @@
rank:
type: integer
- do:
cluster.health:
wait_for_status: green
- do:
index:
index: test
@ -60,6 +64,14 @@
indices.refresh:
index: test
- do:
indices.segments:
index: test
- match: { _shards.total: 1}
- length: { indices.test.shards.0: 1}
- length: { indices.test.shards.0.0.segments: 1}
- do:
search:
index: test
@ -67,9 +79,9 @@
body:
sort: _doc
- match: {hits.total: 4 }
- match: {hits.total: 4 }
- length: {hits.hits: 4 }
- match: {hits.hits.0._id: "2" }
- match: {hits.hits.1._id: "4" }
- match: {hits.hits.2._id: "3" }
- match: {hits.hits.3._id: "1" }
- match: {hits.hits.0._id: "2" }
- match: {hits.hits.1._id: "4" }
- match: {hits.hits.2._id: "3" }
- match: {hits.hits.3._id: "1" }