# Get mapping in "flat" format

**URL:** <https://discuss.elastic.co/t/get-mapping-in-flat-format/39855>\
**Category:** Elasticsearch\
**Created:** [January 22, 2016, 9:15am UTC](https://discuss.elastic.co/t/get-mapping-in-flat-format/39855 "2016-01-22T09:15:31Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Benjamin\_Gathmann](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/benjamin_gathmann/32/7561_2.png) [@Benjamin\_Gathmann](https://discuss.elastic.co/u/Benjamin_Gathmann)\
**Post date:** [January 22, 2016, 9:15am UTC](https://discuss.elastic.co/t/get-mapping-in-flat-format/39855/1 "2016-01-22T09:15:31Z")

</div>

Is there a possibility to get the leaf field names in the mappings from an ES index in a flat format?  
E.g.:

```
"message.author.firstname" : { properties... }

```

instead of {"message": { "author" : { "firstname" (very simplified)

Essentially, I want to build a view similar to that in Kibana Settings that gives an overview of the fields and their properties in an index:

```
name type format ....
message.author.firstname string
message.author.lastname string
......
```

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [January 24, 2016, 4:05am UTC](https://discuss.elastic.co/t/get-mapping-in-flat-format/39855/2 "2016-01-24T04:05:09Z")

</div>

No it's not. You;'d have to do it yourself.

---

<div class="post-metadata">

**Author:** ![Benjamin\_Gathmann](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/benjamin_gathmann/32/7561_2.png) [@Benjamin\_Gathmann](https://discuss.elastic.co/u/Benjamin_Gathmann)\
**Post date:** [January 25, 2016, 8:14am UTC](https://discuss.elastic.co/t/get-mapping-in-flat-format/39855/3 "2016-01-25T08:14:57Z")

</div>

That's a bit of the pity - I have also had a closer look at the official Elasticsearch-PHP client that I work with, but there is currently no such method. Maybe I'll add it myself.

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [January 25, 2016, 8:55am UTC](https://discuss.elastic.co/t/get-mapping-in-flat-format/39855/4 "2016-01-25T08:55:15Z")

</div>

PRs welcome!

---

<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 5, 2017, 11:21pm UTC](https://discuss.elastic.co/t/get-mapping-in-flat-format/39855/5 "2017-07-05T23:21:59Z")

</div>


