Full-text or title search over the A2AJ corpus. The API returns at
most 50 hits per call and does not page, so narrow with
dataset and the date window rather than asking for more.
Usage
morie_ingest_a2aj_search(
query,
search_type = c("full_text", "name"),
doc_type = c("cases", "laws"),
size = 10L,
search_language = c("en", "fr"),
sort_results = c("default", "newest_first", "oldest_first"),
dataset = NULL,
start_date = NULL,
end_date = NULL,
timeout = .MORIE_A2AJ_DEFAULT_TIMEOUT,
user_agent = .MORIE_A2AJ_DEFAULT_UA
)Arguments
- query
Search string. The API accepts its own advanced syntax (quoted phrases, boolean operators); see https://api.a2aj.ca/docs.
- search_type
"full_text"(default) or"name"(titles only).- doc_type
"cases"(default) or"laws".- size
Number of hits, 1 to 50.
- search_language
"en"(default) or"fr".- sort_results
"default"(relevance with the corpus's court weighting),"newest_first"or"oldest_first".- dataset
Optional character vector of dataset codes to restrict to (for example
c("SCC", "ONCA")); seemorie_ingest_a2aj_coverage.- start_date, end_date
Optional
"YYYY-MM-DD"bounds on the document date.- timeout
HTTP timeout in seconds.
- user_agent
User-Agent header sent with the request.
