The price to pay by tackling the problem openly is a lot of cumbersome and error-prone code to write. In this regard, the
consistency and conciseness of Java client API really makes a huge difference
https://www.elastic.co/guide/en/elasticsearch/client/java-api/current/java-query-dsl.html