Skip to content

VectorizeIndex

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

A Vectorize Vector Search Index for querying vectors/embeddings.

This type is exclusively for the Vectorize beta and will be deprecated once Vectorize RC is released. See Vectorize for its new implementation.

new VectorizeIndex(): VectorizeIndex

VectorizeIndex

deleteByIds(ids): Promise<VectorizeVectorMutation>

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

Delete a list of vectors with a matching id.

string[]

List of vector ids that should be deleted.

Promise<VectorizeVectorMutation>

A promise that resolves with the ids & count of records that were successfully processed (and thus deleted).


describe(): Promise<VectorizeIndexDetails>

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

Get information about the currently bound index.

Promise<VectorizeIndexDetails>

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:9991

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<VectorizeVectorMutation>

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

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<VectorizeVectorMutation>

A promise that resolves with the ids & count of records that were successfully processed.


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:9964

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.


upsert(vectors): Promise<VectorizeVectorMutation>

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

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<VectorizeVectorMutation>

A promise that resolves with the ids & count of records that were successfully processed.