Constructs a VectorizeBinding instance.
Optionalsettings: VectorizeSettings
Resolved settings. Defaults to resolve('vectorize'), so callers
normally construct this with no arguments at all.
Private Optional ReadonlynamespaceDefault namespace applied to queries.
Private ReadonlysettingsThis accessor’s settings, resolved on first read.
Private Optional ReadonlytopDefault number of matches returned by queries.
The binding name this instance resolves.
The binding name as declared in wrangler.json.
Deletes vectors by id.
The Worker environment.
The vector ids to delete.
The mutation id — deletes are applied asynchronously.
Reads index metadata — dimensions, metric, and vector count.
The Worker environment.
Information about the bound index.
Fetches vectors by id.
The Worker environment.
The vector ids to fetch.
The matching vectors, unscored.
Inserts vectors, failing when an id already exists.
The Worker environment.
The vectors to insert.
The mutation id — writes are applied asynchronously.
Checks whether the binding is available on the given environment.
Use this to degrade gracefully when a binding is optional.
The Worker environment.
true when the binding is present.
Runs a similarity search for the given vector.
The Worker environment.
The query vector.
Query options — overrides the configured defaults.
The scored matches, ordered by similarity.
MissingBindingError When the Vectorize binding is absent.
Runs a similarity search for a vector already stored in the index.
The Worker environment.
Id of the stored vector to search against.
Query options — overrides the configured defaults.
The scored matches, ordered by similarity.
Resolves the binding, failing fast when it is not configured.
The Worker environment.
The resolved binding.
MissingBindingError When the binding is absent from the environment.
Resolves the binding without throwing.
The Worker environment.
The resolved binding, or null when it is not configured.
Inserts vectors, replacing any that already exist.
The Worker environment.
The vectors to upsert.
The mutation id — writes are applied asynchronously.
PrivatewithApplies the configured defaults to query options that do not set them.
The caller-supplied query options.
Query options with defaults filled in.
Accessor for the Vectorize index binding (
vectorizeinwrangler.json).Example
Author
Bayu Dwiyan Satria
Version
1.0.0
Since
1.0.0