code: func (i *Index) DeleteField(name string) error {
  	i.mu.Lock()
  	defer i.mu.Unlock()
  
  	// Confirm field exists.
  	f := i.field(name)
  	if f == nil {
  		return newNotFoundError(ErrFieldNotFound)
  	}
  
  	// Close field.
  	if err := f.Close(); err != nil {
  		return errors.Wrap(err, "closing")
  	}
  
  	// Delete field directory.
  	if err := os.RemoveAll(i.fieldPath(name)); err != nil {
  		return errors.Wrap(err, "removing directory")
  	}
  
  	// If the field being deleted is the existence field,
  	// turn off existence tracking on the index.
  	if name == existenceFieldName {
  		i.trackExistence = false
  		i.existenceFld = nil
  
  		// Update meta data on disk.
  		if err := i.saveMeta(); err != nil {
  			return errors.Wrap(err, "saving existence meta data")
  		}
  	}
  
  	// Remove reference.
  	delete(i.fields, name)
  
  	return nil
  }
docs: // DeleteField removes a field from the index.