Skip to content

Commit b551780

Browse files
mattiassluispquentin
authored andcommitted
fix examples.asciidoc to match implementation
Documentation mentions wrong / outdated keyword arguments when compared to the code implementation. These fixes correct the documentation to match the implementation. Closes #2251
1 parent 23fb15d commit b551780

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

docs/guide/examples.asciidoc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ the Python client.
1616
=== Indexing a document
1717

1818
To index a document, you need to specify three pieces of information: `index`,
19-
`id`, and a `body`:
19+
`id`, and a `document`:
2020

2121
[source,py]
2222
----------------------------
@@ -79,7 +79,7 @@ for hit in resp['hits']['hits']:
7979
=== Updating a document
8080

8181
To update a document, you need to specify three pieces of information: `index`,
82-
`id`, and a `body`:
82+
`id`, and a `doc`:
8383

8484
[source,py]
8585
----------------------------
@@ -93,7 +93,7 @@ doc = {
9393
'text': 'Interensting modified content...',
9494
'timestamp': datetime.now(),
9595
}
96-
resp = client.update(index="test-index", id=1, document=doc)
96+
resp = client.update(index="test-index", id=1, doc=doc)
9797
print(resp['result'])
9898
----------------------------
9999

@@ -108,4 +108,4 @@ method:
108108
[source,py]
109109
----------------------------
110110
client.delete(index="test-index", id=1)
111-
----------------------------
111+
----------------------------

0 commit comments

Comments
 (0)