This is Criteria Query
Query query = new Query();
query.addCriteria(Criteria.where("careGiverId").is(careTakerId));
query.addCriteria(Criteria.where("careType").is(careType));
return mongoOperations.count(query, CareLogBean.class);
How to apply Mongodb Aggregations on this...i will return count ....help me thanks in advance