Your java classes are not the same as the structure.
Based on the structure: the collection name "child" should not be part of the where criteria, use:
query.addCriteria(Criteria.where("refParent").is("parent1"));
Based on the Java code:
query.addCriteria(Criteria.where("parent.id").is("parent1"));
See the example in reference documentation for more details:
But do you really store whole parent in each child? This is definitely not a correct way to model data in document database. What you should have is
public Child {
String id;
String name;
String parentId;
}
or use DBRef, but only if you have very good reason.