# Update mapping of an object

**URL:** <https://discuss.elastic.co/t/update-mapping-of-an-object/10937>\
**Category:** Elasticsearch\
**Created:** [February 27, 2013, 10:02pm UTC](https://discuss.elastic.co/t/update-mapping-of-an-object/10937 "2013-02-27T22:02:21Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![William\_King](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/william_king/32/2631_2.png) [@William\_King](https://discuss.elastic.co/u/William_King)\
**Post date:** [February 27, 2013, 10:02pm UTC](https://discuss.elastic.co/t/update-mapping-of-an-object/10937/1 "2013-02-27T22:02:21Z")

</div>

Hi all,

I have a mappings defined as:

{  
"mappings" : {  
"person" : {  
"properties" : {  
"name" : { "type" : "string", "index" :  
"not\_analyzed" },  
"location" : {  
"type" : "object",  
"properties" : {  
"address" : {"type" : "string",  
"index\_analyzer" : "address" }  
}  
}  
}  
}  
}  
}

I would like to update the mapping to include a new property in the  
"location" object, is this possible? I've been able to add a new property  
under the root "person" object but not in the "person.location" object.

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:** ![William\_King](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/william_king/32/2631_2.png) [@William\_King](https://discuss.elastic.co/u/William_King)\
**Post date:** [February 28, 2013, 9:45pm UTC](https://discuss.elastic.co/t/update-mapping-of-an-object/10937/2 "2013-02-28T21:45:02Z")

</div>

Any info on this?

On Wednesday, February 27, 2013 2:02:21 PM UTC-8, William King wrote:

> Hi all,
> 
> I have a mappings defined as:
> 
> {  
> "mappings" : {  
> "person" : {  
> "properties" : {  
> "name" : { "type" : "string", "index" :  
> "not\_analyzed" },  
> "location" : {  
> "type" : "object",  
> "properties" : {  
> "address" : {"type" : "string",  
> "index\_analyzer" : "address" }  
> }  
> }  
> }  
> }  
> }  
> }
> 
> I would like to update the mapping to include a new property in the  
> "location" object, is this possible? I've been able to add a new property  
> under the root "person" object but not in the "person.location" object.
> 
> 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:** ![Clinton\_Gormley](https://avatars.discourse-cdn.com/v4/letter/c/50afbb/32.png) [@Clinton\_Gormley](https://discuss.elastic.co/u/Clinton_Gormley)\
**Post date:** [March 1, 2013, 11:38am UTC](https://discuss.elastic.co/t/update-mapping-of-an-object/10937/3 "2013-03-01T11:38:43Z")

</div>

Hi William

> I would like to update the mapping to include a new property in the  
> "location" object, is this possible? I've been able to add a new  
> property under the root "person" object but not in the  
> "person.location" object.

If you show us how you have added one property but failed to add the  
other, then we could show you where you're going wrong.

But yes, you can add properties to a mapping, using the PUT mapping API:

> **[Elasticsearch Platform — Find real-time answers at scale](https://www.elastic.co)**
>
> Power insights and outcomes with the Elasticsearch Platform and AI. See into your data and find answers that matter with enterprise solutions designed to help you build, observe, and protect. Try Elasticsearch free today.

clint

--  
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:48am UTC](https://discuss.elastic.co/t/update-mapping-of-an-object/10937/4 "2017-07-06T02:48:52Z")

</div>


