@@ -73,8 +73,7 @@ public final class Lucene99HnswVectorsReader extends KnnVectorsReader
73
73
74
74
private static final long SHALLOW_SIZE =
75
75
RamUsageEstimator .shallowSizeOfInstance (Lucene99HnswVectorsFormat .class );
76
- // Number of ordinals to score at a time when scoring exhaustively rather than
77
- // using HNSW.
76
+ // Number of ordinals to score at a time when scoring exhaustively rather than using HNSW.
78
77
private static final int EXHAUSTIVE_BULK_SCORE_ORDS = 64 ;
79
78
80
79
private final FlatVectorsReader flatVectorsReader ;
@@ -341,8 +340,8 @@ private void search(
341
340
// The approximate number of vectors that would be visited if we did not filter
342
341
int unfilteredVisit = HnswGraphSearcher .expectedVisitedNodes (knnCollector .k (), graph .size ());
343
342
if (acceptDocs instanceof BitSet bitSet ) {
344
- // Use approximate cardinality as this is good enough, but ensure we don't
345
- // exceed the graph size as that is illogical
343
+ // Use approximate cardinality as this is good enough, but ensure we don't exceed the graph
344
+ // size as that is illogical
346
345
filteredDocCount = Math .min (bitSet .approximateCardinality (), graph .size ());
347
346
if (unfilteredVisit >= filteredDocCount ) {
348
347
doHnsw = false ;
@@ -352,8 +351,8 @@ private void search(
352
351
HnswGraphSearcher .search (
353
352
scorer , collector , getGraph (fieldEntry ), acceptedOrds , filteredDocCount );
354
353
} else {
355
- // if k is larger than the number of vectors we expect to visit in an HNSW
356
- // search, we can just iterate over all vectors and collect them.
354
+ // if k is larger than the number of vectors we expect to visit in an HNSW search,
355
+ // we can just iterate over all vectors and collect them.
357
356
int [] ords = new int [EXHAUSTIVE_BULK_SCORE_ORDS ];
358
357
float [] scores = new float [EXHAUSTIVE_BULK_SCORE_ORDS ];
359
358
int numOrds = 0 ;
@@ -443,8 +442,7 @@ private record FieldEntry(
443
442
int dimension ,
444
443
int size ,
445
444
int [][] nodesByLevel ,
446
- // for each level the start offsets in vectorIndex file from where to read
447
- // neighbours
445
+ // for each level the start offsets in vectorIndex file from where to read neighbours
448
446
DirectMonotonicReader .Meta offsetsMeta ,
449
447
long offsetsOffset ,
450
448
int offsetsBlockShift ,
0 commit comments