MDeleteAsync #
Deletes multiple documents.
Throws a partial error (error code 206) if one or more document deletions fail.
Arguments #
public async Task<string[]> MDeleteAsync(
string index,
string collection,
string[] ids,
bool waitForRefresh = false);
Argument | Type | Description |
---|---|---|
index | string | Index name |
collection | string | Collection name |
ids | string[] | IDs of the documents to delete |
waitForRefresh | bool ( false ) | If true , waits for the change to be reflected for search (up to 1s) |
Return #
An array of strings containing the deleted document IDs.
Exceptions #
Throws a KuzzleException
if there is an error. See how to handle errors.
Usage #
try {
string[] deleted = await kuzzle.Document.MDeleteAsync(
"nyc-open-data",
"yellow-taxi",
new string[] { "some-id", "some-other-id" });
Console.WriteLine($"Successfully deleted {deleted.Length} documents");
} catch (KuzzleException e) {
Console.Error.WriteLine(e);
}
Edit this page on Github(opens new window)