UseCompoundFile() public méthode

Returns true if a new segment (regardless of its origin) should use the compound file format. The default implementation returns true iff the size of the given mergedInfo is less or equal to #getMaxCFSSegmentSizeMB() and the size is less or equal to the TotalIndexSize * #getNoCFSRatio() otherwise false.
public UseCompoundFile ( SegmentInfos infos, Lucene.Net.Index.SegmentCommitInfo mergedInfo ) : bool
infos SegmentInfos
mergedInfo Lucene.Net.Index.SegmentCommitInfo
Résultat bool
        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();
        }
Exemple #2
0
 public override bool UseCompoundFile(SegmentInfos segments, SegmentCommitInfo newSegment)
 {
     return(m_base.UseCompoundFile(segments, newSegment));
 }