Is there any way to build the elasticsearch bool query dynamically. In my application user may use multiple filters at a time. Its like, he may use 2 filters in one request and 3 filters for another request.I'm storing that filter details in hashmap. so based upon the user request the query should change by adding filters.
BoolQueryBuilder query = QueryBuilders.boolQuery()
.must(QueryBuilders.matchQuery("client_code",
"SSSS"));