SDK
SDK C# v1.x
1

You are currently looking at the documentation of a previous version of Kuzzle. We strongly recommend that you use the latest version. You can also use the version selector in the top menu.

TruncateAsync #

Removes all documents from a collection while keeping the associated mappings.

Arguments #

Copied to clipboard!
public async Task TruncateAsync(
        string index,
        string collection);
Argument Type Description
index
string
Index name
collection
string
Collection name

Usage #

Copied to clipboard!
try {
  await kuzzle.Collection.TruncateAsync("nyc-open-data", "yellow-taxi");
  Console.WriteLine("Collection successfully truncated");
} catch (Exception e) {
  Console.WriteLine(e);
}