Skip to content

Commit

Permalink
Tests passing locally
Browse files Browse the repository at this point in the history
  • Loading branch information
alexklibisz committed Aug 26, 2024
1 parent 1e008ba commit 56348f2
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -119,16 +119,16 @@ public int nextDoc() {
while (true) {
if (numEmitted == candidates || docID + 1 > maxKey) {
docID = DocIdSetIterator.NO_MORE_DOCS;
return docID();
return docID;
} else {
docID++;
if (counts[docID] > kgr.kthGreatest) {
numEmitted++;
return docID();
return docID;
} else if (counts[docID] == kgr.kthGreatest && numEq < candidates - kgr.numGreaterThan) {
numEq++;
numEmitted++;
return docID();
return docID;
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,21 +40,21 @@ class RecallSuite extends AsyncFunSuite with Matchers with ElasticAsyncClient wi

private val tests = Seq(
// Exact
// Test(
// Mapping.SparseBool(dims),
// Seq(
// NearestNeighborsQuery.Exact(vecField, Similarity.Jaccard) -> 1d,
// NearestNeighborsQuery.Exact(vecField, Similarity.Hamming) -> 1d
// )
// ),
// Test(
// Mapping.DenseFloat(dims),
// Seq(
// NearestNeighborsQuery.Exact(vecField, Similarity.L1) -> 1d,
// NearestNeighborsQuery.Exact(vecField, Similarity.L2) -> 1d,
// NearestNeighborsQuery.Exact(vecField, Similarity.Cosine) -> 1d
// )
// ),
Test(
Mapping.SparseBool(dims),
Seq(
NearestNeighborsQuery.Exact(vecField, Similarity.Jaccard) -> 1d,
NearestNeighborsQuery.Exact(vecField, Similarity.Hamming) -> 1d
)
),
Test(
Mapping.DenseFloat(dims),
Seq(
NearestNeighborsQuery.Exact(vecField, Similarity.L1) -> 1d,
NearestNeighborsQuery.Exact(vecField, Similarity.L2) -> 1d,
NearestNeighborsQuery.Exact(vecField, Similarity.Cosine) -> 1d
)
),
// Jaccard LSH
Test(
Mapping.JaccardLsh(dims, 200, 1),
Expand Down

0 comments on commit 56348f2

Please sign in to comment.