code: func (api *API) DeleteIndex(ctx context.Context, indexName string) error {
  	span, _ := tracing.StartSpanFromContext(ctx, "API.DeleteIndex")
  	defer span.Finish()
  
  	if err := api.validate(apiDeleteIndex); err != nil {
  		return errors.Wrap(err, "validating api method")
  	}
  
  	// Delete index from the holder.
  	err := api.holder.DeleteIndex(indexName)
  	if err != nil {
  		return errors.Wrap(err, "deleting index")
  	}
  	// Send the delete index message to all nodes.
  	err = api.server.SendSync(
  		&DeleteIndexMessage{
  			Index: indexName,
  		})
  	if err != nil {
  		api.server.logger.Printf("problem sending DeleteIndex message: %s", err)
  		return errors.Wrap(err, "sending DeleteIndex message")
  	}
  	api.holder.Stats.Count("deleteIndex", 1, 1.0)
  	return nil
  }
docs: // DeleteIndex removes the named index. If the index is not found it does
  // nothing and returns no error.