EmbeddingStorage
open class EmbeddingStorage<Document>(embedder: DocumentEmbedder<Document>, storage: VectorStorageBackend<Document>) : VectorStorage<Document, SimilaritySearchRequest> , CapabilityAwareStorage(source)
A VectorStorage naive implementation that composes a DocumentEmbedder with a VectorStorageBackend.
The embedding step is handled by this class, while the actual persistence is delegated to the provided VectorStorageBackend. This separation allows swapping backends (in-memory, file-based, real vector database) independently from the embedding model.
Subclasses can customize embedding, scoring, or request handling by overriding the protected template methods embedDocument, embedQuery, and score, without rewriting entire storage operations.
Type Parameters
Document
The type of the document being stored and ranked.
Inheritors
Functions
Link copied to clipboard
Retrieves a flow of all documents stored in the system.
Link copied to clipboard
Link copied to clipboard
open suspend override fun search(request: SimilaritySearchRequest, namespace: String?): List<SearchResult<Document>>
Link copied to clipboard