Skip to content

Commit 191d5e2

Browse files
authored
Fixing ES818HnswBinaryQuantizedVectorsFormatTests test case (elastic#118336)
Need to be more lenient on the floating point epsilon. This is OK as generally, if something was wrong with this test, we would get results like `NaN` and `0` or extremely different scores. closes: elastic#118306
1 parent 85f37ac commit 191d5e2

File tree

2 files changed

+1
-4
lines changed

2 files changed

+1
-4
lines changed

muted-tests.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -291,9 +291,6 @@ tests:
291291
- class: org.elasticsearch.xpack.test.rest.XPackRestIT
292292
method: test {p0=migrate/10_reindex/Test Reindex With Nonexistent Data Stream}
293293
issue: https://github.com/elastic/elasticsearch/issues/118274
294-
- class: org.elasticsearch.index.codec.vectors.es818.ES818HnswBinaryQuantizedVectorsFormatTests
295-
method: testSingleVectorCase
296-
issue: https://github.com/elastic/elasticsearch/issues/118306
297294
- class: org.elasticsearch.action.search.SearchQueryThenFetchAsyncActionTests
298295
method: testBottomFieldSort
299296
issue: https://github.com/elastic/elasticsearch/issues/118214

server/src/test/java/org/elasticsearch/index/codec/vectors/es818/ES818HnswBinaryQuantizedVectorsFormatTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ public void testSingleVectorCase() throws Exception {
103103
assertEquals(1, td.totalHits.value());
104104
assertTrue(td.scoreDocs[0].score >= 0);
105105
// When it's the only vector in a segment, the score should be very close to the true score
106-
assertEquals(trueScore, td.scoreDocs[0].score, 0.0001f);
106+
assertEquals(trueScore, td.scoreDocs[0].score, 0.01f);
107107
}
108108
}
109109
}

0 commit comments

Comments
 (0)