Package org.apache.lucene.index
Interface MergePolicy.MergeContext
- All Known Implementing Classes:
IndexWriter
- Enclosing class:
- MergePolicy
public static interface MergePolicy.MergeContext
This interface represents the current context of the merge selection process. It allows to
access real-time information like the currently merging segments or how many deletes a segment
would claim back if merged. This context might be stateful and change during the execution of a
merge policy's selection processes.
- WARNING: This API is experimental and might change in incompatible ways in the next release.
-
Method Summary
Modifier and TypeMethodDescriptionReturns the info stream that can be used to log messagesReturns an unmodifiable set of segments that are currently merging.int
Returns the number of deleted documents in the given segments.int
Returns the number of deletes a merge would claim back if the given segment is merged.
-
Method Details
-
numDeletesToMerge
Returns the number of deletes a merge would claim back if the given segment is merged.- Parameters:
info
- the segment to get the number of deletes for- Throws:
IOException
- See Also:
-
numDeletedDocs
Returns the number of deleted documents in the given segments. -
getInfoStream
InfoStream getInfoStream()Returns the info stream that can be used to log messages -
getMergingSegments
Set<SegmentCommitInfo> getMergingSegments()Returns an unmodifiable set of segments that are currently merging.
-