SDK
SDK Java v3.x
2

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

delete #

Deletes a document.


Arguments #

public CompletableFuture<ConcurrentHashMap<String, Object>> delete(
      final String index,
      final String collection,
      final String id)
throws NotConnectedException, InternalException

public CompletableFuture<ConcurrentHashMap<String, Object>> delete(
      final String index,
      final String collection,
      final String id,
      final Boolean waitForRefresh)
throws NotConnectedException, InternalException
ArgumentsTypeDescription
index
String
Index
collection
String
Collection
id
String
Document ID
waitForRefresh
Boolean
(optional)
If set to true, Kuzzle will wait for the persistence layer to finish indexing

Return #

A ConcurrentHashMap which has the following property:

PropertyTypeDescription
_id
String
ID of the deleted document

Usage #

kuzzle.getDocumentController().delete("nyc-open-data", "yellow-taxi", "some-id")
.get();