If a metadata-only package is created and then uploaded by uploadDataPackage(), the metadata object becomes "marooned" from the package resource map in DataONE.
This happens because the DataONE indexer looks at the 'documents' relationships in the resource map in order to populate the Solr resourceMap field for an object. This Solr field is used to identify the resource map for an object. For metadata-only packages, there are no 'documents' relationships, so the 'resourceMap' field is not populated, not even for the metadata object, resulting in the link between the metadata object back to the resource map to not be created.
As a temporary stop-gap measure however, uploadDataPackage should check a package before upload to ensure that this relationship (both forward and inverse relationships) is present, and add them if not.
If a metadata-only package is created and then uploaded by
uploadDataPackage()
, the metadata object becomes "marooned" from the package resource map in DataONE.This happens because the DataONE indexer looks at the 'documents' relationships in the resource map in order to populate the Solr
resourceMap
field for an object. This Solr field is used to identify the resource map for an object. For metadata-only packages, there are no 'documents' relationships, so the 'resourceMap' field is not populated, not even for the metadata object, resulting in the link between the metadata object back to the resource map to not be created.This issue should be resolved by the R
datapack
package, see https://github.com/ropensci/datapack/issues/129As a temporary stop-gap measure however,
uploadDataPackage
should check a package before upload to ensure that this relationship (both forward and inverse relationships) is present, and add them if not.