numDeletesToMerge

open override fun numDeletesToMerge(info: SegmentCommitInfo, delCount: Int, readerSupplier: IOSupplier<CodecReader>): Int

Returns the number of deletes that a merge would claim on the given segment. This method will by default return the sum of the del count on disk and the pending delete count. Yet, subclasses that wrap merge readers might modify this to reflect deletes that are carried over to the target segment in the case of soft deletes.

Soft deletes all deletes to survive across merges in order to control when the soft-deleted data is claimed.

Parameters

info

the segment info that identifies the segment

delCount

the number deleted documents for this segment

readerSupplier

a supplier that allows to obtain a CodecReader for this segment

See also