View source: R/tw_cache_indexing.R
| tw_index_cache_search | R Documentation |
Tested only with SQLite and MySql. May work with other drivers.
tw_index_cache_search(
table_name = NULL,
check_first = TRUE,
type = "item",
show_details = FALSE,
language = tidywikidatar::tw_get_language(),
response_language = tidywikidatar::tw_get_language(),
cache = NULL,
cache_connection = NULL,
disconnect_db = TRUE
)
table_name |
Name of the table in the database. If given, it takes precedence over other parameters. |
check_first |
Logical, defaults to |
type |
Defaults to "item". Type of cache file to output. Values
typically used by |
show_details |
Logical, defaults to |
language |
Language to be used for the search. Can be set once per
session with |
response_language |
Language to be used for the returned labels and
descriptions. Corresponds to the |
cache |
Defaults to |
cache_connection |
Defaults to |
disconnect_db |
Defaults to |
To ensure smooth functioning, the search column in the cache table is
transformed into a column of type varchar and length 255.
If show_details is set to FALSE, nothing, used only for its side
effects (add index to caching table). If TRUE, a data frame, same as the
output of tw_check_cache_index(show_details = TRUE).
if (interactive()) {
tw_enable_cache()
tw_set_cache_folder(path = fs::path(
fs::path_home_r(),
"R",
"tw_data"
))
tw_index_cache_search()
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.