Skip to main content
upsert_binary is the low-level, high-throughput upsert path. Vectors are sent as base64-encoded binary instead of JSON arrays, which is significantly faster for large batches. Unlike the two-arg form of upsert(), this method also accepts parallel metadata and contents lists.

Parameters

Returns

None

Exceptions

  • TypeError: vectors is not a numpy array.
  • ValueError: vectors.ndim != 2, or len(ids) != vectors.shape[0], or the server rejects the upsert.

Example Usage

For small batches and most application code, prefer the dictionary form of upsert() for readability. Reach for upsert_binary when you have vectors already in numpy form and JSON encoding is on your critical path.