# Control returned fields of nested object

**URL:** <https://discuss.elastic.co/t/control-returned-fields-of-nested-object/155289>\
**Category:** Elasticsearch\
**Created:** [November 4, 2018, 7:05am UTC](https://discuss.elastic.co/t/control-returned-fields-of-nested-object/155289 "2018-11-04T07:05:21Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![elastic\_guy](https://avatars.discourse-cdn.com/v4/letter/e/ecb155/32.png) [@elastic\_guy](https://discuss.elastic.co/u/elastic_guy)\
**Post date:** [November 4, 2018, 7:05am UTC](https://discuss.elastic.co/t/control-returned-fields-of-nested-object/155289/1 "2018-11-04T07:05:21Z")

</div>

Hi,  
let's say I have a document with a nested object inside, for example:

```
"mappings": {
  "typeX": {
    "properties": {
      "array_of_things": {
        "type": "nested",
        "properties": {
          "long_propertyA": {
            "type": "long"
          },
          "range_propertyB": {
            "type": "integer_range"
          }
        }
      }
    }
  }
}

```

as you can see "array\_of\_things" is a nested object, containing an array of objects, where, each of them has 2 properties - long property & range property..

I am trying to understand if it's possible to read the upper object and neglect the "range" field for example..  
it's a big field, and not relevant for some of our queries, and therefor I would like to neglect it from some of my read operations..

now, I know that there is a "fetch source" API that I can use it to specify include and exclude properties of documents, but I couldn't find any documentation on how to use it on nested object's properties.

appreciate your help,  
Thanks

---

<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 2, 2018, 7:05am UTC](https://discuss.elastic.co/t/control-returned-fields-of-nested-object/155289/2 "2018-12-02T07:05:28Z")

</div>

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