Re: [ORCID API] Boolean expressions in the search API do not seem to work

29 views
Skip to first unread message

Owen Stephens

unread,
Mar 10, 2021, 4:59:49 AMMar 10
to Mohit Bhasi T, ORCID API Users
Hi

I think that you need to specify the field in all parts of the expression. So if you try:

https://pub.orcid.org/v3.0/expanded-search/?q=(family-name:allen) AND (affiliation-org-name:"virginia polytechnic institute and state university" OR affiliation-org-name:"Virginia Tech")

OR with proper URL encoding:

https://pub.orcid.org/v3.0/expanded-search/?q=%28family-name%3Aallen%29%20AND%20%28affiliation-org-name%3A%22virginia%20polytechnic%20institute%20and%20state%20university%22%20OR%20affiliation-org-name%3A%22Virginia%20Tech%22%29

I think you'll get the result you need

Owen


Mohit Bhasi T wrote on 09/03/2021 14:18:

I am currently using the public API to obtain author ORCID IDs for my institution, Virginia Tech. We have a list of author names for which we want to obtain ORCID IDs.
The affiliations in ORCID are stored as - "Virginia Tech" or "Virginia Polytechnic Institute and State University" and hence while querying the search API we need to use a boolean for the affiliation-org-name field. However, the expression seems to be evaluating poorly. For example, while using the following query -


authors who are affiliated to West Virginia University, University of Virginia, etc get returned but when the query is run without the OR expression for the affiliation-org-name field, the correct results return. So do you guys suggest to run the search separately for affiliation-org-name: Virginia Tech and then affiliation-org-name: Virginia Polytechnic Institute and State University separately? Or are we using the Boolean expression incorrectly?

--
You received this message because you are subscribed to the Google Groups "ORCID API Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to orcid-api-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/orcid-api-users/65ae2d2b-e228-4e28-babf-d84d576f2094n%40googlegroups.com.

--
Sent from Postbox

John Aspler

unread,
Mar 10, 2021, 8:31:30 AMMar 10
to ORCID API Users
It looks like Owen's solutions work great. Another fix here could be to add an extra set of parentheses inside the affiliation-org-name expression, to apply it to both:
https://pub.orcid.org/v3.0/expanded-search/?q=(family-name:allen) AND (affiliation-org-name:("virginia polytechnic institute and state university" or "Virginia Tech"))

Reply all
Reply to author
Forward
0 new messages