SDK
SDK Java v3.x
2

This SDK is deprecated. We recommend to use the Kuzzle SDK-JVM.
A migration guide is available here

truncate #

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


public CompletableFuture<Void> truncate(
      final String index,
      final String collection) throws NotConnectedException, InternalException

ArgumentsTypeDescription
index
String
Index name
collection
String
Collection name

Usage #

kuzzle.getCollectionController().truncate("nyc-open-data", "yellow-taxi").get();