query: Search terms. You can do quite complicated queries using the SOLR syntax. See examples below. For all possible fields to query, do data(fields)
start: Result number to start on. Keep in mind that pages start at 0. Default: 0
rows: Numer of results to return. Default: 10. Max: 200
defType: Query syntax. One of edismax or X. See Details for more.
q.alt: If specified, this query will be used (and parsed by default using standard query parsing syntax) when the main query string is not specified or blank. This comes in handy when you need something like a match-all-docs query (don't forget &rows=0 for that one!) in order to get collection-wise faceting counts.
qf: (Query Fields) List of fields and the "boosts" to associate with each of them when building DisjunctionMaxQueries from the user's query
mm: (Minimum 'Should' Match).
qs: (Query Phrase Slop) Amount of slop on phrase queries explicitly included in the user's query string (in qf fields; affects matching).
pf: (Phrase Fields) Once the list of matching documents has been identified using the "fq" and "qf" params, the "pf" param can be used to "boost" the score of documents in cases where all of the terms in the "q" param appear in close proximity
ps: (Phrase Slop) Default amount of slop on phrase queries built with "pf", "pf2" and/or "pf3" fields (affects boosting).
pf2: (Phrase bigram fields) As with 'pf' but chops the input into bi-grams, e.g. "the brown fox jumped" is queried as "the brown" "brown fox" "fox jumped"
ps2: (Phrase bigram slop) As with 'ps' but sets default slop factor for 'pf2'. If not specified, 'ps' will be used.
pf3: (Phrase trigram fields) As with 'pf' but chops the input into tri-grams, e.g. "the brown fox jumped" is queried as "the brown fox" "brown fox jumped"
ps3: (Phrase trigram slop) As with 'ps' but sets default slop factor for 'pf3'. If not specified, 'ps' will be used.
tie: (Tie breaker) Float value to use as tiebreaker in DisjunctionMaxQueries (should be something much less than 1)
bq: (Boost Query) A raw query string (in the SolrQuerySyntax) that will be included with the user's query to influence the score. See references
bf: (Boost Function, additive) Functions (with optional boosts) that will be included in the user's query to influence the score. Any function supported natively by Solr can be used, along with a boost value, e.g.: recip(rord(myfield),1,2,3)^1.5
boost: (Boost Function, multiplicative) As for 'bf' but multiplies the boost into the score
uf: (User Fields) Specifies which schema fields the end user shall be allowed to query for explicitly. This parameter supports wildcards.
lowercaseOperators: This param controls whether to try to interpret lowercase words as boolean operators such as "and", "not" and "or". Set &lowercaseOperators=true to allow this. Default is "false".
fuzzy: Use fuzzy matching on input DOIs. Defaults to FALSE. If FALSE, we stick "digital-object-ids" before the DOI so that the search sent to ORCID is for that exact DOI. If TRUE, we use some regex to find the DOI.
recursive: DEFUNCT
...: Curl options passed on to crul::HttpClient()
Returns
a data.frame (tibble). You can access number of results found like attr(result, "found"). Note that with ORCID API v2 and greater, results here are only the identifiers. To get other metadata/data you can take the identifiers and use other functions in this package.
You can use any of the following within the query statement: given-names, family-name, credit-name, other-names, email, grant-number, patent-number, keyword, worktitle, digital-objectids, current-institution, affiliation-name, current-primary-institution, text, past-institution, peer-review-type, peer-review-role, peer-review-group-id, biography, external-id-type-and-value
Note that when constructing queries, you don't need to use syntax like +, etc., crul, the http client we use internally, will do that for you. For example, instead of writing johnson+cardiology, just write johnson cardiology, and instead of writing johnson+AND+cardiology, write johnson AND cardiology. Though, you still need to use AND, OR, etc. to join term/queries together.
Examples
## Not run:# Get a list of names and Orcid IDs matching a name queryorcid(query="carl+boettiger")orcid(query="given-names:carl AND family-name:boettiger")# by emailorcid(query="email:cboettig@berkeley.edu")# You can string together many search termsorcid(query="johnson cardiology houston")# peer review group idorcid("peer-review-group-id:1996-3068")# And use boolean operatorsorcid("johnson AND(caltech OR 'California Institute of Technology')")# And you can use start and rows arguments to do paginationorcid("johnson cardiology houston", start =2, rows =3)# Use search terms, here family nameorcid("family-name:Sanchez", start =4, rows =6)# Use search terms, here...orcid(query="Raymond", start=0, rows=10, defType="edismax")# Search using keywordsorcid(query="keyword:ecology")# Search by DOIorcid(query="10.1087/20120404")# Note the difference between the first wrt the second and third## See also orcid_doi() function for searching by DOIsorcid("10.1087/20120404")orcid('"10.1087/20120404"')## doiorcid('digital-object-ids:"10.1087/20120404"')## doi prefixorcid('digital-object-ids:"10.1087/*"')# search by work titlesorcid('work-titles:Modern developments in holography and its materials')orcid('pmc:PMC3901677')## Using more complicated SOLR queries# Use the qf parameter to "boost" query fields so they are ranked higher# See how it is different than the second query without using "qf"orcid(defType ="edismax", query ="Raymond", qf ="given-names^1.0 family-name^2.0", start =0, rows =10)orcid(query ="Raymond", start =0, rows =10)# Use other SOLR parameters as well, here mm. Using the "mm" param, 1 and# 2 word queries require that all of the optional clauses match, but for# queries with three or more clauses one missing clause is allowed...# See for more: http://bit.ly/1uyMLDQorcid(defType ="edismax", query="keyword:ecology OR evolution OR conservation", mm =2, rows =20)## End(Not run)