payloadcms-vectorize@1.1.0
Minor Changes
-
#71
98bc41bThanks @techiejd! - Add vector read primitives and the ability to retrieve stored embedding vectors.vectorizedPayload.findByIds({ knowledgePool, ids, populateEmbedding })— batch-fetch embedding records by id, returningRecord<string, EmbeddingRecord | undefined>(misses map toundefined). Implemented across the pg, cf, and mongodb adapters.vectorizedPayload.searchByEmbedding({ knowledgePool, embedding, where, limit, populateEmbedding })— run a vector search directly from a raw embedding vector, skipping the query-embedding step. This is the "more like this" primitive: feed it theembeddingreturned byfindByIds({ populateEmbedding: true })to find similar content. Result shape andwherefiltering matchsearch(). Unlikesearch(), it does not run reranking even on a pool configured withrerank, since rerankers operate on the original query text. Local API only.populateEmbedding?: booleanoption (defaultfalse) onsearch()andsearchByEmbedding()— whentrue, each result includes its stored embedding vector.VectorSearchResultandEmbeddingRecordnow exposeembedding?: number[].
Fix:
- mongodb adapter
search()now returns all stored fields (including extension fields) on each result, matching the pg and cf adapters for cross-adapter parity.