You can use the inner hits functionality to get the child documents in the same query when you use the has_child query.
The parent/child approach will allow you to index a child document individually which is more efficient if you have large documents and a requirement to update frequently. However, parent/child queries are 5-10 times slower than nested queries. So it is worth keeping that in mind when deciding what is the best approach for your use case.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.