Always use one shard in vector REST tests. (#51643)
This PR tries to address the intermittent vector test failures on 7.x by making sure we create indices with one shard. The fix is based on this theory as to what's happening: * On 7.x, the default number of shards is 1, but in REST tests we randomly use 2 in order to cover the multiple shards case. In the failing test run, we use 2 shards and all documents end up on only one shard. * During a search, the response from the empty shard doesn't produce deprecation warnings because we never try to execute the script. If not all shard responses contain the warning headers, then certain deprecation warnings can be lost (due to the bug described in #33936). Addresses #50716. Relates to #50061.
This commit is contained in:
parent
fdf74f6ae4
commit
9dcc3ef7e6
|
@ -10,6 +10,7 @@ setup:
|
|||
index: test-index
|
||||
body:
|
||||
settings:
|
||||
number_of_shards: 1
|
||||
number_of_replicas: 0
|
||||
mappings:
|
||||
properties:
|
||||
|
|
|
@ -10,6 +10,7 @@ setup:
|
|||
index: test-index
|
||||
body:
|
||||
settings:
|
||||
number_of_shards: 1
|
||||
number_of_replicas: 0
|
||||
mappings:
|
||||
properties:
|
||||
|
|
|
@ -10,9 +10,8 @@ setup:
|
|||
index: test-index
|
||||
body:
|
||||
settings:
|
||||
number_of_replicas: 0
|
||||
# we need to have 1 shard to get request failure in test "Dense vectors should error with sparse vector functions"
|
||||
number_of_shards: 1
|
||||
number_of_replicas: 0
|
||||
mappings:
|
||||
properties:
|
||||
my_dense_vector:
|
||||
|
|
|
@ -12,6 +12,7 @@ setup:
|
|||
index: test-index
|
||||
body:
|
||||
settings:
|
||||
number_of_shards: 1
|
||||
number_of_replicas: 0
|
||||
mappings:
|
||||
properties:
|
||||
|
|
|
@ -12,6 +12,7 @@ setup:
|
|||
index: test-index
|
||||
body:
|
||||
settings:
|
||||
number_of_shards: 1
|
||||
number_of_replicas: 0
|
||||
mappings:
|
||||
properties:
|
||||
|
|
|
@ -12,9 +12,8 @@ setup:
|
|||
index: test-index
|
||||
body:
|
||||
settings:
|
||||
number_of_replicas: 0
|
||||
# we need to have 1 shard to get request failure in test "Sparse vectors should error with dense vector functions"
|
||||
number_of_shards: 1
|
||||
number_of_replicas: 0
|
||||
mappings:
|
||||
properties:
|
||||
my_sparse_vector:
|
||||
|
|
|
@ -17,6 +17,9 @@ setup:
|
|||
indices.create:
|
||||
index: test-index1
|
||||
body:
|
||||
settings:
|
||||
number_of_shards: 1
|
||||
number_of_replicas: 0
|
||||
mappings:
|
||||
properties:
|
||||
my_dense_vector1:
|
||||
|
|
Loading…
Reference in New Issue