ElasticsearchQueryHelper { public static JsonObject boolQuery() { return new JsonObject() .put("bool", new JsonObject()); } private  ElasticsearchQueryHelper(); static JsonObject boolQuery(); static JsonObject boolQuery(int minimumShouldMatch); static void boolAddFilter(JsonObject bool, JsonObject filter); static void boolAddMust(JsonObject bool, JsonObject must); static void boolAddMustNot(JsonObject bool, JsonObject mustNot); static void boolAddShould(JsonObject bool, JsonObject should); static JsonObject termQuery(String name, Object value); static JsonObject ltQuery(String name, Object value); static JsonObject lteQuery(String name, Object value); static JsonObject gtQuery(String name, Object value); static JsonObject gteQuery(String name, Object value); static JsonObject matchAllQuery(); static JsonObject multiMatchQuery(Object text, String... fieldNames); static JsonObject existsQuery(String name); static JsonObject prefixQuery(String name, Object prefix); static JsonObject geoShapeQuery(String name, JsonObject shape, String relation); static JsonObject shape(String type, JsonArray coordinates);  }
@Test public void testBoolQuery() { assertEquals(new JsonObject().put("bool", new JsonObject()), boolQuery()); assertEquals(new JsonObject().put("bool", new JsonObject() .put("minimum_should_match", 1)), boolQuery(1)); }