code: func (h *Holder) DeleteIndex(name string) error {
  	h.mu.Lock()
  	defer h.mu.Unlock()
  
  	// Confirm index exists.
  	index := h.index(name)
  	if index == nil {
  		return newNotFoundError(ErrIndexNotFound)
  	}
  
  	// Close index.
  	if err := index.Close(); err != nil {
  		return errors.Wrap(err, "closing")
  	}
  
  	// Delete index directory.
  	if err := os.RemoveAll(h.IndexPath(name)); err != nil {
  		return errors.Wrap(err, "removing directory")
  	}
  
  	// Remove reference.
  	delete(h.indexes, name)
  
  	return nil
  }
docs: // DeleteIndex removes an index from the holder.