code: func (api *API) DeleteAvailableShard(_ context.Context, indexName, fieldName string, shardID uint64) error {
  	if err := api.validate(apiDeleteAvailableShard); err != nil {
  		return errors.Wrap(err, "validating api method")
  	}
  
  	// Find field.
  	field := api.holder.Field(indexName, fieldName)
  	if field == nil {
  		return newNotFoundError(ErrFieldNotFound)
  	}
  
  	// Delete shard from the cache.
  	if err := field.RemoveAvailableShard(shardID); err != nil {
  		return errors.Wrap(err, "deleting available shard")
  	}
  
  	// Send the delete shard message to all nodes.
  	err := api.server.SendSync(
  		&DeleteAvailableShardMessage{
  			Index:   indexName,
  			Field:   fieldName,
  			ShardID: shardID,
  		})
  	if err != nil {
  		api.server.logger.Printf("problem sending DeleteAvailableShard message: %s", err)
  		return errors.Wrap(err, "sending DeleteAvailableShard message")
  	}
  	api.holder.Stats.CountWithCustomTags("deleteAvailableShard", 1, 1.0, []string{fmt.Sprintf("index:%s", indexName), fmt.Sprintf("field:%s", fieldName)})
  	return nil
  }
docs: // DeleteAvailableShard a shard ID from the available shard set cache.