From daaf8e20c8779ed1ebb2462e6ddfce6ae33ccad4 Mon Sep 17 00:00:00 2001 From: Halim Kara <154413908+ap-h@users.noreply.github.com> Date: Sat, 10 Feb 2024 13:20:39 +0000 Subject: [PATCH] Add missing items to the response body in guides/bulk.md Signed-off-by: Halim Kara <154413908+ap-h@users.noreply.github.com> --- guides/bulk.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/guides/bulk.md b/guides/bulk.md index 4e76a5f60..bd2b8cec4 100644 --- a/guides/bulk.md +++ b/guides/bulk.md @@ -147,7 +147,7 @@ client.bulk({ { create: { _id: 2, data: { title: 'Beauty and the Beast 4', year: 2049 } } } // document already exists error ] }).then((response) => { - response.body.forEach((item) => { + response.body.items.forEach((item) => { const createStatus = item.create && item.create.status; if (createStatus && !createStatus.toString().match(/2\d{2}/)) { console.log(item.create.error.reason); @@ -163,4 +163,4 @@ To clean up the resources created in this guide, delete the `movies` and `books` ```javascript client.indices.delete({ index: [movies, books] }); -``` \ No newline at end of file +```