code: func ReadFieldInfos(info *SegmentCommitInfo) (fis FieldInfos, err error) {
  	var dir store.Directory
  	var closeDir bool
  	if info.FieldInfosGen() == -1 && info.Info.IsCompoundFile() {
  		// no fieldInfos gen and segment uses a compound file
  		if dir, err = store.NewCompoundFileDirectory(info.Info.Dir,
  			util.SegmentFileName(info.Info.Name, "", store.COMPOUND_FILE_EXTENSION),
  			store.IO_CONTEXT_READONCE, false); err != nil {
  			return
  		}
  		closeDir = true
  	} else {
  		// gen'd FIS are read outside CFS, or the segment doesn't use a compound file
  		dir = info.Info.Dir
  		closeDir = false
  	}
  
  	defer func() {
  		if closeDir {
  			err = mergeError(err, dir.Close())
  		}
  	}()
  
  	var segmentSuffix string
  	if n := info.FieldInfosGen(); n != -1 {
  		segmentSuffix = strconv.FormatInt(n, 36)
  	}
  	codec := info.Info.Codec().(Codec)
  	fisFormat := codec.FieldInfosFormat()
  	return fisFormat.FieldInfosReader()(dir, info.Info.Name, segmentSuffix, store.IO_CONTEXT_READONCE)
  }
docs: /* Reads the most recent FieldInfos of the given segment info. */