Files
elasticsearch-js/docs/_examples/deleteByQuery.asciidoc
Spencer 83a464ac66 Update docs to use async/await (#667)
* [docs] update readme and examples to use async/await

* [apis] regenerate (including updated examples)
2018-05-23 14:31:34 -07:00

22 lines
327 B
Plaintext

.Deleting documents with a simple query
[source,js]
---------
await client.deleteByQuery({
index: 'myindex',
q: 'test'
});
---------
.Deleting documents using the Query DSL
[source,js]
---------
await client.deleteByQuery({
index: 'posts',
body: {
query: {
term: { published: false }
}
}
});
---------