delete method

Implementation

Future<DocumentSnapshot> delete() async {
  try {
    final response = await client.delete("/$_index/_doc/$_id");
    final document = Document(null,
        index: _index, id: response["_id"], version: response["_version"]);
    return DocumentSnapshot(document, success: true);
  } catch (e) {
    return DocumentSnapshot(null, success: false, reason: e.toString());
  }
}