updateDoc method
Update doc
in index
.
Implementation
Future<bool> updateDoc({
required String index,
required Map<String, dynamic> doc,
String? type,
String? id,
bool merge = false,
}) async {
final pathSegments = <String>[
index,
if (type != null) type,
if (merge) '_update',
if (id != null) id,
];
final rs =
await _transport.send(Request('POST', pathSegments, bodyMap: doc));
return rs.statusCode == 200 || rs.statusCode == 201;
}