# Are parents required with join fields?

**URL:** <https://discuss.elastic.co/t/are-parents-required-with-join-fields/138009>\
**Category:** Elasticsearch\
**Created:** [June 29, 2018, 4:53pm UTC](https://discuss.elastic.co/t/are-parents-required-with-join-fields/138009 "2018-06-29T16:53:15Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jaddison](https://avatars.discourse-cdn.com/v4/letter/j/e5b9ba/32.png) [@jaddison](https://discuss.elastic.co/u/jaddison)\
**Post date:** [June 29, 2018, 4:53pm UTC](https://discuss.elastic.co/t/are-parents-required-with-join-fields/138009/1 "2018-06-29T16:53:15Z")

</div>

The docs at [https://www.elastic.co/guide/en/elasticsearch/reference/master/parent-join.html](https://www.elastic.co/guide/en/elasticsearch/reference/master/parent-join.html) don't make the following clear (or I couldn't see it):

Can I index a child document without referencing a parent? With the ES\<6.0 type-based parent/child relationships, you could not index a child document without referencing a parent doc ID.

With ES\>=6.0, it kind of looks like it's possible to do this now. As an example from my use case:

- each Business would be indexed
- each Business could own and run many Events (ie the parent-\>relationship)
- however it is also possible for an Event to not have a Business association (ie blank, empty, null, whatever you want to call it - so it wouldn't have a parent)

In previous versions of ES, I had to create a separate doc type to hold the Events that had a parent (you were unable to index docs without a parent ID where the mapping had a parent defined).

So, long story short, can I simplify my indexes now and store parent and non-parent Events in the same typeless index using join fields? Thanks!

**Edit** : Looks like I've asked this sort of thing before join fields existed. (see [Possible to have optional \_parent field in future?](https://discuss.elastic.co/t/possible-to-have-optional--parent-field-in-future/427))

---

<div class="post-metadata">

**Author:** ![jaddison](https://avatars.discourse-cdn.com/v4/letter/j/e5b9ba/32.png) [@jaddison](https://discuss.elastic.co/u/jaddison)\
**Post date:** [July 3, 2018, 9:05pm UTC](https://discuss.elastic.co/t/are-parents-required-with-join-fields/138009/2 "2018-07-03T21:05:39Z")

</div>

Any feedback here from experts? If I'm interpreting the docs correctly, I believe setting the join/relation property is not a requirement anymore. Just looking for confirmation.

---

<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 31, 2018, 9:16pm UTC](https://discuss.elastic.co/t/are-parents-required-with-join-fields/138009/3 "2018-07-31T21:16:31Z")

</div>

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