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

Expand bcdc_search() to be able to search with AND, OR, or exact string, and use tags #14

Open
stephhazlitt opened this issue Dec 21, 2018 · 3 comments

Comments

@stephhazlitt
Copy link
Member

stephhazlitt commented Dec 21, 2018

Allow terms to be passed as a vector, and allow use of | for OR

@ateucher ateucher changed the title bcdc_search() should work with | operator Expand bcdc_search() to be able to search with AND, OR, or exact string, and use tags Jan 7, 2019
@ateucher
Copy link
Collaborator

ateucher commented Jan 7, 2019

A few example cli curl commands for searching:

# search for 'forest', with facets: download audience public, format is xls or shp
curl https://catalogue.data.gov.bc.ca/api/3/action/package_search?q=forest+download_audience:Public+res_format:\(xls%20OR%20shp\)

# search for children AND health (order and adjacency don't matter)
curl https://catalogue.data.gov.bc.ca/api/3/action/package_search?q=children%20health
# Also works (same thing):
curl https://catalogue.data.gov.bc.ca/api/3/action/package_search?q=children+health

# search for children OR health (note escaping the |)
curl https://catalogue.data.gov.bc.ca/api/3/action/package_search?q=children\|health

# search for water with stateofenvironment tag:
curl https://catalogue.data.gov.bc.ca/api/3/action/package_search?q=water+tags:stateofenvironment

# search for exact string 'regional district' (note escaping the quotes)
curl https://catalogue.data.gov.bc.ca/api/3/action/package_search?q=\"regional%20district\"

@ateucher ateucher added this to the v0.1.0 milestone Mar 18, 2019
@ateucher ateucher modified the milestones: v0.1.0, v0.2.0 May 2, 2019
@ateucher ateucher removed this from the v0.2.0 milestone Jun 11, 2020
@boshek
Copy link
Collaborator

boshek commented Mar 24, 2021

Additional functionality from #58: Convert output of bcdc_search to a data frame instead of a list

@ateucher
Copy link
Collaborator

There may be more options with the search API vs action/package_search

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

3 participants