Skip to contents

Inserts or updates chunks in a RagnarStore

Usage

ragnar_store_update(store, chunks)

Arguments

store

a RagnarStore object

chunks

a character vector or a dataframe with a text column, and optionally, a pre-computed embedding matrix column. If embedding is not present, then store@embed() is used. chunks can also be a character vector.

Value

store, invisibly.

Details

chunks must be a data frame containing origin and hash columns. We first filter out chunks for which origin and hash are already in the store. If an origin is in the store, but with a different hash, we all of its chunks with the new chunks. Otherwise, a regular insert is performed.

This can help spending less time computing embeddings for chunks that are already in the store.