private DirectoryReader DoOpenNoWriter(IndexCommit commit)
{
if (commit == null)
{
if (Current)
{
return null;
}
}
else
{
if (Directory_Renamed != commit.Directory)
{
throw new System.IO.IOException("the specified commit does not match the specified Directory");
}
if (SegmentInfos != null && commit.SegmentsFileName.Equals(SegmentInfos.SegmentsFileName))
{
return null;
}
}
return DoOpenFromCommit(commit);
}