.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 }
    }
  }
});
---------
