code: func NewSegmentReader(si *SegmentCommitInfo,
  	termInfosIndexDivisor int, context store.IOContext) (r *SegmentReader, err error) {
  
  	r = &SegmentReader{}
  	r.AtomicReaderImpl = newAtomicReader(r)
  	r.ARFieldsReader = r
  
  	r.si = si
  	if r.fieldInfos, err = ReadFieldInfos(si); err != nil {
  		return nil, err
  	}
  	// log.Print("Obtaining SegmentCoreReaders...")
  	if r.core, err = newSegmentCoreReaders(r, si.Info.Dir, si, context, termInfosIndexDivisor); err != nil {
  		return nil, err
  	}
  	// r.segDocValues = newSegmentDocValues()
  
  	var success = false
  	defer func() {
  		// With lock-less commits, it's entirely possible (and
  		// fine) to hit a FileNotFound exception above.  In
  		// this case, we want to explicitly close any subset
  		// of things that were opened so that we don't have to
  		// wait for a GC to do so.
  		if !success {
  			// log.Printf("Failed to initialize SegmentReader.")
  			r.core.decRef()
  		}
  	}()
  
  	codec := si.Info.Codec().(Codec)
  	if si.HasDeletions() {
  		panic("not supported yet")
  	} else {
  		assert(si.DelCount() == 0)
  	}
  	r.numDocs = si.Info.DocCount() - si.DelCount()
  
  	if r.fieldInfos.HasDocValues {
  		r.initDocValuesProducers(codec)
  	}
  	success = true
  	return r, nil
  }
docs: /**
   * Constructs a new SegmentReader with a new core.
   * @throws CorruptIndexException if the index is corrupt
   * @throws IOException if there is a low-level IO error
   */
  // TODO: why is this public?