mDelete

Deletes multiple indexes at once.

Signature

Copied to clipboard!
std::vector<std::string> mDelete(const std::vector<std::string>& indexes);

std::vector<std::string> mDelete(
    const std::vector<std::string>& indexes,
    const kuzzleio::query_options& options);

Arguments

Arguments Type Description
indexes
std::vector <std::string>
List of indexes
options
kuzzleio::query_options*
Query options

options

Additional query options

Option Type
(default)
Description
queuable
bool

(true)
If true, queues the request during downtime, until connected to Kuzzle again

Return

A vector of string containing the list of deleted indexes.

Exceptions

Throws a kuzzleio::KuzzleException if there is an error. See how to handle error.

Usage

Copied to clipboard!
std::vector<std::string> indexes;

indexes.push_back("nyc-open-data");
indexes.push_back("mtp-open-data");

try {
  std::vector<std::string> deleted = kuzzle->index->mDelete(indexes);

  std::cout << "Successfully deleted " << deleted.size() << " indexes" << std::endl;
} catch (kuzzleio::KuzzleException &e) {
  std::cerr << e.what() << std::endl;
}