# Elasticsearch nested objects and parent child relationship

**URL:** <https://discuss.elastic.co/t/elasticsearch-nested-objects-and-parent-child-relationship/39577>\
**Category:** Elasticsearch\
**Tags:** es-hadoop\
**Created:** [January 19, 2016, 5:48pm UTC](https://discuss.elastic.co/t/elasticsearch-nested-objects-and-parent-child-relationship/39577 "2016-01-19T17:48:16Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![amajumdarinfa](https://avatars.discourse-cdn.com/v4/letter/a/eb8c5e/32.png) [@amajumdarinfa](https://discuss.elastic.co/u/amajumdarinfa)\
**Post date:** [January 19, 2016, 5:48pm UTC](https://discuss.elastic.co/t/elasticsearch-nested-objects-and-parent-child-relationship/39577/1 "2016-01-19T17:48:16Z")

</div>

Hi,

Currently we are using Spark Sql with Hive thrift server and Es-hadoop connector. Spark version : 1.4.1. Es-hadoop connector : 2.2.0. Elasticsearch 1.4.4.

If we have relationships in the Elasticsearch data model via parent-child relationship or nested objects, does the Es-hadoop connector push appropriate queries down to Elasticsearch? I mean does it convert the sql join statements to nested query or has\_child or has\_parent query?

Thanks

---

<div class="post-metadata">

**Author:** ![costin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/costin/32/44950_2.png) [@costin](https://discuss.elastic.co/u/costin)\
**Post date:** [January 20, 2016, 4:52pm UTC](https://discuss.elastic.co/t/elasticsearch-nested-objects-and-parent-child-relationship/39577/2 "2016-01-20T16:52:36Z")

</div>

No for several reasons:

1. Hive doesn't allow any pluggable pushdown operations. ES-Hadoop only performs projections but it is unaware of what queries are done at runtime. Spark on the other hand does provide such features and thus the integration with Spark does support it.
2. Joins are fairly complicated operations. They are not supported natively by Elastic anyway so even if such an operation would be pushed out, it wouldn't be possible to (easily) support it on Elastic.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 1:26pm UTC](https://discuss.elastic.co/t/elasticsearch-nested-objects-and-parent-child-relationship/39577/3 "2017-07-06T13:26:25Z")

</div>


