Optional
checkIf true
or unset, runs an additional existence check before creating the collection, failing if the collection
with the same name already exists, raising a CollectionAlreadyExistsError.
Otherwise, if false
, the creation is always attempted, and the command will succeed even if the collection
with the given name already exists, as long as the options are the exact same (if options mismatch, it'll
throw a DataAPIResponseError).
true
Optional
defaultOptions related to the default ID.
Optional
defaultThe default maxTimeMS
for all operations on the collection. Will override the maxTimeMS set in the DataAPIClient
options; it can be overridden on a per-operation basis.
This does not mean the request will be cancelled after this time, but rather that the client will wait for this time before considering the request to have timed out.
The request may or may not still be running on the server after this time.
Optional
embeddingThe API key for the embedding service to use, or the EmbeddingHeadersProvider if using a provider that requires it (e.g. AWS bedrock).
Optional
indexingOptions related to indexing.
Optional
keyspaceThe keyspace to use for the operation.
Optional
maxThe maximum time to wait for a response from the server, in milliseconds.
Optional
namespaceThe keyspace to use for the operation.
This is now a deprecated alias for the strictly equivalent WithKeyspace.keyspace, and will be removed in an upcoming major version.
https://docs.datastax.com/en/astra-db-serverless/api-reference/client-versions.html#version-1-5
Optional
vectorOptions related to vector search.
Options for creating a new collection.
Field
vector - The vector configuration for the collection.
Field
indexing - The indexing configuration for the collection.
Field
defaultId - The default ID for the collection.
Field
keyspace - Overrides the keyspace for the collection.
Field
maxTimeMS - The maximum time to allow the operation to run.
Field
checkExists - Whether to check if the collection exists before creating it.
See
Db.createCollection