Skip to content

Latest commit

 

History

History
48 lines (32 loc) · 1.84 KB

File metadata and controls

48 lines (32 loc) · 1.84 KB
code type title description
true
page
updateMapping
Update the collection mapping

updateMapping

You can define the collection dynamic mapping policy by setting the dynamic field to the desired value.

You can define collection additional metadata within the _meta root field.


Future<Map<String, dynamic>> updateMapping(
    String index,
    String collection,
    Map<String, dynamic> mapping,
  )

Arguments Type Description
index
String
Index name
collection
String
Collection name
mapping
Map<String, dynamic>
Describes the collection mapping

mapping

An object representing the collection data mapping.

This object must have a root field properties that contain the mapping definition:

More informations about database mappings here.

Returns

Returns a Map<String, dynamic>

Usage

<<< ./snippets/update-mapping.dart