code: func (w *Writer) Index() (*MemoryIndex, error) {
  	w.m.Lock()
  	defer w.m.Unlock()
  
  	if w.index == nil {
  		return w.createIndex()
  	}
  
  	return w.index, nil
  }
docs: // Index returns a previously created MemoryIndex or creates a new one if
  // needed.