/// <summary>
/// Returns true if this single info is already fully merged (has no
/// pending deletes, is in the same dir as the
/// writer, and matches the current compound file setting
/// </summary>
protected internal bool IsMerged(SegmentInfos infos, SegmentCommitInfo info)
{
IndexWriter w = Writer.Get();
Debug.Assert(w != null);
bool hasDeletions = w.NumDeletedDocs(info) > 0;
return(!hasDeletions && !info.Info.HasSeparateNorms() && info.Info.Dir == w.Directory && UseCompoundFile(infos, info) == info.Info.UseCompoundFile);
}