Learn R Programming

dataone (version 2.2.2)

d1SolrQuery: A method to query the DataONE solr endpoint of the Coordinating Node.

Description

It expects any lucene reserved characters to already be escaped with backslash. If solrQuery is a list, it is expected to have field names as attributes and search values as the values in the list.

Usage

d1SolrQuery(x, solrQuery)

# S4 method for D1Client,list d1SolrQuery(x, solrQuery)

# S4 method for D1Client,character d1SolrQuery(x, solrQuery)

Arguments

x

the D1Client (environment) being queried

solrQuery

list or character: a fully encoded query string

Value

the solr response (XML)

See Also

D1Client class description.

Examples

Run this code
# NOT RUN {
library(dataone)
d1c <- D1Client("PROD", "urn:node:KNB")
queryParams <- list(q="id:doi*", rows="5", 
    fq="(abstract:chlorophyll AND dateUploaded:[2000-01-01T00:00:00Z TO NOW])", 
    fl="title,id,abstract,size,dateUploaded,attributeName")
result <- d1SolrQuery(d1c, queryParams)
# }

Run the code above in your browser using DataLab