Skip to content

Vectorize

Defined in: .pnpm-home/store/v11/links/@cloudflare/workers-types/4.20251118.0/2891147a4db443bf13ca098dcb7381fb6bac5793758b7fd187ebaf5bc0deb969/node_modules/@cloudflare/workers-types/index.ts:9998

A Vectorize Vector Search Index for querying vectors/embeddings.

Mutations in this version are async, returning a mutation id.

new Vectorize(): Vectorize

Vectorize

deleteByIds(ids): Promise<VectorizeAsyncMutation>

Defined in: .pnpm-home/store/v11/links/@cloudflare/workers-types/4.20251118.0/2891147a4db443bf13ca098dcb7381fb6bac5793758b7fd187ebaf5bc0deb969/node_modules/@cloudflare/workers-types/index.ts:10041

Delete a list of vectors with a matching id.

string[]

List of vector ids that should be deleted.

Promise<VectorizeAsyncMutation>

A promise that resolves with a unique identifier of a mutation containing the delete changeset.


describe(): Promise<VectorizeIndexInfo>

Defined in: .pnpm-home/store/v11/links/@cloudflare/workers-types/4.20251118.0/2891147a4db443bf13ca098dcb7381fb6bac5793758b7fd187ebaf5bc0deb969/node_modules/@cloudflare/workers-types/index.ts:10003

Get information about the currently bound index.

Promise<VectorizeIndexInfo>

A promise that resolves with information about the current index.


getByIds(ids): Promise<VectorizeVector[]>

Defined in: .pnpm-home/store/v11/links/@cloudflare/workers-types/4.20251118.0/2891147a4db443bf13ca098dcb7381fb6bac5793758b7fd187ebaf5bc0deb969/node_modules/@cloudflare/workers-types/index.ts:10047

Get a list of vectors with a matching id.

string[]

List of vector ids that should be returned.

Promise<VectorizeVector[]>

A promise that resolves with the raw unscored vectors matching the id set.


insert(vectors): Promise<VectorizeAsyncMutation>

Defined in: .pnpm-home/store/v11/links/@cloudflare/workers-types/4.20251118.0/2891147a4db443bf13ca098dcb7381fb6bac5793758b7fd187ebaf5bc0deb969/node_modules/@cloudflare/workers-types/index.ts:10029

Insert a list of vectors into the index dataset. If a provided id exists, an error will be thrown.

VectorizeVector[]

List of vectors that will be inserted.

Promise<VectorizeAsyncMutation>

A promise that resolves with a unique identifier of a mutation containing the insert changeset.


query(vector, options?): Promise<VectorizeMatches>

Defined in: .pnpm-home/store/v11/links/@cloudflare/workers-types/4.20251118.0/2891147a4db443bf13ca098dcb7381fb6bac5793758b7fd187ebaf5bc0deb969/node_modules/@cloudflare/workers-types/index.ts:10010

Use the provided vector to perform a similarity search across the index.

Input vector that will be used to drive the similarity search.

number[] | VectorFloatArray

VectorizeQueryOptions

Configuration options to massage the returned data.

Promise<VectorizeMatches>

A promise that resolves with matched and scored vectors.


queryById(vectorId, options?): Promise<VectorizeMatches>

Defined in: .pnpm-home/store/v11/links/@cloudflare/workers-types/4.20251118.0/2891147a4db443bf13ca098dcb7381fb6bac5793758b7fd187ebaf5bc0deb969/node_modules/@cloudflare/workers-types/index.ts:10020

Use the provided vector-id to perform a similarity search across the index.

string

Id for a vector in the index against which the index should be queried.

VectorizeQueryOptions

Configuration options to massage the returned data.

Promise<VectorizeMatches>

A promise that resolves with matched and scored vectors.


upsert(vectors): Promise<VectorizeAsyncMutation>

Defined in: .pnpm-home/store/v11/links/@cloudflare/workers-types/4.20251118.0/2891147a4db443bf13ca098dcb7381fb6bac5793758b7fd187ebaf5bc0deb969/node_modules/@cloudflare/workers-types/index.ts:10035

Upsert a list of vectors into the index dataset. If a provided id exists, it will be replaced with the new values.

VectorizeVector[]

List of vectors that will be upserted.

Promise<VectorizeAsyncMutation>

A promise that resolves with a unique identifier of a mutation containing the upsert changeset.