File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
server/src/main/java/org/elasticsearch/index/codec/vectors/diskbbq/next Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -120,7 +120,11 @@ public CentroidIterator getCentroidIterator(
120120 float visitRatio
121121 ) throws IOException {
122122 final FieldEntry fieldEntry = fields .get (fieldInfo .number );
123- final float approximateDocsPerCentroid = approximateCost / numCentroids ;
123+ float approximateDocsPerCentroid = approximateCost / numCentroids ;
124+ if (approximateDocsPerCentroid <= 1.25 ) {
125+ // TODO: we need to make this call to build the iterator, otherwise accept docs breaks all together
126+ approximateDocsPerCentroid = acceptDocs .cost ();
127+ }
124128 final int bitsRequired = DirectWriter .bitsRequired (numCentroids );
125129 final long sizeLookup = directWriterSizeOnDisk (values .size (), bitsRequired );
126130 final long fp = centroids .getFilePointer ();
You can’t perform that action at this time.
0 commit comments