# How to Get all mapping type of an index

**URL:** https://discuss.elastic.co/t/how-to-get-all-mapping-type-of-an-index/41589
**Category:** Elasticsearch
**Created:** [February 12, 2016, 9:44am UTC](https://discuss.elastic.co/t/how-to-get-all-mapping-type-of-an-index/41589 "2016-02-12T09:44:32Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Selvam\_ayyanar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/selvam_ayyanar/32/11101_2.png) [@Selvam\_ayyanar](https://discuss.elastic.co/u/Selvam_ayyanar)
#### Post date: [February 12, 2016, 9:44am UTC](https://discuss.elastic.co/t/how-to-get-all-mapping-type-of-an-index/41589/1 "2016-02-12T09:44:32Z")

</div>

Team is any way to get all Mapping type of an index ( only type ) not mapping definitions.

---

<div class="post-metadata">

### Author: ![Selvam\_ayyanar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/selvam_ayyanar/32/11101_2.png) [@Selvam\_ayyanar](https://discuss.elastic.co/u/Selvam_ayyanar)
#### Post date: [February 15, 2016, 2:37pm UTC](https://discuss.elastic.co/t/how-to-get-all-mapping-type-of-an-index/41589/2 "2016-02-15T14:37:54Z")

</div>

Hi All,  
There is one idea 😉 , we can

1. get all the documents
2. grep **\_type** field
3. sort
4. filter unique fields  
But i cann't retrive all documets via match\_all query 😢 , is there any way to get all documents.

---

<div class="post-metadata">

### Author: ![Selvam\_ayyanar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/selvam_ayyanar/32/11101_2.png) [@Selvam\_ayyanar](https://discuss.elastic.co/u/Selvam_ayyanar)
#### Post date: [November 22, 2016, 6:52am UTC](https://discuss.elastic.co/t/how-to-get-all-mapping-type-of-an-index/41589/3 "2016-11-22T06:52:50Z")

</div>

Hi all ,

here the simple way 😊

you can use [jq](https://stedolan.github.io/jq/) ( json parser )

curl -XGET [http://IP](http://IP):PORT/index\_name/\_mapping?pretty | jq '.[].mappings | to\_entries[] | select(.key) |.key'

sure it will give all mappings on that index. worked for me 😄

---

<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, 10:05pm UTC](https://discuss.elastic.co/t/how-to-get-all-mapping-type-of-an-index/41589/4 "2017-07-05T22:05:31Z")

</div>


