From 9ee0b23c638a9927e3637427ec35e0fa89d6059f Mon Sep 17 00:00:00 2001 From: Patrick O'Connor <35761519+oconpa@users.noreply.github.com> Date: Thu, 11 Jul 2024 22:30:44 -0700 Subject: [PATCH] rc corrected to response (#772) * rc corrected to response There seems to be a mistype in the code. I believe it's meant to say response Signed-off-by: Patrick O'Connor <35761519+oconpa@users.noreply.github.com> * Corrected line 33 Signed-off-by: Patrick O'Connor <35761519+oconpa@users.noreply.github.com> --------- Signed-off-by: Patrick O'Connor <35761519+oconpa@users.noreply.github.com> --- guides/bulk.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/guides/bulk.md b/guides/bulk.md index 52057efd..2f0c13f1 100644 --- a/guides/bulk.md +++ b/guides/bulk.md @@ -30,7 +30,7 @@ response = client.bulk(docs) if response["errors"]: print(f"There were errors!") else: - print(f"Bulk-inserted {len(rc['items'])} items.") + print(f"Bulk-inserted {len(response['items'])} items.") ``` The client can also serialize an array of data into bulk-delimited JSON for you. See [samples/bulk/bulk_array.py](../samples/bulk/bulk_array.py) for a working sample. @@ -51,7 +51,7 @@ if response["errors"]: for item in response["items"]: print(f"{item['index']['status']}: {item['index']['error']['type']}") else: - print(f"Bulk-inserted {len(rc['items'])} items.") + print(f"Bulk-inserted {len(response['items'])} items.") ``` ## Bulk Helper @@ -126,4 +126,4 @@ if len(failed) > 0: if len(succeeded) > 0: print(f"Bulk-inserted {len(succeeded)} items (streaming_bulk).") -``` \ No newline at end of file +```