[ 
https://issues.apache.org/jira/browse/SOLR-15064?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17260896#comment-17260896
 ] 

Thomas Wöckinger edited comment on SOLR-15064 at 1/8/21, 12:59 AM:
-------------------------------------------------------------------

The update of the child document is completely clear when using composite id 
routing, but if no prefix can be used is it sufficient to add the root document 
id as prefix of the child id?

A small example:

A root document with on child document
{code:java}
{ "id":"1",
  "_root_":"1"
  "skus": [ { "id":"1!2"
              "_root_":"1"
              "color":"blue"
              "power":"120"
            } ]
}
{code}
And updating the child document with
{code:java}
{ "id":"1!2"
  "_root_":"1"
  "color":{"set":"red"}
}
{code}
So the final document should be
{code:java}
{ "id":"1",
  "_root_":"1"
  "skus": [ { "id":"1!2"
              "_root_":"1"
              "color":"red"
              "power":"120"
            } ]
}
{code}
So will this work when having multiple shards within the collection.


was (Author: thomas.woeckinger):
The update of the child document is completely clear when using composite id 
routing, but if no prefix can be used is it sufficient to add the root document 
id as prefix of the child id?

> Atomic/partial updates to nested docs should not assume _route_ param is the 
> root ID
> ------------------------------------------------------------------------------------
>
>                 Key: SOLR-15064
>                 URL: https://issues.apache.org/jira/browse/SOLR-15064
>             Project: Solr
>          Issue Type: Improvement
>      Security Level: Public(Default Security Level. Issues are Public) 
>            Reporter: David Smiley
>            Assignee: David Smiley
>            Priority: Minor
>              Labels: NestedDocuments
>
> In SOLR-14923, doing an atomic/partial update to a child doc requires 
> indicating what the root doc ID is.  Formerly Solr tried to figure this out 
> automatically, but that had costly implications.   SOLR-14923 adds a 
> temporary hack that assumes that the \_route_ paramter *is* the root ID, if 
> the \_root_ field is not on the doc.  But that's not necessarily accurate, so 
> it should be removed.
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org

Reply via email to