* [docs] update readme and examples to use async/await * [apis] regenerate (including updated examples)
22 lines
327 B
Plaintext
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 }
|
|
}
|
|
}
|
|
});
|
|
---------
|