DocumentRegistry

org.llm4s.rag.loader.DocumentRegistry

Registry for tracking indexed documents.

Used by sync operations to determine which documents have been indexed, their versions, and to detect changes (adds, updates, deletes).

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes

Members list

Value members

Abstract methods

def allDocumentIds(): Result[Set[String]]

Get all registered document IDs.

Get all registered document IDs.

Attributes

Returns

Set of all document IDs currently registered

def clear(): Result[Unit]

Clear all registrations.

Clear all registrations.

Attributes

def getVersion(docId: String): Result[Option[DocumentVersion]]

Check if document exists and get its version.

Check if document exists and get its version.

Value parameters

docId

Document identifier

Attributes

Returns

Version if document is registered, None otherwise

def register(docId: String, version: DocumentVersion): Result[Unit]

Register a document as indexed.

Register a document as indexed.

Value parameters

docId

Document identifier

version

Document version at time of indexing

Attributes

def unregister(docId: String): Result[Unit]

Unregister a document (deleted from source).

Unregister a document (deleted from source).

Value parameters

docId

Document identifier to remove

Attributes

Concrete methods

def contains(docId: String): Result[Boolean]

Check if a document is registered.

Check if a document is registered.

Attributes

def count(): Result[Int]

Get the count of registered documents.

Get the count of registered documents.

Attributes