# How to change Mapping for all Indices & for all Types at once

**URL:** <https://discuss.elastic.co/t/how-to-change-mapping-for-all-indices-for-all-types-at-once/9354>\
**Category:** Elasticsearch\
**Created:** [October 14, 2012, 3:27pm UTC](https://discuss.elastic.co/t/how-to-change-mapping-for-all-indices-for-all-types-at-once/9354 "2012-10-14T15:27:58Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![shannu](https://avatars.discourse-cdn.com/v4/letter/s/dfb087/32.png) [@shannu](https://discuss.elastic.co/u/shannu)\
**Post date:** [October 14, 2012, 3:27pm UTC](https://discuss.elastic.co/t/how-to-change-mapping-for-all-indices-for-all-types-at-once/9354/1 "2012-10-14T15:27:58Z")

</div>

Hello All,

I am trying to change the mapping for the below 3 indices/types I have:

## Index/Type

twitter/tweet  
facebook/post  
rss/feeds

I am trying to follow the info given in the link:  
[http://www.elasticsearch.org/guide/reference/api/admin-indices-put-mapping.html](http://www.elasticsearch.org/guide/reference/api/admin-indices-put-mapping.html)

$ curl -XPUT '[http://localhost:9200/rss/feeds/\_mapping](http://localhost:9200/rss/feeds/_mapping)' -d '{"feeds" :  
{"properties" : {"\_all" : {"type" : "string", "store" : "yes"}}}}'  
Result : {"ok":true,"acknowledged":true} - (I am able to change the mapping  
for the index rss of type feeds)

but If I want to change all of the indices and types at once and tried:  
$ curl -XPUT '[http://localhost:9200/\_all/\_mapping](http://localhost:9200/_all/_mapping)' -d '{"\_all" :  
{"properties" : {"\_all" : {"type" : "string", "store" : "yes"}}}}'

{"error":"ActionRequestValidationException[Validation Failed: 1: mapping  
type is missing;]","status":500}

curl -XPUT '[http://localhost:9200/\_all/\_mapping](http://localhost:9200/_all/_mapping)' -d '{"TYPE??????" :  
{"properties" : {"\_all" : {"type" : "string", "store" : "yes"}}}}'  
_so How to make this work ? What will be type ??_

\*The reson why I wanted to change the Mapping: \*

I am Using NEST(.NET API)

I am able to index the objects pretty well, but now when I tried to  
serialize the object using Json converter and index the string object(c#  
code excutes fine but... I get the following error in ElasticSearch Server:)  
\*  
Failed to excute [index { so n so..., Source so n so...]  
org.elasticsearch.index.mapper.MapperParsingException: Malformed content,  
must start with an object\*

Any help will be much appreciated.

Regards,  
Shannu.

--

---

<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, 3:08am UTC](https://discuss.elastic.co/t/how-to-change-mapping-for-all-indices-for-all-types-at-once/9354/2 "2017-07-06T03:08:53Z")

</div>


