Package org.apache.lucene.tests.index
Class ForceMergePolicy
- java.lang.Object
-
- org.apache.lucene.index.MergePolicy
-
- org.apache.lucene.index.FilterMergePolicy
-
- org.apache.lucene.tests.index.ForceMergePolicy
-
- All Implemented Interfaces:
Unwrappable<MergePolicy>
public final class ForceMergePolicy extends FilterMergePolicy
AMergePolicy
that only returns forced merges.NOTE: Use this policy if you wish to disallow background merges but wish to run optimize/forceMerge segment merges.
- WARNING: This API is experimental and might change in incompatible ways in the next release.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.lucene.index.MergePolicy
MergePolicy.MergeAbortedException, MergePolicy.MergeContext, MergePolicy.MergeException, MergePolicy.MergeSpecification, MergePolicy.OneMerge, MergePolicy.OneMergeProgress
-
-
Field Summary
-
Fields inherited from class org.apache.lucene.index.FilterMergePolicy
in
-
Fields inherited from class org.apache.lucene.index.MergePolicy
DEFAULT_MAX_CFS_SEGMENT_SIZE, DEFAULT_NO_CFS_RATIO, maxCFSSegmentSize, noCFSRatio
-
-
Constructor Summary
Constructors Constructor Description ForceMergePolicy(MergePolicy in)
Create a newForceMergePolicy
around the givenMergePolicy
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MergePolicy.MergeSpecification
findMerges(MergeTrigger mergeTrigger, SegmentInfos segmentInfos, MergePolicy.MergeContext mergeContext)
-
Methods inherited from class org.apache.lucene.index.FilterMergePolicy
findForcedDeletesMerges, findForcedMerges, findFullFlushMerges, findMerges, getMaxCFSSegmentSizeMB, getNoCFSRatio, keepFullyDeletedSegment, maxFullFlushMergeSize, numDeletesToMerge, setMaxCFSSegmentSizeMB, setNoCFSRatio, size, toString, unwrap, useCompoundFile
-
Methods inherited from class org.apache.lucene.index.MergePolicy
assertDelCount, isMerged, message, segString, verbose
-
-
-
-
Constructor Detail
-
ForceMergePolicy
public ForceMergePolicy(MergePolicy in)
Create a newForceMergePolicy
around the givenMergePolicy
-
-
Method Detail
-
findMerges
public MergePolicy.MergeSpecification findMerges(MergeTrigger mergeTrigger, SegmentInfos segmentInfos, MergePolicy.MergeContext mergeContext) throws IOException
- Overrides:
findMerges
in classFilterMergePolicy
- Throws:
IOException
-
-