# Mapping problem

**URL:** <https://discuss.elastic.co/t/mapping-problem/13920>\
**Category:** Elasticsearch\
**Created:** [October 11, 2013, 9:09am UTC](https://discuss.elastic.co/t/mapping-problem/13920 "2013-10-11T09:09:02Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![pablo3027](https://avatars.discourse-cdn.com/v4/letter/p/9e8a1a/32.png) [@pablo3027](https://discuss.elastic.co/u/pablo3027)\
**Post date:** [October 11, 2013, 9:09am UTC](https://discuss.elastic.co/t/mapping-problem/13920/1 "2013-10-11T09:09:02Z")

</div>

It's posible create a mapping with templates who setup a field value from  
other two fields

example :

This -\>  
curl -XPOST [http://localhost:9200/us\_large\_cities/city/](http://localhost:9200/us_large_cities/city/) -d  
{"name":"XXX","state":"AA"}

It will store on elasticsearch that :

{"name":"XXX","state":"AA","mergedFields":"XXX-AA"}

Thats posible??

Thanks

--  
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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [October 11, 2013, 9:20am UTC](https://discuss.elastic.co/t/mapping-problem/13920/2 "2013-10-11T09:20:56Z")

</div>

Why not doing that on client side?

--  
David Pilato | Technical Advocate | [Elasticsearch.com](http://Elasticsearch.com)  
@dadoonet | @elasticsearchfr | @scrutmydocs

Le 11 oct. 2013 à 11:09, Pablo Blasco [pablo3027@gmail.com](mailto:pablo3027@gmail.com) a écrit :

> It's posible create a mapping with templates who setup a field value from other two fields
> 
> example :
> 
> This -\>  
> curl -XPOST [http://localhost:9200/us\_large\_cities/city/](http://localhost:9200/us_large_cities/city/) -d {"name":"XXX","state":"AA"}
> 
> It will store on elasticsearch that :
> 
> {"name":"XXX","state":"AA","mergedFields":"XXX-AA"}
> 
> Thats posible??
> 
> Thanks
> 
> --  
> 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).  
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![pablo3027](https://avatars.discourse-cdn.com/v4/letter/p/9e8a1a/32.png) [@pablo3027](https://discuss.elastic.co/u/pablo3027)\
**Post date:** [October 11, 2013, 9:24am UTC](https://discuss.elastic.co/t/mapping-problem/13920/3 "2013-10-11T09:24:10Z")

</div>

I do it in the client... but i want to known if its posible to create a  
derived fields on elasticsearch....

Thanks for the answer

2013/10/11 David Pilato [david@pilato.fr](mailto:david@pilato.fr)

> Why not doing that on client side?
> 
> --  
> _David Pilato_ | _Technical Advocate_ | _[Elasticsearch.com](http://Elasticsearch.com)_  
> @dadoonet [https://twitter.com/dadoonet](https://twitter.com/dadoonet) | @elasticsearchfr[https://twitter.com/elasticsearchfr](https://twitter.com/elasticsearchfr)  
> | @scrutmydocs [https://twitter.com/scrutmydocs](https://twitter.com/scrutmydocs)
> 
> Le 11 oct. 2013 à 11:09, Pablo Blasco [pablo3027@gmail.com](mailto:pablo3027@gmail.com) a écrit :
> 
> It's posible create a mapping with templates who setup a field value from  
> other two fields
> 
> example :
> 
> This -\>  
> curl -XPOST [http://localhost:9200/us\_large\_cities/city/](http://localhost:9200/us_large_cities/city/) -d  
> {"name":"XXX","state":"AA"}
> 
> It will store on elasticsearch that :
> 
> {"name":"XXX","state":"AA","mergedFields":"XXX-AA"}
> 
> Thats posible??
> 
> Thanks
> 
> --  
> 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).  
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).
> 
> --  
> 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/3VvFldWw8rw/unsubscribe](https://groups.google.com/d/topic/elasticsearch/3VvFldWw8rw/unsubscribe).  
> To unsubscribe from this group and all its topics, send an email to  
> [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
Saludos,  
Pablo Blasco Martinavarro.

--  
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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [October 11, 2013, 9:35am UTC](https://discuss.elastic.co/t/mapping-problem/13920/4 "2013-10-11T09:35:08Z")

</div>

May be update API will help you here: [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/docs-update.html)

That said, I'm still wondering about the use case.

--  
David Pilato | Technical Advocate | [Elasticsearch.com](http://Elasticsearch.com)  
@dadoonet | @elasticsearchfr | @scrutmydocs

Le 11 oct. 2013 à 11:24, Pablo Blasco [pablo3027@gmail.com](mailto:pablo3027@gmail.com) a écrit :

> I do it in the client... but i want to known if its posible to create a derived fields on elasticsearch....
> 
> Thanks for the answer
> 
> 2013/10/11 David Pilato [david@pilato.fr](mailto:david@pilato.fr)  
> Why not doing that on client side?
> 
> --  
> David Pilato | Technical Advocate | [Elasticsearch.com](http://Elasticsearch.com)  
> @dadoonet | @elasticsearchfr | @scrutmydocs
> 
> Le 11 oct. 2013 à 11:09, Pablo Blasco [pablo3027@gmail.com](mailto:pablo3027@gmail.com) a écrit :
> 
> > It's posible create a mapping with templates who setup a field value from other two fields
> > 
> > example :
> > 
> > This -\>  
> > curl -XPOST [http://localhost:9200/us\_large\_cities/city/](http://localhost:9200/us_large_cities/city/) -d {"name":"XXX","state":"AA"}
> > 
> > It will store on elasticsearch that :
> > 
> > {"name":"XXX","state":"AA","mergedFields":"XXX-AA"}
> > 
> > Thats posible??
> > 
> > Thanks
> > 
> > --  
> > 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).  
> > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).
> 
> --  
> 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/3VvFldWw8rw/unsubscribe](https://groups.google.com/d/topic/elasticsearch/3VvFldWw8rw/unsubscribe).  
> To unsubscribe from this group and all its topics, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).
> 
> --  
> Saludos,  
> Pablo Blasco Martinavarro.
> 
> --  
> 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).  
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![pablo3027](https://avatars.discourse-cdn.com/v4/letter/p/9e8a1a/32.png) [@pablo3027](https://discuss.elastic.co/u/pablo3027)\
**Post date:** [October 11, 2013, 9:49am UTC](https://discuss.elastic.co/t/mapping-problem/13920/5 "2013-10-11T09:49:50Z")

</div>

I want to create the document with the minimal number of fields...  
The target its create the routing from this merged field value ... when you  
create a mapping the path field on the routing only allows one field from  
the mapping.

2013/10/11 David Pilato [david@pilato.fr](mailto:david@pilato.fr)

> May be update API will help you here:  
> [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/docs-update.html)
> 
> That said, I'm still wondering about the use case.
> 
> --  
> _David Pilato_ | _Technical Advocate_ | _[Elasticsearch.com](http://Elasticsearch.com)_  
> @dadoonet [https://twitter.com/dadoonet](https://twitter.com/dadoonet) | @elasticsearchfr[https://twitter.com/elasticsearchfr](https://twitter.com/elasticsearchfr)  
> | @scrutmydocs [https://twitter.com/scrutmydocs](https://twitter.com/scrutmydocs)
> 
> Le 11 oct. 2013 à 11:24, Pablo Blasco [pablo3027@gmail.com](mailto:pablo3027@gmail.com) a écrit :
> 
> I do it in the client... but i want to known if its posible to create a  
> derived fields on elasticsearch....
> 
> Thanks for the answer
> 
> 2013/10/11 David Pilato [david@pilato.fr](mailto:david@pilato.fr)
> 
> > Why not doing that on client side?
> > 
> > --  
> > _David Pilato_ | _Technical Advocate_ | \*[Elasticsearch.com](http://Elasticsearch.com)[http://elasticsearch.com/](http://elasticsearch.com/)  
> > \*  
> > @dadoonet [https://twitter.com/dadoonet](https://twitter.com/dadoonet) | @elasticsearchfr[https://twitter.com/elasticsearchfr](https://twitter.com/elasticsearchfr)  
> > | @scrutmydocs [https://twitter.com/scrutmydocs](https://twitter.com/scrutmydocs)
> > 
> > Le 11 oct. 2013 à 11:09, Pablo Blasco [pablo3027@gmail.com](mailto:pablo3027@gmail.com) a écrit :
> > 
> > It's posible create a mapping with templates who setup a field value from  
> > other two fields
> > 
> > example :
> > 
> > This -\>  
> > curl -XPOST [http://localhost:9200/us\_large\_cities/city/](http://localhost:9200/us_large_cities/city/) -d  
> > {"name":"XXX","state":"AA"}
> > 
> > It will store on elasticsearch that :
> > 
> > {"name":"XXX","state":"AA","mergedFields":"XXX-AA"}
> > 
> > Thats posible??
> > 
> > Thanks
> > 
> > --  
> > 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).  
> > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).
> > 
> > --  
> > 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/3VvFldWw8rw/unsubscribe](https://groups.google.com/d/topic/elasticsearch/3VvFldWw8rw/unsubscribe).  
> > To unsubscribe from this group and all its topics, send an email to  
> > [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).
> 
> --  
> Saludos,  
> Pablo Blasco Martinavarro.
> 
> --  
> 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).  
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).
> 
> --  
> 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/3VvFldWw8rw/unsubscribe](https://groups.google.com/d/topic/elasticsearch/3VvFldWw8rw/unsubscribe).  
> To unsubscribe from this group and all its topics, send an email to  
> [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
Saludos,  
Pablo Blasco Martinavarro.

--  
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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<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, 2:12am UTC](https://discuss.elastic.co/t/mapping-problem/13920/6 "2017-07-06T02:12:52Z")

</div>

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


