# Mapping transform field type?

**URL:** <https://discuss.elastic.co/t/mapping-transform-field-type/20765>\
**Category:** Elasticsearch\
**Created:** [November 15, 2014, 5:51pm UTC](https://discuss.elastic.co/t/mapping-transform-field-type/20765 "2014-11-15T17:51:23Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![benmccann](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/benmccann/32/420_2.png) [@benmccann](https://discuss.elastic.co/u/benmccann)\
**Post date:** [November 15, 2014, 5:51pm UTC](https://discuss.elastic.co/t/mapping-transform-field-type/20765/1 "2014-11-15T17:51:23Z")

</div>

Hi,

Should we or can we specify a field type when using a mapping transform  
[http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/mapping-transform.html](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/mapping-transform.html)?  
E.g. if we do some calculation, should we specify the result type is an  
integer? Or is the result type auto-detected and there's no was to specify  
a type mapping for the field?

Thanks,  
Ben

--  
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/cbece670-2518-4f40-8250-8ae035783b35%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/cbece670-2518-4f40-8250-8ae035783b35%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![jpountz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jpountz/32/45836_2.png) [@jpountz](https://discuss.elastic.co/u/jpountz)\
**Post date:** [November 17, 2014, 11:06am UTC](https://discuss.elastic.co/t/mapping-transform-field-type/20765/2 "2014-11-17T11:06:24Z")

</div>

Hi Ben,

Even when using mapping transform, dynamic mappings will work as usual and  
try to detect the type of the field that you are trying to index. But you  
can also add a mapping for this field explicitely in your mappings.

On Sat, Nov 15, 2014 at 6:51 PM, Ben McCann [benjamin.j.mccann@gmail.com](mailto:benjamin.j.mccann@gmail.com)  
wrote:

> Hi,
> 
> Should we or can we specify a field type when using a mapping transform  
> [http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/mapping-transform.html](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/mapping-transform.html)?  
> E.g. if we do some calculation, should we specify the result type is an  
> integer? Or is the result type auto-detected and there's no was to specify  
> a type mapping for the field?
> 
> Thanks,  
> Ben
> 
> --  
> 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/cbece670-2518-4f40-8250-8ae035783b35%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/cbece670-2518-4f40-8250-8ae035783b35%40googlegroups.com)  
> [https://groups.google.com/d/msgid/elasticsearch/cbece670-2518-4f40-8250-8ae035783b35%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/cbece670-2518-4f40-8250-8ae035783b35%40googlegroups.com?utm_medium=email&utm_source=footer)  
> .  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
Adrien Grand

--  
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/CAL6Z4j6bruONjs1pMpSbmkJ6eLi01tG\_0u0SCFefUdYMtZt04w%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAL6Z4j6bruONjs1pMpSbmkJ6eLi01tG_0u0SCFefUdYMtZt04w%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Ben\_McCann\_2](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ben_mccann_2/32/1097_2.png) [@Ben\_McCann\_2](https://discuss.elastic.co/u/Ben_McCann_2)\
**Post date:** [November 17, 2014, 10:17pm UTC](https://discuss.elastic.co/t/mapping-transform-field-type/20765/3 "2014-11-17T22:17:45Z")

</div>

Gotcha. The part that confused me was that I thought the mapping transform  
was where you specified the mapping. I didn't realize you would specify the  
transform and the mapping separately.

Thanks,  
Ben

On Mon, Nov 17, 2014 at 3:06 AM, Adrien Grand \<  
[adrien.grand@elasticsearch.com](mailto:adrien.grand@elasticsearch.com)\> wrote:

> Hi Ben,
> 
> Even when using mapping transform, dynamic mappings will work as usual and  
> try to detect the type of the field that you are trying to index. But you  
> can also add a mapping for this field explicitely in your mappings.
> 
> On Sat, Nov 15, 2014 at 6:51 PM, Ben McCann [benjamin.j.mccann@gmail.com](mailto:benjamin.j.mccann@gmail.com)  
> wrote:
> 
> > Hi,
> > 
> > Should we or can we specify a field type when using a mapping transform  
> > [http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/mapping-transform.html](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/mapping-transform.html)?  
> > E.g. if we do some calculation, should we specify the result type is an  
> > integer? Or is the result type auto-detected and there's no was to specify  
> > a type mapping for the field?
> > 
> > Thanks,  
> > Ben
> > 
> > --  
> > 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/cbece670-2518-4f40-8250-8ae035783b35%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/cbece670-2518-4f40-8250-8ae035783b35%40googlegroups.com)  
> > [https://groups.google.com/d/msgid/elasticsearch/cbece670-2518-4f40-8250-8ae035783b35%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/cbece670-2518-4f40-8250-8ae035783b35%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > .  
> > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> 
> --  
> Adrien Grand
> 
> --  
> You received this message because you are subscribed to a topic in the  
> Google Groups "elasticsearch" group.  
> To unsubscribe from this topic, visit  
> [https://groups.google.com/d/topic/elasticsearch/tF5FHUCPeTo/unsubscribe](https://groups.google.com/d/topic/elasticsearch/tF5FHUCPeTo/unsubscribe).  
> To unsubscribe from this group and all its topics, 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/CAL6Z4j6bruONjs1pMpSbmkJ6eLi01tG\_0u0SCFefUdYMtZt04w%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAL6Z4j6bruONjs1pMpSbmkJ6eLi01tG_0u0SCFefUdYMtZt04w%40mail.gmail.com)  
> [https://groups.google.com/d/msgid/elasticsearch/CAL6Z4j6bruONjs1pMpSbmkJ6eLi01tG\_0u0SCFefUdYMtZt04w%40mail.gmail.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/CAL6Z4j6bruONjs1pMpSbmkJ6eLi01tG_0u0SCFefUdYMtZt04w%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).

--

> **[Ben McCann on about.me](https://about.me/benmccann)**
>
> I am a Founder, Entrepreneur, and Investor in Mountain View, California. Visit my website.

--  
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/CAH3cagO%2Bas7UXadJmsHCkGvyCiEgky3coV3paC%3DZeOvF3o45Hw%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAH3cagO%2Bas7UXadJmsHCkGvyCiEgky3coV3paC%3DZeOvF3o45Hw%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:49am UTC](https://discuss.elastic.co/t/mapping-transform-field-type/20765/4 "2017-07-06T00:49:22Z")

</div>

Closed on July 6, 2017, 12:49am UTC


