public static SegmentInfos readSegmentInfos(IndexCommit commit) throws IOException {
  String filename=IndexFileNames.fileNameFromGeneration(IndexFileNames.SEGMENTS,"",commit.getGeneration());
  return SegmentInfos.readCommit(commit.getDirectory(),filename);
}

public static SegmentInfos readSegmentInfos ( IndexCommit commit ) throws IOException { String filename = IndexFileNames . fileNameFromGeneration ( IndexFileNames . SEGMENTS , "" , commit . getGeneration ( ) ) ; return SegmentInfos . readCommit ( commit . getDirectory ( ) , filename ) ; }
reads the segments infos from the given commit , failing if it fails to load
