The resource element can't be added to the solr index of an object if it is obsoletedBy
If an object was obsoleted by another object and it is aggregated in a resource map, the resource map element can't be added to the obsoletedBy object when we index the resource map. I think this is a bug. The resourceMap element should be added to the solr index of the object even though the object is obsoleted by another object.
#1 Updated by Jing Tao almost 4 years ago
This is caused by the method _mergeMappedReference in the class src/main/java/org/dataone/cn/indexer/resourcemap/ForesiteResourceMap.java in d1_cn_index_processor component. In this method, it check a condition - if the referenced object has the obsoletedBy element. If it does, the merge will be skipped ( the resourceMap solr element wouldn't be added to the solr index of the referenced object).
I can imagine this is for the series id. In this scenario - a resource map "foo" aggregates series id "S". We always want to only the head pid of series chain has the resource map solr element. So we need to check. However, the code doesn't check the series id in the system metadata; instead, it checks the obsoletedBy element. This caused the issue.
The condition was changed to - if the object is in the series chain and the object is not the head version, the merge will be skipped.