From 7009bf05eb45c7aed80dc437ea21fabad9a9b786 Mon Sep 17 00:00:00 2001 From: Aykut Firat Date: Sat, 10 Sep 2022 15:45:04 -0400 Subject: [PATCH] Update examples.asciidoc update example has wrong parameter name(Document instead of doc) and mentions the wrong parameter 'body'. --- docs/guide/examples.asciidoc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/guide/examples.asciidoc b/docs/guide/examples.asciidoc index 4db7799e9..0fe21e2b7 100644 --- a/docs/guide/examples.asciidoc +++ b/docs/guide/examples.asciidoc @@ -16,7 +16,7 @@ the Python client. === Indexing a document To index a document, you need to specify three pieces of information: `index`, -`id`, and a `body`: +`id`, and a `document`: [source,py] ---------------------------- @@ -79,7 +79,7 @@ for hit in resp['hits']['hits']: === Updating a document To update a document, you need to specify three pieces of information: `index`, -`id`, and a `body`: +`id`, and a `doc`: [source,py] ---------------------------- @@ -93,7 +93,7 @@ doc = { 'text': 'Interensting modified content...', 'timestamp': datetime.now(), } -resp = client.update(index="test-index", id=1, document=doc) +resp = client.update(index="test-index", id=1, doc=doc) print(resp['result']) ---------------------------- @@ -108,4 +108,4 @@ method: [source,py] ---------------------------- client.delete(index="test-index", id=1) ----------------------------- \ No newline at end of file +----------------------------