Stores or replaces a vector.
The Worker environment.
Id to store the vector under — reuse the source record's id.
The embedding.
Metadata returned with future matches.
The mutation id.
Reports whether the index is bound to this Worker.
The Worker environment.
true when the binding is present.
Removes vectors by id.
The Worker environment.
The vector ids to remove.
The mutation id.
Finds the vectors closest to a query embedding.
The Worker environment.
The query embedding.
OptionaltopK: number
How many matches to return. Falls back to the configured value.
The matches, ordered by similarity.
Finds the vectors closest to one already in the index.
Saves re-embedding a stored record just to search with it.
The Worker environment.
The stored vector's id.
The matches, ordered by similarity.
Similarity-search capability, backed by Vectorize.
Remarks
Embeddings come from
AIService.embed— this capability stores and searches them, and has no opinion about how they were produced. Writes are applied asynchronously, so a mutation id comes back rather than the applied state.Author
Bayu Dwiyan Satria
Version
1.0.0
Since
1.0.0