An index over a collection the store already holds; the index makes no collection.
Indexes a source, replacing whatever the collection held under its id: the old passages are deleted first, then
the new ones are embedded and written batchSize at a time. A failed batch leaves the passages written before
it, and indexing the source again replaces them. A delete or a write the store reports as failed in its result,
instead of throwing, fails the call as well.
Removes a source's passages and answers the store's deletedCount: how many went on a store that counts a delete
by filter, as PostgresVectorStore and InMemoryVectorStore do, and the store's own value on one that does not (-1
on PineconeVectorStore, 0 on QdrantVectorStore). Throws when the store reports the delete as failed.
Changes who may see a source, its folder, its tags or its title; folderId: null takes it out of its folder.
Optional aclOptional folderOptional tags?: string[]Optional title?: stringSearches what the scope may see. The store's filter selects the passages, and the index keeps only those whose
metadata meets the scope and the narrowing: a store whose filter drops or ignores a condition cannot widen the
answer, which can then hold fewer than topK passages. With anyOf, each narrowing is searched leg by leg under
the same scope and the answers are ranked as one search's (LibrarySearch.anyOf). Once its signal has
aborted, a search starts no further call to the embedder or the store and rejects (LibrarySearch.signal).
A library's sources in one collection of a vector store. Every passage of a source carries the source's tenant, access groups, kind, folder, tags and title in its metadata, so the store's own filter selects who sees it and the index checks what the store answers:
indexSourcereplaces a source whole,setSourceScopechanges who may see it and where it is filed,removeSourceandremoveTenantdelete, andsearchreads only what its scope may see.