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

ASF subversion and git services commented on SOLR-18199:
--------------------------------------------------------

Commit 818dd86f923f9589c2efa6ac1cdc1f4af424b1a7 in solr's branch 
refs/heads/main from David Smiley
[ https://gitbox.apache.org/repos/asf?p=solr.git;h=818dd86f923 ]

SOLR-18199: Delete-by-query deletes nested descendants (#5391)

Delete-by-query now also deletes the nested descendants of the documents it 
matches, when the schema has _nest_path_, thus preventing orphaned child 
documents. Opt out with the withDescendants=false local param.

Co-authored-by: Claude Opus 5.5 <[email protected]>

> Make deleteByQuery (DBQ) easy & safe with child / nested docs
> -------------------------------------------------------------
>
>                 Key: SOLR-18199
>                 URL: https://issues.apache.org/jira/browse/SOLR-18199
>             Project: Solr
>          Issue Type: Improvement
>            Reporter: David Smiley
>            Priority: Major
>              Labels: pull-request-available
>         Attachments: SOLR-18199-plan.md
>
>          Time Spent: 1.5h
>  Remaining Estimate: 0h
>
> deleteByQuery is problematic with nested docs.  One must understand that the 
> query must be constructed to not only match the direct/intended docs, but all 
> their children as well – otherwise you will corrupt nested doc integrity in 
> Solr.
> I propose that nested docs be detected in the schema and then DBQs be 
> converted mechanically guarantee that it matches all child docs of the docs 
> it would otherwise match.  Perhaps this can support child docs generally, not 
> just nested.  For users that know what they are doing, a local-param could 
> opt-out of the proposed processing.  For example if all child docs are 
> guaranteed to have a consistent value that is the basis of the deletion 
> criteria (perhaps a category/label or a date or really anything), then the 
> proposed query conversion would produce a query that is needlessly slower.



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to