# Parent and child together

**URL:** <https://discuss.elastic.co/t/parent-and-child-together/107420>\
**Category:** Elasticsearch\
**Created:** [November 13, 2017, 3:43pm UTC](https://discuss.elastic.co/t/parent-and-child-together/107420 "2017-11-13T15:43:21Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mPanasiewicz](https://avatars.discourse-cdn.com/v4/letter/m/ebca7d/32.png) [@mPanasiewicz](https://discuss.elastic.co/u/mPanasiewicz)\
**Post date:** [November 13, 2017, 3:43pm UTC](https://discuss.elastic.co/t/parent-and-child-together/107420/1 "2017-11-13T15:43:21Z")

</div>

Hello,

I've got two documents with different types:  
Sth like this:

```auto
{
  "mappings": {
      "owner": {
        "properties": { 
          "Id": {
            "type": "text",
            "fields": {
              "keyword": {
                "type": "keyword",
                "ignore_above": 256
              }
            }
          },
          "Name": {
            "type": "text",
            "fields": {
              "keyword": {
                "type": "keyword",
                "ignore_above": 256
              }
            }
          }
        }
      },
      "copportunity": {
        "_parent": {
            "type": "owner"
          },
        "properties": {
          "OwnerId": {
            "type": "text",
            "fields": {
              "keyword": {
                "type": "keyword",
                "ignore_above": 256
              }
            }
          }
        }
      }
    }
}

```

Is it possible to return the child(copportunity) and [owner.name](http://owner.name) field or all parent object which is owner.  
Thank you for help.

---

<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:** [December 11, 2017, 3:43pm UTC](https://discuss.elastic.co/t/parent-and-child-together/107420/2 "2017-12-11T15:43:29Z")

</div>

Closed on December 11, 2017, 3:43pm UTC

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
