Lucene.Net.Index.MergePolicy.FindForcedMerges C# (CSharp) Method

FindForcedMerges() public abstract method

Determine what set of merge operations is necessary in order to merge to <= the specified segment count. IndexWriter calls this when its IndexWriter#forceMerge method is called. this call is always synchronized on the IndexWriter instance so only one thread at a time will call this method.
public abstract FindForcedMerges ( SegmentInfos segmentInfos, int maxSegmentCount, bool?>.IDictionary segmentsToMerge ) : MergeSpecification
segmentInfos SegmentInfos /// the total set of segments in the index
maxSegmentCount int /// requested maximum number of segments in the index (currently this /// is always 1)
segmentsToMerge bool?>.IDictionary /// contains the specific SegmentInfo instances that must be merged /// away. this may be a subset of all /// SegmentInfos. If the value is True for a /// given SegmentInfo, that means this segment was /// an original segment present in the /// to-be-merged index; else, it was a segment /// produced by a cascaded merge.
return MergeSpecification
        public abstract MergeSpecification FindForcedMerges(SegmentInfos segmentInfos, int maxSegmentCount, IDictionary<SegmentCommitInfo, bool?> segmentsToMerge);

Usage Example

コード例 #1
0
        public virtual void TestNoMergePolicy_Mem()
        {
            MergePolicy mp = NoMergePolicy.NO_COMPOUND_FILES;

            Assert.IsNull(mp.FindMerges(/*null*/ (MergeTrigger)int.MinValue, (SegmentInfos)null));
            Assert.IsNull(mp.FindForcedMerges(null, 0, null));
            Assert.IsNull(mp.FindForcedDeletesMerges(null));
            Assert.IsFalse(mp.UseCompoundFile(null, null));
            mp.Dispose();
        }
All Usage Examples Of Lucene.Net.Index.MergePolicy::FindForcedMerges