Skip to content

AstraDBVectorStore

Defined in: .build/typescript/packages/providers/storage/astra/src/AstraDBVectorStore.ts:26

  • BaseVectorStore

new AstraDBVectorStore(init?): AstraDBVectorStore

Defined in: .build/typescript/packages/providers/storage/astra/src/AstraDBVectorStore.ts:37

Partial<AstraDBVectorStore> & object & VectorStoreBaseParams

AstraDBVectorStore

BaseVectorStore.constructor

storesText: boolean = true

Defined in: .build/typescript/packages/providers/storage/astra/src/AstraDBVectorStore.ts:27

BaseVectorStore.storesText


flatMetadata: boolean = true

Defined in: .build/typescript/packages/providers/storage/astra/src/AstraDBVectorStore.ts:28


idKey: string

Defined in: .build/typescript/packages/providers/storage/astra/src/AstraDBVectorStore.ts:30


contentKey: string

Defined in: .build/typescript/packages/providers/storage/astra/src/AstraDBVectorStore.ts:31

createAndConnect(collection, options?): Promise<void>

Defined in: .build/typescript/packages/providers/storage/astra/src/AstraDBVectorStore.ts:79

Create a new collection in your Astra DB vector database and connects to it. You must call this method or connect before adding, deleting, or querying.

string

Your new collection’s name

CreateCollectionOptions<SomeDoc>

CreateCollectionOptions used to set the number of vector dimensions and similarity metric

Promise<void>

Promise that resolves if the creation did not throw an error.


connect(collection): Promise<void>

Defined in: .build/typescript/packages/providers/storage/astra/src/AstraDBVectorStore.ts:96

Connect to an existing collection in your Astra DB vector database. You must call this method or createAndConnect before adding, deleting, or querying.

string

Your existing collection’s name

Promise<void>

Promise that resolves if the connection did not throw an error.


client(): DataAPIClient

Defined in: .build/typescript/packages/providers/storage/astra/src/AstraDBVectorStore.ts:107

Get an instance of your Astra DB client.

DataAPIClient

the AstraDB client

BaseVectorStore.client


add(nodes): Promise<string[]>

Defined in: .build/typescript/packages/providers/storage/astra/src/AstraDBVectorStore.ts:116

Add your document(s) to your Astra DB collection.

BaseNode<Metadata>[]

Promise<string[]>

an array of node ids which were added

BaseVectorStore.add


delete(refDocId, deleteOptions?): Promise<void>

Defined in: .build/typescript/packages/providers/storage/astra/src/AstraDBVectorStore.ts:156

Delete a document from your Astra DB collection.

string

The id of the document to delete

DeleteOneOptions

DeleteOneOptions to pass to the delete query

Promise<void>

Promise that resolves if the delete query did not throw an error.

BaseVectorStore.delete


query(query, options?): Promise<VectorStoreQueryResult>

Defined in: .build/typescript/packages/providers/storage/astra/src/AstraDBVectorStore.ts:181

Query documents from your Astra DB collection to get the closest match to your embedding.

VectorStoreQuery

VectorStoreQuery

FindOptions

FindOptions

Promise<VectorStoreQueryResult>

BaseVectorStore.query