Closed TejasQ closed 4 months ago
Apologies, looks like that's somewhat out of date ts-doc—if you pass checkExists: false
, it should work as expected
e.g.
const collection = await db.createCollection(collectionName, {
vector: {
dimension: 1024,
},
checkExists: false,
});
It'll be fixed in the next patch version, thanks for bringing this to our attention!
tsdoc tweaked in 1.0.1
Given this code snippet:
I get this error:
My workaround is to actually make it idempotent and not raise an error by wrapping the call to
createCollection
in a try/catch block and swallowing the error. When I do this, everything continues as normal.Current status: calling
createCollection
on an existing collection raises an error when the documentation says it does not. Expected: no error if collection already exists.There is no difference in configuration.