Skip to content

Commit

Permalink
Fix TestHnswByteVectorGraph.testSortedAndUnsortedIndicesReturnSameRes…
Browse files Browse the repository at this point in the history
…ults (#13361)

Considering that the graphs of 2 indices are organized differently we need to explore a lot of candidates to ensure that both searchers find the same docs. Increasing beamWidth (number of nearest neighbor candidates to track while searching the graph for each newly inserted node) from 5 to 10 fixes the test.
  • Loading branch information
timgrein authored and ChrisHegarty committed May 17, 2024
1 parent 7aaba93 commit 5e48fdd
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ public void testSortedAndUnsortedIndicesReturnSameResults() throws IOException {
AbstractMockVectorValues<T> vectors = vectorValues(nDoc, dim);

int M = random().nextInt(10) + 5;
int beamWidth = random().nextInt(10) + 5;
int beamWidth = random().nextInt(10) + 10;
VectorSimilarityFunction similarityFunction =
RandomizedTest.randomFrom(VectorSimilarityFunction.values());
long seed = random().nextLong();
Expand Down

0 comments on commit 5e48fdd

Please sign in to comment.