upload_documents | R Documentation |
Upload documents
upload_documents(
index,
documents,
columns = NULL,
chunk_size = 100L,
max_tries = 5L,
verbose = TRUE,
credentials = NULL
)
index |
The name of the index documents should be added to. |
documents |
A data frame with columns title, text, date, and optional other columns. An .id column is interpreted as elastic document IDs |
columns |
An optional list with data types, e.g. list(author = "keyword"). |
chunk_size |
Uploads are broken into chunks to prevent errors. Smaller chunks are less error-prone, but this also makes the upload slower. |
max_tries |
In case something goes wrong, how often should the function retry to send the documents? |
verbose |
Should a progress bar be printed during upload. |
credentials |
The credentials to use. If not given, uses last login information. |
Nothing.
## Not run:
amcat_login("http://localhost/amcat")
docs <- data.frame(
date = "2024-01-01",
title = "This is a title",
text = "This is some text"
)
create_index(index = "new_index")
upload_documents(index = "new_index",
documents = docs)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.