truncate #
Removes all documents from a collection, while keeping the associated mappings and settings.
Edit this page on Github (opens new window)
Removes all documents from a collection, while keeping the associated mappings and settings.
public CompletableFuture<Void> truncate(
final String index,
final String collection) throws NotConnectedException, InternalException
Arguments | Type | Description |
---|---|---|
index | String | Index name |
collection | String | Collection name |
kuzzle.getCollectionController().truncate("nyc-open-data", "yellow-taxi").get();