#community-help

Resolving ID Type Warnings and Ensuring Unique Documents

TLDR Mubashirullah asked about providing their own ID, which led to a discussion with Kishore Nallan about warnings, schemas, and preventing document repetition.

Powered by Struct AI
Dec 22, 2021 (25 months ago)
Mubashirullah
Photo of md5-cea7a558edb0c66a1c07dfdcf00bc141
Mubashirullah
06:08 AM
I was under the impression I can provide my own id. Its of type string.
Kishore Nallan
Photo of md5-4e872368b2b2668460205b409e95c2ea
Kishore Nallan
06:09 AM
Use another name like my_id
Mubashirullah
Photo of md5-cea7a558edb0c66a1c07dfdcf00bc141
Mubashirullah
06:09 AM
I used searchable_id like you suggested. I have both id and searchable_id
Kishore Nallan
Photo of md5-4e872368b2b2668460205b409e95c2ea
Kishore Nallan
06:10 AM
Yeah then don't need to add ID to the schema. It's an implicit field. Or just ignore that warning, it's not an error just a warning.
Mubashirullah
Photo of md5-cea7a558edb0c66a1c07dfdcf00bc141
Mubashirullah
06:11 AM
Cool. If I enter the same documents again, will it know its a repetition? upsert
Kishore Nallan
Photo of md5-4e872368b2b2668460205b409e95c2ea
Kishore Nallan
06:11 AM
So long you use the same ID field
Mubashirullah
Photo of md5-cea7a558edb0c66a1c07dfdcf00bc141
Mubashirullah
06:11 AM
Thank you.