# Typo? in Schema Mapping sample code of elasticsearch.org

**URL:** <https://discuss.elastic.co/t/typo-in-schema-mapping-sample-code-of-elasticsearch-org/7567>\
**Category:** Elasticsearch\
**Created:** [May 5, 2012, 6:14am UTC](https://discuss.elastic.co/t/typo-in-schema-mapping-sample-code-of-elasticsearch-org/7567 "2012-05-05T06:14:39Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![md\_2](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/md_2/32/2896_2.png) [@md\_2](https://discuss.elastic.co/u/md_2)\
**Post date:** [May 5, 2012, 6:14am UTC](https://discuss.elastic.co/t/typo-in-schema-mapping-sample-code-of-elasticsearch-org/7567/1 "2012-05-05T06:14:39Z")

</div>

Hi,

I think the wrong one written on the homepage makes sense.  
But it doesn't seem to work.

\*Wrong: \*

$ curl -XPUT [http://localhost:9200/twitter/user/\_mapping](http://localhost:9200/twitter/user/_mapping) -d '{  
"properties" : {  
"name" : { "type" : "string" }  
}  
}'

$ curl localhost:9200/twitter/user/\_mapping?pretty=tue  
{  
"user" : {  
"properties" : {  
}  
}  
}

_Correct:_

curl -XPUT [http://localhost:9200/twitter/user/\_mapping](http://localhost:9200/twitter/user/_mapping) -d '{  
"user" : {  
"properties" : {  
"name" : { "type" : "string" }  
}  
}  
}'

$ curl localhost:9200/twitter/uer/\_mapping?pretty=true  
{  
"user" : {  
"properties" : {  
"name" : {  
"type" : "string"  
}  
}  
}  
}

---

<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:** [May 9, 2012, 8:31am UTC](https://discuss.elastic.co/t/typo-in-schema-mapping-sample-code-of-elasticsearch-org/7567/2 "2012-05-09T08:31:21Z")

</div>

I fixed it.

On Sat, May 5, 2012 at 9:14 AM, Sato Takenori [takenori.sato@gmail.com](mailto:takenori.sato@gmail.com)wrote:

> Hi,
> 
> I think the wrong one written on the homepage makes sense.  
> But it doesn't seem to work.
> 
> \*Wrong: \*
> 
> $ curl -XPUT [http://localhost:9200/twitter/user/\_mapping](http://localhost:9200/twitter/user/_mapping) -d '{
> 
> ```
> "properties" : {
> "name" : { "type" : "string" }
> }
> 
> ```
> 
> }'
> 
> $ curl localhost:9200/twitter/user/\_mapping?pretty=tue  
> {  
> "user" : {  
> "properties" : {  
> }  
> }  
> }
> 
> _Correct:_
> 
> curl -XPUT [http://localhost:9200/twitter/user/\_mapping](http://localhost:9200/twitter/user/_mapping) -d '{  
> "user" : {  
> "properties" : {  
> "name" : { "type" : "string" }  
> }  
> }  
> }'
> 
> $ curl localhost:9200/twitter/uer/\_mapping?pretty=true  
> {  
> "user" : {  
> "properties" : {  
> "name" : {  
> "type" : "string"  
> }  
> }  
> }  
> }

---

<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:29am UTC](https://discuss.elastic.co/t/typo-in-schema-mapping-sample-code-of-elasticsearch-org/7567/3 "2017-07-06T03:29:45Z")

</div>


