Skip to content

fix(harvester): match parent DOI as well as version DOI - #986

Open
TahaKhan998 wants to merge 1 commit into
CERNDocumentServer:masterfrom
TahaKhan998:fix/matcher-parent-doi
Open

TahaKhan998 wants to merge 1 commit into
CERNDocumentServer:masterfrom
TahaKhan998:fix/matcher-parent-doi

Conversation

@TahaKhan998

Copy link
Copy Markdown

closes #347
The matcher only searches pids.doi (the version DOI). For some hand-submitted records INSPIRE has the parent DOI instead, so we miss the existing CDS record and create a duplicate. DOIMatchFilter now also searches parent.pids.doi, so either DOI is enough to match.

Comment thread site/cds_rdm/inspire_harvester/load/matcher.py
@TahaKhan998
TahaKhan998 force-pushed the fix/matcher-parent-doi branch from 99c88af to 7599e7e Compare September 23, 2026 14:42
from .utils import legacy_entry


def test_doi_match_filter_searches_version_and_parent_doi():

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what will happen in terms of create/update? will it work properly? which version will be updated if the parent is found?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

well if no match is found then it creates a new record, if the parent doi matches then the search only returns the latest version by default and that is what gets updated. if we want a specific version to be updated then we could find the specific version using the resource type of the incoming inspire record maybe?

@TahaKhan998
TahaKhan998 force-pushed the fix/matcher-parent-doi branch 3 times, most recently from 35df655 to 0b2365b Compare September 24, 2026 09:06
@TahaKhan998
TahaKhan998 force-pushed the fix/matcher-parent-doi branch from 0b2365b to b4b3692 Compare September 24, 2026 09:29

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

INSPIRE to CDS-RDM harvester: sync document types already in CDS

2 participants