I am using the bool query but while using the terms in bool I am getting the max clause issue of 1024 to overcome this I want to change my bool query in the filter bool query
if ( !poNo.isEmpty() && poNo.length()>0 )
bool.must( QueryBuilders.queryStringQuery("*"+poNo+"*").defaultField("poNo"));
if ( orderIds!=null )
bool.must(QueryBuilders.termsQuery("id", orderIds));
Here the ordersIds is an array ant it may contain more than 1024 orderIds , flnow I want to change this bool query to the filter bool query.
I have used the filter
FilterBuilder fl = FilterBuilders.boolFilter().must(FilterBuilders.termsFilter("id",orderIds ));
But here I can't dynamically append the must clause as fl. doesn't have option of must /should /must not