Elastic search : Replacing BoolFilterBuilder

Hi Team,

Can you please help me if the below code(es v0.9) can be replaced

BoolFilterBuilder filter = FilterBuilders.boolFilter().filterName("compositeFilter");
filterBuilder.must(FilterBuilders.termsFilter("keyword", toLowerCase(filterList)));

by the following (es v6)
BoolQueryBuilder query = QueryBuilders.boolQuery();
query.filter(QueryBuilders.termsQuery("keyword", toLowerCase(filterList))).must();

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.