# How can I mark root object as null

**URL:** <https://discuss.elastic.co/t/how-can-i-mark-root-object-as-null/327719>\
**Category:** Elasticsearch\
**Created:** [March 15, 2023, 5:36am UTC](https://discuss.elastic.co/t/how-can-i-mark-root-object-as-null/327719 "2023-03-15T05:36:59Z")\
**Posts on this page:** 1\
**Showing post:** 8

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [March 15, 2023, 8:09am UTC](https://discuss.elastic.co/t/how-can-i-mark-root-object-as-null/327719/8 "2023-03-15T08:09:17Z")

</div>

You don't.

If there are no objects in the list, either omit the field completely or show it as an empty array. Null values only apply to fields that are indexed, which the root object is not. In the example above the fields in the array are indexed as `custom_field.pid` and `custom_field.sharing_type`. `custom_field` is part of the path but not indexed separately, so you can not set a `null` value for it.

---

_[View the full topic](https://discuss.elastic.co/t/how-can-i-mark-root-object-as-null/327719)._
