View source: R/workset_builder.R
workset_builder | R Documentation |
Queries the SOLR endpoint of the Workset Builder 2.0 (beta) at https://solr2.htrc.illinois.edu/solr-ef20/. This API is experimental, and so this function can fail at any time if the API changes.
workset_builder(
token,
title,
name,
imprint,
pub_date,
lang = "eng",
volumes_only = TRUE,
token_join = c("AND", "OR"),
max_vols = Inf,
query_string,
verbose = FALSE
)
token |
The tokens to search for in the Hathi Trust Extracted Features
files. Can be a vector of characters, e.g., |
title |
Title field. Multiple words will be joined with "AND"; can be a phrase (e.g., "Democracy in America"). |
name |
Names associated with the book (e.g., author). Multiple terms will be joined with "AND"; can be a phrase (e.g., "Alexis de Tocqueville"). |
imprint |
Imprint information (e.g., publisher). Multiple terms will be joined with "AND"; can be a phrase (e.g., "University of Chicago Press"). |
pub_date |
Publication date in Hathi Trust metadata. Can be a range,
e.g., |
lang |
Language. Default is "eng" (English); a string like "English" or
any 2 or 3 letter ISO639 code (available in the dataset iso639 included
with this package) is allowed. (If no language code is found, the default
is to search all languages; set to |
volumes_only |
If |
token_join |
The logical connector for the tokens in |
max_vols |
Maximum number of volumes to return. Default is |
query_string |
You can pass a query string directly - this is very useful for complex queries. For a guide to SOLR query syntax, see https://solr.apache.org/guide/6_6/the-standard-query-parser.html#the-standard-query-parser; for information about what fields are available see the Workset Builder page https://solr2.htrc.illinois.edu/solr-ef20/ |
verbose |
Whether to display the query string used. Default is |
A tibble with volume_ids, number of occurrences of the terms in the
volume, and if volumes_only
is FALSE
a column for page ids.
# All volumes that mention "tylenol" and "paracetamol", not necessarily in the same page
workset_builder(c("tylenol", "paracetamol"), volumes_only = FALSE)
# All volumes mentioning "demagogue" published between 1800 and 1900
workset_builder("demagogue", pub_date = 1800:1900)
# All volumes mentioning "demagogue" with "Tocqueville" and "Reeve"
# in the author field
workset_builder("demagogue", name = c("Tocqueville", "Reeve"))
# All volumes with "Tocqueville" in the author field
workset_builder(name = "Tocqueville")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.