# Get field mapping API with nested field

**URL:** <https://discuss.elastic.co/t/get-field-mapping-api-with-nested-field/236580>\
**Category:** Elasticsearch\
**Created:** [June 10, 2020, 8:49pm UTC](https://discuss.elastic.co/t/get-field-mapping-api-with-nested-field/236580 "2020-06-10T20:49:20Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Peliser](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/peliser/32/70022_2.png) [@Peliser](https://discuss.elastic.co/u/Peliser)\
**Post date:** [June 10, 2020, 8:49pm UTC](https://discuss.elastic.co/t/get-field-mapping-api-with-nested-field/236580/1 "2020-06-10T20:49:20Z")

</div>

Hi everyone!

I am using the [Get field mapping API](https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-get-field-mapping.html#indices-get-field-mapping) to check if a field exists in Elasticsearch.

My index is:

```
"mappings": {
    "dynamic": "strict",
    "properties": {
        "_customer": {
            "type": "nested",
            "properties": {
                "_name": {
                    "type": "text"
                },
                "_types": {
                    "type": "nested",
                    "properties": {
                        "_description": {
                            "type": "text"
                        },
                        "_items": {
                            "type": "nested"
                        }
                    }
                }
            }
        },
        "id": {
            "type": "keyword"
        }
    }
}

```

And I run the GET request:

`/myIndex/_mapping/field/_customer._types._items?allow_no_indices=false`

But the response has not my field:

```
{
    "myIndex": {
        "mappings": {}
    }
}

```

The response should not have the mapping of my field? This is bug or am I doing something wrong?

---

<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 8, 2020, 8:49pm UTC](https://discuss.elastic.co/t/get-field-mapping-api-with-nested-field/236580/2 "2020-07-08T20:49:27Z")

</div>

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