SDK
SDK Jvm v1.x
2

getMapping #

Returns the collection mapping.


:::: tabs ::: tab Java

Arguments #

public CompletableFuture<Map<String, Object>> getMapping(
      final String index,
      final String collection) throws NotConnectedException, InternalException

ArgumentsTypeDescription
index
String
Index name
collection
String
Collection name

Returns #

Returns a Map<String, Object> representing the collection mappings.

Usage #

Map<String, Object> result = kuzzle
  .getCollectionController()
  .getMapping("nyc-open-data", "yellow-taxi")
  .get();
/*
{
  _meta={
    schema={},
    allowForm=false
  },
  dynamic=true,
  properties={
    key={
      type=text
      }
    }
  }
*/

::: ::: tab Kotlin

Arguments #

fun getMapping(
    index: String,
    collection: String
  ): CompletableFuture<Map<String, Any?>>
ArgumentsTypeDescription
index
String
Index name
collection
String
Collection name

Returns #

Returns a Map<String, Any?> representing the collection mappings.

Usage #

val result = kuzzle
  .collectionController
  .getMapping("nyc-open-data", "yellow-taxi")
  .get()
/*
{
  _meta={
    schema={},
    allowForm=false
  },
  dynamic=true,
  properties={
    key={
      type=text
      }
    }
  }
*/

::: ::::