SDK
SDK Jvm v1.x
2

delete #

Deletes a document.


:::: tabs ::: tab Java

Arguments #

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

public CompletableFuture<Map<String, Object>> delete(
      String index,
      String collection,
      String id,
      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 Map 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();

::: ::: tab Kotlin

Arguments #

fun delete(
      index: String,
      collection: String,
      id: String?,
      waitForRefresh: Boolean? = null): CompletableFuture<Map<String, Any?>>
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 Map which has the following property:

PropertyTypeDescription
_id
String
ID of the deleted document

Usage #

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

::: ::::