SDK
SDK Dart Null Safety v3.x
2

mGet #

Gets multiple documents.


Arguments #

Future<Map<String, dynamic>> mGet(
    String index,
    String collection,
    List<String> ids,
  )
ArgumentsTypeDescription
index
String
Index name
collection
String
Collection name
idsList<String>Document IDs

Return #

A Map<String, dynamic> which has a successes and errors: Each created document is an object of the successes array with the following properties:

PropertyTypeDescription
_source
Map<String, dynamic>
Document content
_id
String
Document ID
_version
int
Version of the document in the persistent data storage

The errors array contains the IDs of not found documents.

Usage #

final result = await kuzzle
  .document
  .mGet('nyc-open-data', 'yellow-taxi', [
    'some-id',
    'some-id2'
  ]);