Skip to content

Commit

Permalink
Adjust knn merge stability testing (#14172)
Browse files Browse the repository at this point in the history
  • Loading branch information
benwtrent authored Jan 29, 2025
1 parent feb0e18 commit de4f07b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,9 @@ public void testMergeStability() throws Exception {
new IndexWriterConfig(new MockAnalyzer(random()))
.setUseCompoundFile(false)
.setMergePolicy(mp);
if (VERBOSE) {
cfg.setInfoStream(System.out);
}
IndexWriter w = new IndexWriter(dir, cfg);
final int numDocs = atLeast(500);
for (int i = 0; i < numDocs; ++i) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,14 @@ protected void addRandomFields(Document doc) {
}
}

@Override
protected boolean mergeIsStable() {
// suppress this test from base class: merges for knn graphs are not stable due to connected
// components
// logic
return false;
}

private int getVectorsMaxDimensions(String fieldName) {
return Codec.getDefault().knnVectorsFormat().getMaxDimensions(fieldName);
}
Expand Down

0 comments on commit de4f07b

Please sign in to comment.