[
https://issues.apache.org/jira/browse/SOLR-5211?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16687514#comment-16687514
]
David Smiley commented on SOLR-5211:
------------------------------------
bq. A rename could be done, what did you have in mind though?
This is what I meant by \_nest\_root\_. This helps brand nested documents as
such more consistently. You'd look a this field and might a clue what it's
for. It seems IndexSchema.ROOT_FIELD_NAME is only used in a few places and
wouldn't be hard to migrate to this new scheme.
bq. Is there any scenario where differentiating between the new and old schema
might be beneficial?
For back-compat only.
I took a look at the patch and I have some notes:
* DirectUpdateHandler2.delete() should use cmd.getIndexedId() instead of direct
field access. Those members on DeleteUpdateCommand ought to be private!
* AddUpdateCommand: I see you refactored out a new addBlockId method so that
the underlying logic can be invoked in now two places. However it calls
getHashableId each time. That could be fixed by adding this as a parameter so
that it's calculated up front. This method also adds the \_version\_ field to
a document. This was being done only because child documents probably ought to
have the same version as that of the root. (it needed a comment saying this!).
That said; I think _use_ of the version on a child document isn't tested and
might not work (hence SOLR-12638). I wonder what would happen if it were blank
on a child doc? i.e. do we even need to do anything here?
* I'm sympathetic to moving "getDocument" logic out of the command and into
DirectUpdateHandler2. I think there is some entangling of responsibilities
between the two that would probably become cleaner. Do or not do here as you
have time for.
* I appreciate the test of "legacy" behavior though I'm not sure it's worth
committing this as it's kind of a burden going forward. If we go with the
rename approach... then the legacy test becomes simpler.
> updating parent as childless makes old children orphans
> -------------------------------------------------------
>
> Key: SOLR-5211
> URL: https://issues.apache.org/jira/browse/SOLR-5211
> Project: Solr
> Issue Type: Sub-task
> Components: update
> Affects Versions: 4.5, 6.0
> Reporter: Mikhail Khludnev
> Assignee: Mikhail Khludnev
> Priority: Major
> Attachments: SOLR-5211.patch, SOLR-5211.patch, SOLR-5211.patch
>
>
> if I have parent with children in the index, I can send update omitting
> children. as a result old children become orphaned.
> I suppose separate \_root_ fields makes much trouble. I propose to extend
> notion of uniqueKey, and let it spans across blocks that makes updates
> unambiguous.
> WDYT? Do you like to see a test proves this issue?
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]