readCommit
fun readCommit(directory: Directory, segmentFileName: String, minSupportedMajorVersion: Int = Version.MIN_SUPPORTED_MAJOR): SegmentInfos
Read a particular segmentFileName. Note that this may throw an IOException if a commit is in process.
Parameters
directory
-- directory containing the segments file
segmentFileName
-- segment file to load
Throws
if the index is corrupt
IOException
if there is a low-level IO error
fun readCommit(directory: Directory, input: ChecksumIndexInput, generation: Long, minSupportedMajorVersion: Int = Version.MIN_SUPPORTED_MAJOR): SegmentInfos
Read the commit from the provided ChecksumIndexInput.