Please format your code using </>
icon as explained in this guide. It will make your post more readable.
Or use markdown style like:
```
CODE
```
Have a look at exists
query: https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-exists-query.html