Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,19 @@

@ThreadLeakScope(ThreadLeakScope.Scope.NONE)
public class TestLowCardinalityFiltering extends LuceneTestCase {
/*
This test replicates https://github.com/jbellis/pwtest/tree/master natively in JVector.
It splits the vectors in two classes (with probability 0.5) and tests that the filtering works when the query belongs to one of them.
*/
@Test
public void testLowCardinalityFiltering() throws IOException {
testLowCardinalityFiltering(32, 0.01f, 0.87f, false);
testLowCardinalityFiltering(32, 0.01f, 0.87f, true);
testLowCardinalityFiltering(32, 0.044f, 0.91f, false);
testLowCardinalityFiltering(32, 0.048f, 0.93f, true);
}
public void testLowCardinalityFiltering(int maxDegree, float visitedRatioThreshold, float recallThreshold, boolean addHierarchy) throws IOException {
var R = getRandom();

int nVectors = 100_000;
int nVectors = 10_000;
int nQueries = 100;
int dimensions = 16;
int topK = 10;
Expand Down