FileDocumentEmbeddingStorage
open class FileDocumentEmbeddingStorage<Document, Path>(embedder: DocumentEmbedder<Document>, documentProvider: DocumentProvider<Path, Document>, fs: FileSystemProvider.ReadWrite<Path>, root: Path) : EmbeddingStorage<Document> (source)
A file-based VectorStorage implementation.
This class facilitates the storage and retrieval of documents and their corresponding vector embeddings in a file system. It utilizes a FileVectorStorageBackend for managing the document embeddings and extends EmbeddingStorage, inheriting capabilities such as ranking, storing, and deleting documents based on their embeddings.
Parameters
embedder
A mechanism responsible for embedding the documents into vector representations.
documentProvider
Provider for reading/writing documents.
fs
Platform-specific file system provider for path manipulations.
root
Root directory where all vector storage will be located.
Type Parameters
Document
The type of the documents being stored.
Inheritors
Constructors
Link copied to clipboard
constructor(embedder: DocumentEmbedder<Document>, documentProvider: DocumentProvider<Path, Document>, fs: FileSystemProvider.ReadWrite<Path>, root: Path)
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