Allow same id for different collections #55

Open
opened 2026-02-16 05:16:19 -05:00 by yindo · 0 comments
Owner

Originally created by @mayrop on GitHub (Nov 12, 2024).

It would be nice to have the ability to have the same ID for different collections. This would be useful for situations where, let's say I want to create embeddings for a table called books for 2 columns "short_title" and "title", referencing different collections but same ID (same book).

Current behavior is that even though the diff collection is added to the vectorstore, if the same id is provided, it will overwrite the entire row.

Primary key then would be the combination of id + collection_id.

Originally created by @mayrop on GitHub (Nov 12, 2024). It would be nice to have the ability to have the same ID for different collections. This would be useful for situations where, let's say I want to create embeddings for a table called books for 2 columns "short_title" and "title", referencing different collections but same ID (same book). Current behavior is that even though the diff collection is added to the vectorstore, if the same id is provided, it will overwrite the entire row. Primary key then would be the combination of id + collection_id.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langchain-ai/langchain-postgres#55