Create or Update
AI-generatedSummary
Upserts a vector into the VectorX index for each incoming item: creates a new vector if the ID does not exist, otherwise updates the existing one.
Inputs
- Vector ID — The ID of the vector to upsert. If omitted, the vector is inserted without an explicit ID (backend‑dependent).
- Embedding (required) — JSON array of numbers representing the vector embedding, e.g. [0.1,0.2,0.3].
- Metadata (JSON) — JSON object stored alongside the vector, e.g. {
text:Example document}. - Filter (JSON) — JSON object used as a filter during the upsert operation, e.g. {
category:reference}.
Output shape
array of objects
Each returned object contains a
jsonproperty holding the result from the VectorX upsert method for the corresponding input item.
Examples
Example 1: Upsert a document vector
Set Embedding to [0.1,0.2,0.3], Vector ID to doc123, Metadata to {text:Hello world}, and leave Filter blank.