SDK
SDK Jvm v1.x
2

exists #

Checks if a document exists.


:::: tabs ::: tab Java

Arguments #

public CompletableFuture<Boolean> exists(
      String index,
      String collection,
      String id)
throws NotConnectedException, InternalException

ArgumentsTypeDescription
index
String
Index
collection
String
Collection
id
String
Document ID

Return #

Returns a boolean.

Usage #

Boolean result = kuzzle
  .getDocumentController()
  .exists("nyc-open-data", "yellow-taxi", "some-id")
  .get();

::: ::: tab Kotlin

Arguments #

fun exists(
      index: String,
      collection: String,
      id: String): CompletableFuture<Boolean>

ArgumentsTypeDescription
index
String
Index
collection
String
Collection
id
String
Document ID

Return #

Returns a boolean.

Usage #

val result: Boolean = kuzzle
  .documentController
  .exists("nyc-open-data", "yellow-taxi", "some-id")
  .get()

::: ::::