lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Smiley (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (SOLR-5211) updating parent as childless makes old children orphans
Date Wed, 09 Jan 2019 22:53:00 GMT

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

David Smiley commented on SOLR-5211:
------------------------------------

Lucky: It's hard to say without looking at your URP, and I don't have the time to review it.

Everyone: It seems we may have introduced a regression here. A Solr delete-by-id will now
only work for top level document IDs; it will not work on child documents. I discovered this
manually with some experimentation today. So if you want to delete a child document, you'd
have to issue a delete-by-query.

I'm looking at Hoss's first comment on this issue which related to extending the notion of
_root_ to be multiValued set of IDs of all ancestor IDs for each document being added. That
would indeed be a nice robust solution if we want to fix it.

I have another perhaps crazy idea that seems intractable with all the back-compat concerns
for legacy child/nested docs but I'll throw it out there for the heck of it; maybe it is approachable.
In my mind, a re-thought nested documents support would mean that _by default_ Solr would
always be matching root documents. That means a q=*:* would only return root documents, and
a delete-by-id would also only delete a root document. You'd have to _do something explicit
somehow_ to get different behavior. Furthermore the uniqueKey would only be mandatory for
the root document. Heresy you may say. Any way, even if we can't agree on all of my crazy
idea, maybe only partial, my take-away message to this is that we don't need to think of the
delete-by-id limitation of root documents as a problem. It's unusual to want to do otherwise
(and error-prone if you leave grandchildren orphaned), and it's possible to do this via delete-by-query.

> 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: David Smiley
>            Priority: Blocker
>             Fix For: 8.0
>
>         Attachments: SOLR-5211.patch, SOLR-5211.patch, SOLR-5211.patch, SOLR-5211.patch,
SOLR-5211.patch
>
>          Time Spent: 3h 20m
>  Remaining Estimate: 0h
>
> 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: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message