# Field Mapping

**URL:** https://discuss.elastic.co/t/field-mapping/21470
**Category:** Elasticsearch
**Created:** [January 5, 2015, 1:16am UTC](https://discuss.elastic.co/t/field-mapping/21470 "2015-01-05T01:16:24Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![bkamiche](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bkamiche/32/14559_2.png) [@bkamiche](https://discuss.elastic.co/u/bkamiche)
#### Post date: [January 5, 2015, 1:16am UTC](https://discuss.elastic.co/t/field-mapping/21470/1 "2015-01-05T01:16:24Z")

</div>

I've mapped several fields as "byte" and "float", but when I retrieve the  
search result (using the PHP library), those fields are returned as strings  
in the JSON, is that correct?

Bruno

--  
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/488627ef-cf9c-4378-b6ff-a7e689b1857c%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/488627ef-cf9c-4378-b6ff-a7e689b1857c%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

### Author: ![Michael\_Giagnocavo](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/michael_giagnocavo/32/941_2.png) [@Michael\_Giagnocavo](https://discuss.elastic.co/u/Michael_Giagnocavo)
#### Post date: [January 6, 2015, 9:48am UTC](https://discuss.elastic.co/t/field-mapping/21470/2 "2015-01-06T09:48:55Z")

</div>

> I've mapped several fields as "byte" and "float", but when I retrieve the search result (using the  
> PHP library), those fields are returned as strings in the JSON, is that correct?

If you have the \_source field enabled, you should just get back the original JSON you put in, regardless of mapping.  
-Michael

--  
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/CO2PR0701MB1031D3DE609738439472B93DD4590%40CO2PR0701MB1031.namprd07.prod.outlook.com](https://groups.google.com/d/msgid/elasticsearch/CO2PR0701MB1031D3DE609738439472B93DD4590%40CO2PR0701MB1031.namprd07.prod.outlook.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:40am UTC](https://discuss.elastic.co/t/field-mapping/21470/3 "2017-07-06T00:40:34Z")

</div>


