-
Notifications
You must be signed in to change notification settings - Fork 25
fix(search): support identifier aliases (cds, cdsrn, aleph, doi) #743
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
kpsherva
merged 1 commit into
CERNDocumentServer:master
from
TahaKhan998:fix/identifier-search-alias
Apr 2, 2026
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
both cds (legacy) and inspire identifiers' values are integers. How can we ensure that the query will not return both cds and inspire matching records when user searches for
cds:12345?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, this is actually something I tried to handle earlier with an AND clause to enforce both the scheme and the identifier value.
The idea was that something like cds:12345 should translate to “find an identifier where scheme = cds AND value = 12345”, so we don’t get cross-matches with other identifier types.
However, the issue was in how the transformer builds the query. The AND clause was effectively applied across the whole record instead of within the same identifier entry. So it behaved like:
“record has some identifier with scheme = cds AND record has some identifier with value = 12345”
instead of enforcing both conditions on the same identifier object.
Because of that, a record with cds:263303 and inspire:12345 could still match a query like inspire:263303, since the scheme and value conditions were satisfied by different identifiers.
So the issue wasn’t really with the idea of restricting by scheme, but with how the transformer applies those conditions. Right now the mapping only targets the value, so we don’t yet strictly guarantee scheme-level isolation.