code: func (c *holderCleaner) CleanHolder() error {
  	for _, index := range c.Holder.Indexes() {
  		// Verify cleaner has not closed.
  		if c.IsClosing() {
  			return nil
  		}
  
  		// Get the fragments that node is responsible for (based on hash(index, node)).
  		containedShards := c.Cluster.containsShards(index.Name(), index.AvailableShards(), c.Node)
  
  		// Get the fragments registered in memory.
  		for _, field := range index.Fields() {
  			for _, view := range field.views() {
  				for _, fragment := range view.allFragments() {
  					fragShard := fragment.shard
  					// Ignore fragments that should be present.
  					if uint64InSlice(fragShard, containedShards) {
  						continue
  					}
  					// Delete fragment.
  					if err := view.deleteFragment(fragShard); err != nil {
  						return errors.Wrap(err, "deleting fragment")
  					}
  				}
  			}
  		}
  	}
  	return nil
  }
docs: // CleanHolder compares the holder with the cluster state and removes
  // any unnecessary fragments and files.