Skip to content

Commit 4d387b6

Browse files
committed
fixing test and writing
1 parent 7694446 commit 4d387b6

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

qa/vector/src/main/java/org/elasticsearch/test/knn/KnnIndexTester.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ public static void main(String[] args) throws Exception {
211211
for (int i = 0; i < results.length; i++) {
212212
int nProbe = nProbes[i];
213213
KnnSearcher knnSearcher = new KnnSearcher(indexPath, cmdLineArgs, nProbe);
214-
knnSearcher.runSearch(results[i]);
214+
knnSearcher.runSearch(results[i], cmdLineArgs.earlyTermination());
215215
}
216216
}
217217
formattedResults.results.addAll(List.of(results));

server/src/main/java/org/elasticsearch/index/codec/vectors/DiskBBQBulkWriter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,10 @@ private static void writeCorrections(OptimizedScalarQuantizer.QuantizationResult
5858
private static void writeCorrection(OptimizedScalarQuantizer.QuantizationResult correction, IndexOutput out) throws IOException {
5959
out.writeInt(Float.floatToIntBits(correction.lowerInterval()));
6060
out.writeInt(Float.floatToIntBits(correction.upperInterval()));
61+
out.writeInt(Float.floatToIntBits(correction.additionalCorrection()));
6162
int targetComponentSum = correction.quantizedComponentSum();
6263
assert targetComponentSum >= 0 && targetComponentSum <= 0xffff;
6364
out.writeShort((short) targetComponentSum);
64-
out.writeInt(Float.floatToIntBits(correction.additionalCorrection()));
6565
}
6666

6767
public static class OneBitDiskBBQBulkWriter extends DiskBBQBulkWriter {

server/src/test/java/org/elasticsearch/search/vectors/AbstractDiversifyingChildrenIVFKnnVectorQueryTestCase.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ public void testSkewedIndex() throws IOException {
300300
);
301301
assertEquals(8, results.scoreDocs.length);
302302
assertIdMatches(reader, "10", results.scoreDocs[0].doc);
303-
assertIdMatches(reader, "8", results.scoreDocs[7].doc);
303+
assertIdMatches(reader, "6", results.scoreDocs[7].doc);
304304
}
305305
}
306306
}

0 commit comments

Comments
 (0)