# Mapping es.mapping.id to a nested field in the json?

**URL:** <https://discuss.elastic.co/t/mapping-es-mapping-id-to-a-nested-field-in-the-json/22035>\
**Category:** Elasticsearch\
**Created:** [February 9, 2015, 12:54am UTC](https://discuss.elastic.co/t/mapping-es-mapping-id-to-a-nested-field-in-the-json/22035 "2015-02-09T00:54:40Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![deepakas](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/deepakas/32/697_2.png) [@deepakas](https://discuss.elastic.co/u/deepakas)\
**Post date:** [February 9, 2015, 12:54am UTC](https://discuss.elastic.co/t/mapping-es-mapping-id-to-a-nested-field-in-the-json/22035/1 "2015-02-09T00:54:40Z")

</div>

Does the mapping id parameter in elasticsearch support mapping to a nested  
field in a json. If yes what is the configuration to specify a nested  
field. I tried different formats as given below without much success.

sc.hadoopConfiguration.set("es.mapping.id", "Batch.BatchId")

Thanks in advance for the inputs.

--  
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/a8b46640-dea4-4d20-845a-769f22d830e9%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/a8b46640-dea4-4d20-845a-769f22d830e9%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![deepakas](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/deepakas/32/697_2.png) [@deepakas](https://discuss.elastic.co/u/deepakas)\
**Post date:** [February 9, 2015, 10:57am UTC](https://discuss.elastic.co/t/mapping-es-mapping-id-to-a-nested-field-in-the-json/22035/2 "2015-02-09T10:57:26Z")

</div>

I was able to get it working without a nesting field as given below.  
Is mapping to nested field is supported for the es.mapping.id  
parameter. Also I am having trouble mapping the date field to  
timestamp.

sc.hadoopConfiguration.set("es.mapping.id", "batchId")  
sc.hadoopConfiguration.set("es.mapping.names", "date:@timestamp")

"date": "2015-01-26T08:52:53ZZ",

On Mon, Feb 9, 2015 at 12:54 AM, Deepak Subhramanian  
[deepak.subhramanian@gmail.com](mailto:deepak.subhramanian@gmail.com) wrote:

> Does the mapping id parameter in elasticsearch support mapping to a nested  
> field in a json. If yes what is the configuration to specify a nested field.  
> I tried different formats as given below without much success.
> 
> sc.hadoopConfiguration.set("es.mapping.id", "Batch.BatchId")
> 
> Thanks in advance for the inputs.
> 
> --  
> 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/0tN8L37mh1Y/unsubscribe](https://groups.google.com/d/topic/elasticsearch/0tN8L37mh1Y/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/a8b46640-dea4-4d20-845a-769f22d830e9%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/a8b46640-dea4-4d20-845a-769f22d830e9%40googlegroups.com).  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
Deepak Subhramanian

--  
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/CA%2BUubiiMXfP4b\_SiwPgpRh%3DtgOjNkbP1VVYCXPCbuWapqOzmZA%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CA%2BUubiiMXfP4b_SiwPgpRh%3DtgOjNkbP1VVYCXPCbuWapqOzmZA%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:34am UTC](https://discuss.elastic.co/t/mapping-es-mapping-id-to-a-nested-field-in-the-json/22035/3 "2017-07-06T00:34:11Z")

</div>


