void (String[] args) { final Builder<Object, Object> builder = new Builder<>(); String appName = "asdf"; Map query = builder .put("size", 0) .put("query", singletonMap("bool", singletonMap("must", of(singletonMap("term", singletonMap("type.raw", appName)), singletonMap("range", singletonMap("@timestamp", of("gt", "2014-12-01"))))))) .build(); System.out.println(query); }