SDK
SDK Dart v1.x
2

# mGet

Gets multiple documents.


# Arguments

Copied to clipboard!
Future<Map<String, dynamic>> mGet(
    String index,
    String collection,
    List<String> ids,
  )
Arguments Type Description
index
String
Index name
collection
String
Collection name
ids
List
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:

Property Type Description
_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

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