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.
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new VectorizeIndex():
VectorizeIndex
Returns
Section titled “Returns”VectorizeIndex
Methods
Section titled “Methods”deleteByIds()
Section titled “deleteByIds()”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.
Parameters
Section titled “Parameters”string[]
List of vector ids that should be deleted.
Returns
Section titled “Returns”Promise<VectorizeVectorMutation>
A promise that resolves with the ids & count of records that were successfully processed (and thus deleted).
describe()
Section titled “describe()”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.
Returns
Section titled “Returns”Promise<VectorizeIndexDetails>
A promise that resolves with information about the current index.
getByIds()
Section titled “getByIds()”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.
Parameters
Section titled “Parameters”string[]
List of vector ids that should be returned.
Returns
Section titled “Returns”Promise<VectorizeVector[]>
A promise that resolves with the raw unscored vectors matching the id set.
insert()
Section titled “insert()”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.
Parameters
Section titled “Parameters”vectors
Section titled “vectors”List of vectors that will be inserted.
Returns
Section titled “Returns”Promise<VectorizeVectorMutation>
A promise that resolves with the ids & count of records that were successfully processed.
query()
Section titled “query()”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.
Parameters
Section titled “Parameters”vector
Section titled “vector”Input vector that will be used to drive the similarity search.
number[] | VectorFloatArray
options?
Section titled “options?”Configuration options to massage the returned data.
Returns
Section titled “Returns”Promise<VectorizeMatches>
A promise that resolves with matched and scored vectors.
upsert()
Section titled “upsert()”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.
Parameters
Section titled “Parameters”vectors
Section titled “vectors”List of vectors that will be upserted.
Returns
Section titled “Returns”Promise<VectorizeVectorMutation>
A promise that resolves with the ids & count of records that were successfully processed.