You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ScienceBase lets you explicitly exclude items that match criteria; see "Exclude Elements in Search Results" in https://www.sciencebase.gov/about/content/sciencebase-advanced-search. It would be great if this were also possible through sbtools, but if it is already possible, I can't figure out how to do it.
Using my browser directly, https://www.sciencebase.gov/catalog/items?q=&lq=flood%20AND%20earthquake currently returns 62 results while https://www.sciencebase.gov/catalog/items?q=&lq=flood%20AND%20earthquake&filter=browseCategory!%3DPublication returns 7 results
Using sbtools, I don't know how to get my 7 results. Here's what I can get:
ScienceBase lets you explicitly exclude items that match criteria; see "Exclude Elements in Search Results" in https://www.sciencebase.gov/about/content/sciencebase-advanced-search. It would be great if this were also possible through sbtools, but if it is already possible, I can't figure out how to do it.
Using my browser directly,
https://www.sciencebase.gov/catalog/items?q=&lq=flood%20AND%20earthquake
currently returns 62 results whilehttps://www.sciencebase.gov/catalog/items?q=&lq=flood%20AND%20earthquake&filter=browseCategory!%3DPublication
returns 7 resultsUsing
sbtools
, I don't know how to get my 7 results. Here's what I can get:The 3rd and 4th queries above get converted into these URLs within
httr::GET
:query_sb(query_list = list(q = '', lq = 'flood AND earthquake', 'browseCategory!' = "Publication"), limit=100)
->https://www.sciencebase.gov/catalog/items/?q=&lq=flood%20AND%20earthquake&browseCategory%21=Publication&s=Search&format=json&fields=id%2Ctitle%2CparentId%2CdateCreated%2ClastUpdated%2CcreatedBy%2ClastUpdatedBy%2Cfiles&max=100
query_sb(query_list = list(q = '', lq = 'flood AND earthquake', 'browseCategory' = "!Publication")
->https://www.sciencebase.gov/catalog/items/?q=&lq=flood%20AND%20earthquake&s=Search&format=json&fields=id%2Ctitle%2CparentId%2CdateCreated%2ClastUpdated%2CcreatedBy%2ClastUpdatedBy%2Cfiles&max=100&filter=browseCategory%3D%21Publication
It appears that the
!
comes closest to the right position with'browseCategory!'=...
, but it gets converted into%21
and so loses its intended effect.So. Is exclusion already possible using some other syntax? If not, could it be made possible?
The text was updated successfully, but these errors were encountered: