Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,11 @@ public CentroidIterator getCentroidIterator(
float visitRatio
) throws IOException {
final FieldEntry fieldEntry = fields.get(fieldInfo.number);
final float approximateDocsPerCentroid = approximateCost / numCentroids;
float approximateDocsPerCentroid = approximateCost / numCentroids;
if (approximateDocsPerCentroid <= 1.25) {
// TODO: we need to make this call to build the iterator, otherwise accept docs breaks all together
approximateDocsPerCentroid = acceptDocs.cost();
}
final int bitsRequired = DirectWriter.bitsRequired(numCentroids);
final long sizeLookup = directWriterSizeOnDisk(values.size(), bitsRequired);
final long fp = centroids.getFilePointer();
Expand Down