Skip to content

Commit 763622b

Browse files
zakirovir6polyfractal
authored andcommitted
[DOCS] Fix documentation example of upsert (#730)
Body param of upsert should be like described in ES Update API
1 parent 1a88693 commit 763622b

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

docs/crud.asciidoc

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -212,13 +212,15 @@ $params = [
212212
'type' => 'my_type',
213213
'id' => 'my_id',
214214
'body' => [
215-
'script' => 'ctx._source.counter += count',
216-
'params' => [
217-
'count' => 4
215+
'script' => [
216+
'source' => 'ctx._source.counter += params.count',
217+
'params' => [
218+
'count' => 4
219+
],
218220
],
219221
'upsert' => [
220222
'counter' => 1
221-
]
223+
],
222224
]
223225
];
224226

0 commit comments

Comments
 (0)