Skip to content

Commit

Permalink
Fix flaky test #109978 (#110245)
Browse files Browse the repository at this point in the history
CCS tests could split the vectors over any number of shards. Through
empirical testing, I determined this commits values work to provide the
expected order, even if they are not all part of the same shard. 

quantization can have weird behaviors when there are uniform values,
just like this test does.

closes #109978
  • Loading branch information
benwtrent authored Jul 8, 2024
1 parent f2382a9 commit 9dbe97b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
4 changes: 0 additions & 4 deletions muted-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,6 @@ tests:
- class: "org.elasticsearch.xpack.searchablesnapshots.FrozenSearchableSnapshotsIntegTests"
issue: "https://github.com/elastic/elasticsearch/issues/110408"
method: "testCreateAndRestorePartialSearchableSnapshot"
- class: org.elasticsearch.test.rest.yaml.CcsCommonYamlTestSuiteIT
method: test {p0=search.vectors/41_knn_search_half_byte_quantized/Test create, merge,
and search cosine}
issue: https://github.com/elastic/elasticsearch/issues/109978
- class: "org.elasticsearch.xpack.esql.qa.mixed.MixedClusterEsqlSpecIT"
issue: "https://github.com/elastic/elasticsearch/issues/110591"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,7 @@ setup:
index: hnsw_byte_quantized_merge_cosine
id: "1"
body:
embedding: [1.0, 1.0, 1.0, 1.0]
embedding: [0.5, 0.5, 0.5, 0.5, 0.5, 1.0]

# Flush in order to provoke a merge later
- do:
Expand All @@ -439,7 +439,7 @@ setup:
index: hnsw_byte_quantized_merge_cosine
id: "2"
body:
embedding: [1.0, 1.0, 1.0, 2.0]
embedding: [0.0, 0.0, 0.0, 1.0, 1.0, 0.5]

# Flush in order to provoke a merge later
- do:
Expand All @@ -450,7 +450,7 @@ setup:
index: hnsw_byte_quantized_merge_cosine
id: "3"
body:
embedding: [1.0, 1.0, 1.0, 3.0]
embedding: [0.0, 0.0, 0.0, 0.0, 0.0, 10.5]

- do:
indices.forcemerge:
Expand All @@ -468,7 +468,7 @@ setup:
query:
knn:
field: embedding
query_vector: [1.0, 1.0, 1.0, 1.0]
query_vector: [1.0, 1.0, 1.0, 1.0, 1.0, 1.0]
num_candidates: 10

- length: { hits.hits: 3 }
Expand Down

0 comments on commit 9dbe97b

Please sign in to comment.