Ingestion
Ingesting files with R2R.
Document Ingestion and Management
Ingest Files
Ingest files or directories into your R2R system:
A list of file paths or directory paths to ingest. If a directory path is provided, all files within the directory and its subdirectories will be ingested.
An optional list of metadata dictionaries corresponding to each file. If provided, the length should match the number of files being ingested.
An optional list of document IDs to assign to the ingested files. If provided, the length should match the number of files being ingested.
An optional list of version strings for the ingested files. If provided, the length should match the number of files being ingested.
The ingestion config override parameter enables developers to customize their R2R chunking strategy at runtime.
Update Files
Update existing documents:
A list of file paths to update.
A list of document IDs corresponding to the files being updated. When not provided, an attempt is made to generate the correct document id from the given user id and file path.
An optional list of metadata dictionaries for the updated files.
Documents Overview
Retrieve high-level document information, restricted to user files, except when called by a superuser where it will then return results from over all users:
An optional list of document IDs to filter the overview.
Document Chunks
Fetch chunks for a particular document:
The ID of the document to retrieve chunks for.
Delete Documents
Delete a document by its ID:
A list of logical filters to perform over input documents fields which identifies the unique set of documents to delete (e.g., {"document_id": {"$eq": "9fbe403b-c11c-5aae-8ade-ef22980c3ad1"}}
). Logical operations might include variables such as "user_id"
or "title"
and filters like neq
, gte
, etc.
Was this page helpful?