# Mapping question

**URL:** <https://discuss.elastic.co/t/mapping-question/21170>\
**Category:** Elasticsearch\
**Created:** [December 9, 2014, 8:36pm UTC](https://discuss.elastic.co/t/mapping-question/21170 "2014-12-09T20:36:29Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mohit\_Anchlia](https://avatars.discourse-cdn.com/v4/letter/m/848f3c/32.png) [@Mohit\_Anchlia](https://discuss.elastic.co/u/Mohit_Anchlia)\
**Post date:** [December 9, 2014, 8:36pm UTC](https://discuss.elastic.co/t/mapping-question/21170/1 "2014-12-09T20:36:29Z")

</div>

I am trying to change the mapping but I think I am not doing it right.  
Documents are not clear either:

My document looks like this:

{"key":"87aef147-3560-4859-a2  
64-fd7a9522002f","entityType":"Preferrence","keyValueIndex.dbSystemTime":"2014-12-05  
17:38:04","keyValueIndex.indexTime":"2014-12-09  
15:05:34","keyValueIndex.bucketNo":"0","keyValueIndex.gameNam  
e":"korra","keyValueIndex.entityType":"Preferrence","keyValueIndex.systemT  
imestamp":"1417819084000"}

And this is my mapping request that errors out. Not sure what's wrong here.

[ec2-user@ip-10-21-251-176 ~]$ curl -XPUT '  
[http://localhost:9200/test/\_mapping/test](http://localhost:9200/test/_mapping/test)' -d '

> {  
> "test" : {  
> "properties" : {  
> { "indexTime": {  
> "type" : "date",  
> "format" : "yyyy-MM-dd HH:mm:ss"}  
> }  
> }  
> }  
> }  
> }  
> '  
> {"error":"RemoteTransportException[[Jonathan "John"  
> Garrett][inet[/10.21.251.174:9300]][indices:admin/mapping/put]]; nested:  
> ElasticsearchParseException[Failed to parse content to map]; nested:  
> JsonParseException[Unexpected character ('{' (code 123)): was expecting  
> either valid name character (for unquoted name) or double-quote (for  
> quoted) to start field name\n at [Source: UNKNOWN; line: 5, column: 6]];  
> ","status":400}

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAOT3TWqJhzynwHaz0gJJWqas7DAZ2V%2Bv8pjco%3DDibMZygwJmOw%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAOT3TWqJhzynwHaz0gJJWqas7DAZ2V%2Bv8pjco%3DDibMZygwJmOw%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Kimbro\_Staken](https://avatars.discourse-cdn.com/v4/letter/k/9fc29f/32.png) [@Kimbro\_Staken](https://discuss.elastic.co/u/Kimbro_Staken)\
**Post date:** [December 9, 2014, 8:39pm UTC](https://discuss.elastic.co/t/mapping-question/21170/2 "2014-12-09T20:39:42Z")

</div>

Looks like you have an extra opening brace under properties.

On Tue, Dec 9, 2014 at 1:36 PM, Mohit Anchlia [mohitanchlia@gmail.com](mailto:mohitanchlia@gmail.com)  
wrote:

> I am trying to change the mapping but I think I am not doing it right.  
> Documents are not clear either:
> 
> My document looks like this:
> 
> {"key":"87aef147-3560-4859-a2  
> 64-fd7a9522002f","entityType":"Preferrence","keyValueIndex.dbSystemTime":"2014-12-05  
> 17:38:04","keyValueIndex.indexTime":"2014-12-09  
> 15:05:34","keyValueIndex.bucketNo":"0","keyValueIndex.gameNam  
> e":"korra","keyValueIndex.entityType":"Preferrence","keyValueIndex.systemT  
> imestamp":"1417819084000"}
> 
> And this is my mapping request that errors out. Not sure what's wrong here.
> 
> [ec2-user@ip-10-21-251-176 ~]$ curl -XPUT '  
> [http://localhost:9200/test/\_mapping/test](http://localhost:9200/test/_mapping/test)' -d '
> 
> > {  
> > "test" : {  
> > "properties" : {  
> > { "indexTime": {  
> > "type" : "date",  
> > "format" : "yyyy-MM-dd HH:mm:ss"}  
> > }  
> > }  
> > }  
> > }  
> > }  
> > '  
> > {"error":"RemoteTransportException[[Jonathan "John"  
> > Garrett][inet[/10.21.251.174:9300]][indices:admin/mapping/put]]; nested:  
> > ElasticsearchParseException[Failed to parse content to map]; nested:  
> > JsonParseException[Unexpected character ('{' (code 123)): was expecting  
> > either valid name character (for unquoted name) or double-quote (for  
> > quoted) to start field name\n at [Source: UNKNOWN; line: 5, column: 6]];  
> > ","status":400}
> 
> --  
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/CAOT3TWqJhzynwHaz0gJJWqas7DAZ2V%2Bv8pjco%3DDibMZygwJmOw%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAOT3TWqJhzynwHaz0gJJWqas7DAZ2V%2Bv8pjco%3DDibMZygwJmOw%40mail.gmail.com)  
> [https://groups.google.com/d/msgid/elasticsearch/CAOT3TWqJhzynwHaz0gJJWqas7DAZ2V%2Bv8pjco%3DDibMZygwJmOw%40mail.gmail.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/CAOT3TWqJhzynwHaz0gJJWqas7DAZ2V%2Bv8pjco%3DDibMZygwJmOw%40mail.gmail.com?utm_medium=email&utm_source=footer)  
> .  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAA0DmXbR9jdZhSMREv48DxuhipWcOMfP0T8X%3DU\_HbTH%3Dr%3DpQfQ%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAA0DmXbR9jdZhSMREv48DxuhipWcOMfP0T8X%3DU_HbTH%3Dr%3DpQfQ%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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, 12:44am UTC](https://discuss.elastic.co/t/mapping-question/21170/3 "2017-07-06T00:44:39Z")

</div>


