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

Erick Erickson commented on SOLR-14668:
---------------------------------------

I'd create a copyField with the appropriate analysis chain and do a 
delete-by-query or delete-by-id on that as appropriate.

The whole notion of a <uniqueKey> composite or not is that it's the one thing 
Solr can rely on not changing for any documents considered identical. 

bq. Solr stored the composite part separately or had an option to locate the 
record without the composite part across all available shards

That gets to be a sticky wicket. The assumption you're making I think is that 
the doc ID is unique, and there's no guarantee of that at all. Composite IDs of

a!b!c and d!e!c

are perfectly legitimate and refer to two completely separate documents as far 
as Solr is concerned. So deleting everything with a doc ID of "c" violates that 
assumption.

An option to consider "c" unique is possible. I doubt there'll be much interest 
in supporting it though since it's specialized and the copyField trick exists.


> CompositeID change provokes duplicates
> --------------------------------------
>
>                 Key: SOLR-14668
>                 URL: https://issues.apache.org/jira/browse/SOLR-14668
>             Project: Solr
>          Issue Type: Bug
>      Security Level: Public(Default Security Level. Issues are Public) 
>          Components: SolrCloud
>    Affects Versions: 8.2
>            Reporter: Alexander S.
>            Priority: Major
>
> There are cases when Composite ID can change, e.g. for a Product where you 
> use manufacturer or country attribute as composite ID and that value changes. 
> This results in 2 examples of the same documents being stored on separate 
> shards.
> A way to clean up obsolete data from other shards is required.



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

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

Reply via email to