TruncateAsync #
Removes all documents from a collection while keeping the associated mappings.
Arguments #
public async Task TruncateAsync(
string index,
string collection);
Argument | Type | Description |
---|---|---|
index | string | Index name |
collection | string | Collection name |
Usage #
try {
await kuzzle.Collection.TruncateAsync("nyc-open-data", "yellow-taxi");
Console.WriteLine("Collection successfully truncated");
} catch (Exception e) {
Console.WriteLine(e);
}
Edit this page on Github(opens new window)