Skip to content

Commit e371574

Browse files
fix examples.asciidoc to match implementation (#2252) (#2391)
* 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 * Fix interensting typo --------- Co-authored-by: Quentin Pradet <quentin.pradet@elastic.co> (cherry picked from commit ff2ef4d) Co-authored-by: Mattias <mattias.sluis@kpn.com>
1 parent 05757fb commit e371574

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

docs/guide/examples.asciidoc

Lines changed: 6 additions & 6 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
----------------------------
@@ -26,7 +26,7 @@ es = Elasticsearch('https://localhost:9200')
2626
2727
doc = {
2828
'author': 'author_name',
29-
'text': 'Interensting content...',
29+
'text': 'Interesting content...',
3030
'timestamp': datetime.now(),
3131
}
3232
resp = es.index(index="test-index", id=1, document=doc)
@@ -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
----------------------------
@@ -90,10 +90,10 @@ client = Elasticsearch('https://localhost:9200')
9090
9191
doc = {
9292
'author': 'author_name',
93-
'text': 'Interensting modified content...',
93+
'text': 'Interesting 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)