bs_search | R Documentation |
Search BASE
bs_search( query = NULL, target = NULL, coll = NULL, boost_oa = FALSE, hits = NULL, offset = NULL, fields = NULL, sortby = NULL, facets = NULL, facet_limit = 100, facet_sort = NULL, filter = NULL, raw = FALSE, parse = "df", retry = bs_retry_options(), ... ) bs_meta(x)
query |
(character) query string. For syntax details see Appendix, section "Query syntax" |
target |
(character) Internal name of a single repository as
delivered in |
coll |
(character) collection code. For existing, pre-defined collections see Appendix, section "Collection-related queries" |
boost_oa |
(logical) Push open access documents upwards in the
result list. Default: |
hits |
(integer) number of results to return. Default: 10. Max: 100 |
offset |
(integer) record to start at. Default: 0. Max: 1000 |
fields |
(character) Fields to return. This doesn't appear to be working though. The result records only contain fields listed in the comma-separated field list. For existing, pre-defined fields see Appendix, section "Fields" |
sortby |
(character) field to sort by. A sort ordering must include a single field name (see Appendix, section "Fields", table column "Sorting"), followed by a whitespace (escaped as + or %20 in URL strings), followed by sort direction (asc or desc). Default: sorts by relevance |
facets |
(character) The response contains an extra section "facet_counts/facet_fields" with fields from the comma-separated facets list. This section provides a breakdown or summary of the results. From the user's perspective, faceted search breaks up search results into multiple categories, typically showing counts for each, and allows the user to "drill down" or further restrict their search results based on those facets. Use of faceting does not affect the results section of a search response. For existing, pre-defined facet fields see Appendix, section "Fields", table column "Facet". |
facet_limit |
(numeric) Maximum number of constraint counts that should be returned for the facet fields. Default: 100; min:1; max: 500 |
facet_sort |
(character) Ordering of the facet field constraints: count - sort by count (highest count first); index - alphabetical sorting. Default: count |
filter |
(character) a string with the value to be used. html escaping
will be automatically done; embed string in |
raw |
(logical) If |
parse |
(character) One of 'list' or 'df' |
retry |
(list) use |
... |
Facet field based query options (See Facet below) or curl options passed on to crul::verb-GET |
x |
input to |
BASE asks that requests are not more frequent than 1 per second, so we enforce the rate limit internally. if you do a single request not in a for loop/lapply type situation, this won't be inoked, but will if doing a for loop/lapply call, and there's no sleep invoked
XML as character string if parse = FALSE
or data.frame
You can optionally pass in search term for specific facet fields. See example. For existing, pre-defined facet fields see Appendix at https://www.base-search.net/about/download/base_interface.pdf, section "Fields", table column "Facet"
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.