# Get Mapping API \_all/type (0.9.0)

**URL:** <https://discuss.elastic.co/t/get-mapping-api--all-type-0-9-0/3127>\
**Category:** Elasticsearch\
**Created:** [July 20, 2010, 8:38pm UTC](https://discuss.elastic.co/t/get-mapping-api--all-type-0-9-0/3127 "2010-07-20T20:38:47Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lukas\_Vlcek1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lukas_vlcek1/32/819_2.png) [@Lukas\_Vlcek1](https://discuss.elastic.co/u/Lukas_Vlcek1)\
**Post date:** [July 20, 2010, 8:38pm UTC](https://discuss.elastic.co/t/get-mapping-api--all-type-0-9-0/3127/1 "2010-07-20T20:38:47Z")

</div>

Hi,

curl -XGET '[http://localhost:9200/\_all/tweet/\_mapping](http://localhost:9200/_all/tweet/_mapping)' returns empty  
sections for indices where this type is not found, shouldn't it return only  
sections for indices where this type is found?

Say I have two indices: twitter and facebook. The twitter index has a type  
tweet. Then the above curl command returns JSON with both indices "twitter"  
: { _the\_mapping_ }, "facebook" : {} but the facebook is empty and the  
twitter contains mapping for the tweet type.

Regards,  
Lukas

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [July 20, 2010, 8:46pm UTC](https://discuss.elastic.co/t/get-mapping-api--all-type-0-9-0/3127/2 "2010-07-20T20:46:49Z")

</div>

I am not sure, its a matter of semantics. The way that I saw it was get me  
the type mappings for all indices, so, for ones the mapping is not there,  
then the json is empty. I am open to change it if you (and others) think it  
make more sense to simply not return indices that do not container the  
mapping as part of the response.

On Tue, Jul 20, 2010 at 11:38 PM, Lukáš Vlček [lukas.vlcek@gmail.com](mailto:lukas.vlcek@gmail.com) wrote:

> Hi,
> 
> curl -XGET '[http://localhost:9200/\_all/tweet/\_mapping](http://localhost:9200/_all/tweet/_mapping)' returns empty  
> sections for indices where this type is not found, shouldn't it return only  
> sections for indices where this type is found?
> 
> Say I have two indices: twitter and facebook. The twitter index has a type  
> tweet. Then the above curl command returns JSON with both indices "twitter"  
> : { _the\_mapping_ }, "facebook" : {} but the facebook is empty and the  
> twitter contains mapping for the tweet type.
> 
> Regards,  
> Lukas

---

<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 6, 2017, 4:21am UTC](https://discuss.elastic.co/t/get-mapping-api--all-type-0-9-0/3127/3 "2017-07-06T04:21:58Z")

</div>


