[
https://issues.apache.org/jira/browse/SOLR-15064?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17260680#comment-17260680
]
David Smiley commented on SOLR-15064:
-------------------------------------
There is already some documentation on this page that is pretty good (kudos to
Hossman):
[https://nightlies.apache.org/Lucene/Solr-reference-guide-master/updating-parts-of-documents.html]
But I should tweak the language a bit for SOLR-14923 PR.
Basically, if you use compositeID prefix key routing, then what you describe
works. Solr splits the batch, routing appropriately. If you can't/don't use
that, a routerField probably works. Otherwise, the only other recourse is the
{{\_route_}} param which is for the whole batch. In this issue here, perhaps
CloudSolrClient should be further enhanced to recognize the presence of the
{{\_root_}} field as overriding {{id}}. That's what I was thinking when I
wrote the ticket originally.
Note that this is all a non-issue if the nature of your updates manipulate the
root document, e.g. add a child document to a root document. This is because
the update itself *is* the root document. The ambiguity comes into play when
the update is a child document because on the face of it, there's no way to
tell by looking at it. Hence in SOLR-14923 I insisted on a {{\_root_}} field
to clarify to Solr (and any dev looking at such an update).
> 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: [email protected]
For additional commands, e-mail: [email protected]