Spring Data MongoDB - Criteria API OrOperator is not working properly
We need explicitly specify a new criteria with OR condition - try with below example
Criteria criteria = Criteria.where("field1").is(val1).
.andOperator(new Criteria().orOperator(Criteria.where("field2").is(filterVal),
Criteria.where("field3").is(filterVal)));
As far as I remember in order to use orOperator you should do:
Query query = new Query(new Criteria().orOperator(criteriaV1,criteriaV2));