findFullFlushMerges
Identifies merges that we want to execute (synchronously) on commit. By default, this will return .findMerges whose segments are all less than the .maxFullFlushMergeSize.
Any merges returned here will make IndexWriter.commit, or IndexWriter.getReader block until the merges complete or until IndexWriterConfig.getMaxFullFlushMergeWaitMillis has elapsed. This may be used to merge small segments that have just been flushed, reducing the number of segments in the point in time snapshot. If a merge does not complete in the allotted time, it will continue to execute, and eventually finish and apply to future point in time snapshot, but will not be reflected in the current one.
If a OneMerge in the returned MergeSpecification includes a segment already included in a registered merge, then IndexWriter.commit or will throw a IllegalStateException. Use MergeContext.getMergingSegments to determine which segments are currently registered to merge.
Parameters
the event that triggered the merge (COMMIT or GET_READER).
the total set of segments in the index (while preparing the commit)
the MergeContext to find the merges on, which should be used to determine which segments are already in a registered merge (see MergeContext.getMergingSegments).