# Nested update

**URL:** <https://discuss.elastic.co/t/nested-update/20288>\
**Category:** Elasticsearch\
**Created:** [October 16, 2014, 2:06pm UTC](https://discuss.elastic.co/t/nested-update/20288 "2014-10-16T14:06:51Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Diogenes\_Buarque](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/diogenes_buarque/32/1191_2.png) [@Diogenes\_Buarque](https://discuss.elastic.co/u/Diogenes_Buarque)\
**Post date:** [October 16, 2014, 2:06pm UTC](https://discuss.elastic.co/t/nested-update/20288/1 "2014-10-16T14:06:51Z")

</div>

Hello guys,

I'm moving my ES mapping to nested objects and form some reason it doesn't  
update the nested types when I update the main object.

Give an example.

1. I have two indexes _"index1"_ and _"index2"_
2. The index _"index1"_ has object _"A"_ with a nested type of \*"B" \*
3. The object _"B"_ belongs to the index _"index2"_
4. When I update object _"B"_ in the _"index2"_ the data on the object  
_"A"_ is not updated on the _"index1"_

By design I know that Lucene indexes nested objects and root objects in the  
same “block”. So, my question is "Nested objects should be in the same  
index?" If not what I did wrong?

--  
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/6c1d9cf2-861c-4dda-a3c7-bbe95533c348%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/6c1d9cf2-861c-4dda-a3c7-bbe95533c348%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:** [October 16, 2014, 11:59pm UTC](https://discuss.elastic.co/t/nested-update/20288/2 "2014-10-16T23:59:11Z")

</div>

Hi,

Nested documents indeed need to be in the same index. More than that, they  
need to be provided as a property of their parent document. Please provide  
your mappings and an example of document that you are indexing for further  
help.

On Thu, Oct 16, 2014 at 4:06 PM, Diogenes Buarque \<  
[diogenes.buarque@gmail.com](mailto:diogenes.buarque@gmail.com)\> wrote:

> Hello guys,
> 
> I'm moving my ES mapping to nested objects and form some reason it doesn't  
> update the nested types when I update the main object.
> 
> Give an example.
> 
> 1. I have two indexes _"index1"_ and _"index2"_
> 2. The index _"index1"_ has object _"A"_ with a nested type of \*"B" \*
> 3. The object _"B"_ belongs to the index _"index2"_
> 4. When I update object _"B"_ in the _"index2"_ the data on the object  
> _"A"_ is not updated on the _"index1"_
> 
> By design I know that Lucene indexes nested objects and root objects in  
> the same “block”. So, my question is "Nested objects should be in the  
> same index?" If not what I did wrong?
> 
> --  
> 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/6c1d9cf2-861c-4dda-a3c7-bbe95533c348%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/6c1d9cf2-861c-4dda-a3c7-bbe95533c348%40googlegroups.com)  
> [https://groups.google.com/d/msgid/elasticsearch/6c1d9cf2-861c-4dda-a3c7-bbe95533c348%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/6c1d9cf2-861c-4dda-a3c7-bbe95533c348%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/CAL6Z4j5BApDOoxaJH3uHOPORyqxP1JDVga0FCcCkPF7dWz6RRA%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAL6Z4j5BApDOoxaJH3uHOPORyqxP1JDVga0FCcCkPF7dWz6RRA%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Diogenes\_Buarque](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/diogenes_buarque/32/1191_2.png) [@Diogenes\_Buarque](https://discuss.elastic.co/u/Diogenes_Buarque)\
**Post date:** [October 17, 2014, 12:05am UTC](https://discuss.elastic.co/t/nested-update/20288/3 "2014-10-17T00:05:38Z")

</div>

Hey Adrien,

Thanks for answer,

I think that would be nice have this information in ES documentation  
because at least for me it was not so clear.

Anyway thanks again for the fast answer.

Best r

Em quinta-feira, 16 de outubro de 2014 20h59min17s UTC-3, Adrien Grand  
escreveu:

> Hi,
> 
> Nested documents indeed need to be in the same index. More than that, they  
> need to be provided as a property of their parent document. Please provide  
> your mappings and an example of document that you are indexing for further  
> help.
> 
> On Thu, Oct 16, 2014 at 4:06 PM, Diogenes Buarque \<[diogenes...@gmail.com](mailto:diogenes...@gmail.com)  
> \<javascript:\>\> wrote:
> 
> > Hello guys,
> > 
> > I'm moving my ES mapping to nested objects and form some reason it  
> > doesn't update the nested types when I update the main object.
> > 
> > Give an example.
> > 
> > 1. I have two indexes _"index1"_ and _"index2"_
> > 2. The index _"index1"_ has object _"A"_ with a nested type of \*"B" \*
> > 3. The object _"B"_ belongs to the index _"index2"_
> > 4. When I update object _"B"_ in the _"index2"_ the data on the  
> > object _"A"_ is not updated on the _"index1"_
> > 
> > By design I know that Lucene indexes nested objects and root objects in  
> > the same “block”. So, my question is "Nested objects should be in the  
> > same index?" If not what I did wrong?
> > 
> > --  
> > 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 [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com) \<javascript:\>.  
> > To view this discussion on the web visit  
> > [https://groups.google.com/d/msgid/elasticsearch/6c1d9cf2-861c-4dda-a3c7-bbe95533c348%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/6c1d9cf2-861c-4dda-a3c7-bbe95533c348%40googlegroups.com)  
> > [https://groups.google.com/d/msgid/elasticsearch/6c1d9cf2-861c-4dda-a3c7-bbe95533c348%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/6c1d9cf2-861c-4dda-a3c7-bbe95533c348%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/dbab86bb-7fcb-4358-8e7d-99611ef3c7fc%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/dbab86bb-7fcb-4358-8e7d-99611ef3c7fc%40googlegroups.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:55am UTC](https://discuss.elastic.co/t/nested-update/20288/4 "2017-07-06T00:55:38Z")

</div>


