def _matches(cls, hit: Dict[str, Any]) -> bool:
        """Use Answer class for child documents with child name 'answer'"""
        return (
            isinstance(hit["_source"]["question_answer"], dict)
            and hit["_source"]["question_answer"].get("name") == "answer"
        )
Use Answer class for child documents with child name 'answer'
examples/dsl/async/parent_child.py