findMerges

open override fun findMerges(mergeTrigger: MergeTrigger?, segmentInfos: SegmentInfos?, mergeContext: MergePolicy.MergeContext?): MergePolicy.MergeSpecification?

Determine what set of merge operations are now necessary on the index. IndexWriter calls this whenever there is a change to the segments. This call is always synchronized on the IndexWriter instance so only one thread at a time will call this method.

Parameters

mergeTrigger

the event that triggered the merge

segmentInfos

the total set of segments in the index

mergeContext

the IndexWriter to find the merges on


open override fun findMerges(vararg readers: CodecReader): MergePolicy.MergeSpecification

Define the set of merge operations to perform on provided codec readers in .

The merge operation is required to convert provided readers into segments that can be added to the writer. This API can be overridden in custom merge policies to control the concurrency for addIndexes. Default implementation creates a single merge operation for all provided readers (lowest concurrency). Creating a merge for each reader, would provide the highest level of concurrency possible with the configured merge scheduler.

Parameters

readers

CodecReader(s) to merge into the main index