SDK
SDK Jvm v1.x
2

getMapping #

Returns the collection mapping.


:::: tabs ::: tab Java

Arguments #

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

Arguments Type Description
index
String
Index name
collection
String
Collection name

Returns #

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

Usage #

Copied to clipboard!
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 #

Copied to clipboard!
fun getMapping(
    index: String,
    collection: String
  ): CompletableFuture<Map<String, Any?>>
Arguments Type Description
index
String
Index name
collection
String
Collection name

Returns #

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

Usage #

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

::: ::::