SearchPredicate stibPredicate = factory.match().field(field)
.matching(ProductType.STIBSUBSCRIPTION)
.toPredicate();
booleanJunction.should(stibPredicate);
SearchPredicate delinPredicate = factory.match().field(field)
.matching(ProductType.DELIJNSUBSCRIPTION)
.toPredicate();
booleanJunction.should(delinPredicate);
SearchPredicate techPredicate = factory.match().field(field)
.matching(ProductType.TECSUBSCRIPTION)
.toPredicate();
these predicates should go in such a way that final booleanJunction will search with other must clause along with any one of them present.
I know I am not able to frame it well so giving below example.
booleanJunction.must(existingCondition);
then
booleanJunction.must(newConditon1 or newConditon2 or newConditon3);
so suppose existingCondition = datarange (day-1, day+1)
newConditon1 = product1
newConditon2 = product2
newConditon3= product3
in short we need E1 && (N1|| N1||N1) currently it is E1 || N1 || N2 || N3