Skip to content

Commit

Permalink
Fix compilation on lucene_snapshot branch after recent Lucene upgrade.
Browse files Browse the repository at this point in the history
  • Loading branch information
jpountz committed Apr 11, 2024
1 parent f637420 commit 6ca913d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,9 @@ public ES813Int8FlatVectorFormat() {
*/
public ES813Int8FlatVectorFormat(Float confidenceInterval) {
super(NAME);
this.format = new Lucene99ScalarQuantizedVectorsFormat(confidenceInterval);
int bits = 7;
boolean compress = false;
this.format = new Lucene99ScalarQuantizedVectorsFormat(confidenceInterval, bits, compress);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -996,7 +996,9 @@ private Int8HnswIndexOptions(int m, int efConstruction, Float confidenceInterval

@Override
public KnnVectorsFormat getVectorsFormat() {
return new Lucene99HnswScalarQuantizedVectorsFormat(m, efConstruction, 1, confidenceInterval, null);
int bits = 7;
boolean compress = false;
return new Lucene99HnswScalarQuantizedVectorsFormat(m, efConstruction, 1, bits, compress, confidenceInterval, null);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1155,6 +1155,7 @@ public void testKnnQuantizedHNSWVectorsFormat() throws IOException {
+ ", flatVectorFormat=Lucene99ScalarQuantizedVectorsFormat("
+ "name=Lucene99ScalarQuantizedVectorsFormat, confidenceInterval="
+ (setConfidenceInterval ? confidenceInterval : null)
+ ", bits=7, compress=false"
+ ", rawVectorFormat=Lucene99FlatVectorsFormat()"
+ "))";
assertEquals(expectedString, knnVectorsFormat.toString());
Expand Down

0 comments on commit 6ca913d

Please sign in to comment.