code: func (w *IndexWriter) fieldNumberMap() (m *FieldNumbers, err error) {
  	m = NewFieldNumbers()
  	for _, info := range w.segmentInfos.Segments {
  		fis, err := ReadFieldInfos(info)
  		if err != nil {
  			return nil, err
  		}
  		for _, fi := range fis.Values {
  			m.AddOrGet(fi)
  		}
  	}
  	return m, nil
  }
docs: // func (w *IndexWriter) fieldInfos(info *SegmentInfo) (infos FieldInfos, err error) {
  // 	var cfsDir store.Directory
  // 	if info.IsCompoundFile() {
  // 		cfsDir, err = store.NewCompoundFileDirectory(
  // 			info.Dir,
  // 			util.SegmentFileName(info.Name, "", store.COMPOUND_FILE_EXTENSION),
  // 			store.IO_CONTEXT_READONCE,
  // 			false,
  // 		)
  // 		if err != nil {
  // 			return
  // 		}
  // 		assert(cfsDir != nil)
  // 		defer func() {
  // 			err = mergeError(err, cfsDir.Close())
  // 		}()
  // 	} else {
  // 		cfsDir = info.Dir
  // 	}
  // 	return info.Codec().(Codec).FieldInfosFormat().FieldInfosReader()(
  // 		cfsDir, info.Name, store.IO_CONTEXT_READONCE)
  // }
  /*
  Loads or returns the alread loaded the global field number map for
  this SegmentInfos. If this SegmentInfos has no global field number
  map the returned instance is empty.
  */