InMemoryDocumentRegistry

org.llm4s.rag.loader.InMemoryDocumentRegistry
See theInMemoryDocumentRegistry companion object

In-memory implementation of DocumentRegistry.

Suitable for development and testing. Data is lost on restart.

Attributes

Companion
object
Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Concrete 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

Inherited methods

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

Check if a document is registered.

Check if a document is registered.

Attributes

Inherited from:
DocumentRegistry
def count(): Result[Int]

Get the count of registered documents.

Get the count of registered documents.

Attributes

Inherited from:
DocumentRegistry