Optional
checkThis temporary error-ing property exists for migration convenience, and will be removed in a future version.
checkExists
option has been removed due to it being unnecessary and prone to check-then-act race conditions. createCollection
is a no-op if a collection is created with the same options; it will however still throw an error if the options differ.Optional
defaultOptions related to the default ID.
Optional
defaultThis temporary error-ing property exists for migration convenience, and will be removed in a future version.
defaultMaxTimeMS
option is no longer available here; the timeouts system has been overhauled, and defaults should now be set using the timeoutDefaults
option.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
lexicalOptions related to lexical (bm25) search.
Optional
loggingThe configuration for logging events emitted by the DataAPIClient.
This can be set at any level of the major class hierarchy, and will be inherited by all child classes.
See LoggingConfig for much more information on configuration, outputs, and inheritance.
Optional
maxThis temporary error-ing property exists for migration convenience, and will be removed in a future version.
maxTimeMS
option is no longer available here; the timeouts system has been overhauled, and defaults should now be set using the timeoutDefaults
option.Optional
namespaceThis temporary error-ing property exists for migration convenience, and will be removed in a future version.
namespace
terminology has been removed, and replaced with keyspace
throughout the client.Optional
rerankOptions related to reranking.
Optional
rerankingThe API key for the reranking service to use, or the RerankingHeadersProvider if using a provider that requires it (e.g. AWS bedrock).
Optional
Beta
serdesAdvanced & currently somewhat unstable features related to customizing the collection's ser/des behavior at a lower level.
Use with caution. See official DataStax documentation for more info.
Optional
timeoutOptional
timeoutThe default timeout options for any operation performed on this Collection instance.
See TimeoutDescriptor for much more information about timeouts.
// The request timeout for all operations is set to 1000ms.
const client = new DataAPIClient('...', {
timeoutDefaults: { requestTimeoutMs: 1000 },
});
// The request timeout for all operations borne from this Db is set to 2000ms.
const db = client.db('...', {
timeoutDefaults: { requestTimeoutMs: 2000 },
});
The timeout options are inherited by all child classes, and can be overridden at any level, including the individual method level.
Individual-method-level overrides can vary in behavior depending on the method; again, see TimeoutDescriptor.
The default timeout options are as follows:
requestTimeoutMs
: 15000generalMethodTimeoutMs
: 30000collectionAdminTimeoutMs
: 60000tableAdminTimeoutMs
: 30000databaseAdminTimeoutMs
: 600000keyspaceAdminTimeoutMs
: 30000TimeoutDescriptor
Optional
vectorOptions related to vector search.
Options for creating a new collection (via Db.createCollection).
See Db.createCollection & Collection for more information.
Field
vector - The vector configuration for the collections.
Field
indexing - The indexing configuration for the collections.
Field
defaultId - The default ID for the collections.
Field
keyspace - Overrides the keyspace for the collections.
Field
timeout - The timeout override for this method
See
Db.createCollection