Hi there — I’m seeing this error when indexing with Genkit:
Document already exists with the given _id.
Looking at commit 3ad7b4f, I noticed you originally changed the behavior to avoid collisions (which makes sense), but then reverted it. As far as I can tell, the document _id is currently derived from the document content.
_id: Md5.hashStr(JSON.stringify(embeddingDocs[j])),
Would it be possible to leave _id empty and let AstraDB generate a unique ID by default? In my use case, duplicate documents are likely to appear, and that’s fine for now — I’d just prefer not to fail on insert due to _id collisions.
Could you advise on how to enable auto-generated IDs with AstraDB in this flow, or enable the upset optionally to avoid these collisions?
Thanks!
Hi there — I’m seeing this error when indexing with Genkit:
Looking at commit 3ad7b4f, I noticed you originally changed the behavior to avoid collisions (which makes sense), but then reverted it. As far as I can tell, the document _id is currently derived from the document content.
Would it be possible to leave _id empty and let AstraDB generate a unique ID by default? In my use case, duplicate documents are likely to appear, and that’s fine for now — I’d just prefer not to fail on insert due to _id collisions.
Could you advise on how to enable auto-generated IDs with AstraDB in this flow, or enable the upset optionally to avoid these collisions?
Thanks!