SDK
SDK Jvm v1.x
2

exists #

Checks if a collection exists.

:::: tabs ::: tab Java

Arguments #

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

ArgumentsTypeDescription
index
String
Index
collection
String
Collection

Return #

Returns a boolean.

Usage #

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

::: ::: tab Kotlin

Arguments #

  fun exists(
      index: String,
      collection: String
    ): CompletableFuture<Boolean>
ArgumentsTypeDescription
index
String
Index
collection
String
Collection

Return #

Returns a boolean.

Usage #

val result = kuzzle
  .collectionController
  .exists("nyc-open-data", "yellow-taxi")
  .get()

::: ::::