| index_add | R Documentation |
Adds a vector with the given ID to the index, optionally with metadata.
index_add(index, id, vector, meta = NULL)
index |
An |
id |
Integer. Unique identifier for the vector. |
vector |
Numeric vector of length equal to the index dimension. |
meta |
Optional list of metadata to associate with this vector. |
The index object (invisibly), for chaining.
tmp <- tempfile()
dir.create(tmp)
idx <- index_new(3L, tmp)
idx <- index_add(idx, 1L, c(1, 0, 0), meta = list(category = "a"))
unlink(tmp, recursive = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.