Different result between java client api and query dsl?

Please format your code using </> icon as explained in this guide. It will make your post more readable.

Or use markdown style like:

```
CODE
```

Probably a bug with HEAD plugin as it does not support GET with body.
Try with POST or use Kibana Dev Console.