-
Notifications
You must be signed in to change notification settings - Fork 8
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
Add orcid fields to searches #27
base: master
Are you sure you want to change the base?
Conversation
I'm having a small problem with this.... The orcid fields get added to the search form, however it is not possible to search for multiple values separated by a blank (like it is e.g. for the creators/editors/contributors name field). Both values are present in the query, like so: But the result only takes the first one into account. If I go back to refine the search, the second ORCID has disappeared from the search field. How can I make the orcid search fields behave like the name field in this regard? |
I think to fix that we'd need to adapt how Metafield/Orcid.pm works possibly... Because when searching for ORCIDs you want to match the whole ORCID (i.e. you don't want anything that matches part of the ORCID), we have to treat the ORCID field as an 'id' field which only matches search strings exactly. We'd need to adapt this to treat space separated values as multiple values. However, I'm not sure precisely how to go about this unfortunately, it is something that will need looking into! |
Thanks for the quick reply! I'll have a look at Orcid.pm and see if I can figure it out. :) |
Well, I managed to change the match and merge values by simply adding this:
And loop through the values to validate each given id:
But now the search doesn't return any hits :/ Any idea where I'm going wrong? (Out of curiosity: Is there a way to distinct how the field behaves depending on whether it's a search for an eprint or a user? For a user, the orcid id serves as an identifier, but for an eprint it doesn't.) |
Fixes #22
Wouldn't be mad if this doesn't get merged, I know it's not exactly a killer feature ;)
(Tagging @wfyson)