1234567891011121314151617181920 |
- // docs/update-by-query.asciidoc:355
- [source, php]
- ----
- $params = [
- 'index' => 'twitter',
- 'body' => [
- 'script' => [
- 'source' => 'ctx._source.likes++',
- 'lang' => 'painless',
- ],
- 'query' => [
- 'term' => [
- 'user' => 'kimchy',
- ],
- ],
- ],
- ];
- $response = $client->updateByQuery($params);
- ----
|