Closed pdelboca closed 1 year ago
@amercader As a continuation of this PR I want to add some documentation about pkg_dict
, data_dict
and validated_data_dict
on CKAN Docs.
I still don't get quite well the uses and difference betwen them.
@pdelboca This looks good!
re the different dicts:
pkg_dict
means "the dataset dict that will be sent to Solr for indexing"data_dict
means the default dataset metadata dict without any validation applied (eg all custom fields are extras)validated_data_dict
means the dataset metadata dict after applying validation (eg what you get on package_show
with the schema customizations applied)
This PR refactors and document the logic of our
dataset_before_index
method.With the new changes, harvest metadata will not be added to extras if it exist in the root schema of the dataset. This will allow other extensions or implementations to add harvest metadata to the main package schema without getting duplicated errors when trying to update or patch the dataset.