Skip to content

Commit

Permalink
[DOCS] Fix documentation example of upsert (#730)
Browse files Browse the repository at this point in the history
Body param of upsert should be like described in ES Update API
  • Loading branch information
zakirovir6 authored and polyfractal committed Apr 4, 2018
1 parent a550507 commit 805329b
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions docs/crud.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -212,13 +212,15 @@ $params = [
'type' => 'my_type',
'id' => 'my_id',
'body' => [
'script' => 'ctx._source.counter += count',
'params' => [
'count' => 4
'script' => [
'source' => 'ctx._source.counter += params.count',
'params' => [
'count' => 4
],
],
'upsert' => [
'counter' => 1
]
],
]
];
Expand Down

0 comments on commit 805329b

Please sign in to comment.