mReplace method

Future<Map<String, dynamic>> mReplace(
  1. String index,
  2. String collection,
  3. List<Map<String, dynamic>> documents, {
  4. bool waitForRefresh = false,
})

Replaces multiple documents.

Implementation

Future<Map<String, dynamic>> mReplace(
  String index,
  String collection,
  List<Map<String, dynamic>> documents, {
  bool waitForRefresh = false,
}) async {
  final response = await kuzzle.query(KuzzleRequest(
    controller: name,
    action: 'mReplace',
    index: index,
    collection: collection,
    body: <String, dynamic>{'documents': documents},
    waitForRefresh: waitForRefresh,
  ));

  return response.result as Map<String, dynamic>;
}