code: func (v *view) deleteFragment(shard uint64) error {
  	fragment := v.Fragment(shard)
  	if fragment == nil {
  		return ErrFragmentNotFound
  	}
  
  	v.logger.Printf("delete fragment: (%s/%s/%s) %d", v.index, v.field, v.name, shard)
  
  	// Close data files before deletion.
  	if err := fragment.Close(); err != nil {
  		return errors.Wrap(err, "closing fragment")
  	}
  
  	// Delete fragment file.
  	if err := os.Remove(fragment.path); err != nil {
  		return errors.Wrap(err, "deleting fragment file")
  	}
  
  	// Delete fragment cache file.
  	if err := os.Remove(fragment.cachePath()); err != nil {
  		v.logger.Printf("no cache file to delete for shard %d", shard)
  	}
  
  	delete(v.fragments, shard)
  
  	return nil
  }
docs: // deleteFragment removes the fragment from the view.