Skip to content
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

Update Solr query section on backslashes #245

Open
laijasmine opened this issue Dec 14, 2020 · 1 comment
Open

Update Solr query section on backslashes #245

laijasmine opened this issue Dec 14, 2020 · 1 comment

Comments

@laijasmine
Copy link
Contributor

laijasmine commented Dec 14, 2020

In the example Solr queries here: https://nceas.github.io/datateam-training/reference/example-solr-queries.html

shows only this so that it can be interpreted literally:

dataone::query(adc, list(q = paste0('id:', '\"', 'doi:10.18739/A20R9M36V', '\"'),
                         fl = 'dateUploaded AND identifier',
                         rows = 5000),
               as = "data.frame")

can also be:

dataone::query(adc, list(q = 'id:doi\\:10.18739/A20R9M36V',
                         fl = 'dateUploaded AND identifier',
                         rows = 5000),
               as = "data.frame")

add further clarification in this section that because : is a special character that it needs to be escaped using a slash.

@amoeba
Copy link
Collaborator

amoeba commented Dec 15, 2020

Good idea here. I'm not sure which is easier for learners but FWIW I use id:"doi:10.124/ABC"' to avoid having to escape anything (wrapping in double quotes).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants