younifyd
Menu

Update a record

Update a record

POST/vectors/update

Use it in a workflow

  1. Add a step and choose the Pinecone connector.
  2. Pick the Update a record action (under Data).
  3. Fill in the fields below, then reference the result from later steps as {{updateARecord.response.data}}.

Request

Request body

Enter the body as JSON in the step's Body field.

idstring

Vector's unique id.

valuesarray<number (float)>

Vector data.

sparseValuesobject

Vector sparse data. Represented as a list of indices and a list of corresponded values, which must be with the same length.

indicesarray<integer (int64)>required

The indices of the sparse data.

valuesarray<number (float)>required

The corresponding values of the sparse data, which must be with the same length as the indices.

setMetadataobject

Metadata to set for the record. Field names may not begin with `$`, which is reserved for filter operators.

namespacestring

The namespace containing the record to update.

filterobject

A metadata filter expression. When updating metadata across records in a namespace, the update is applied to all records that match the filter. See [Understanding metadata](https://docs.pinecone.io/guides/index-data/indexing-overview#metadata).

dryRunboolean

If `true`, return the number of records that match the `filter`, but do not execute the update. Default is `false`.

Default false

json
{
  "id": "example-vector-1",
  "values": [
    0.1,
    0.2,
    0.3,
    0.4,
    0.5,
    0.6,
    0.7,
    0.8
  ],
  "sparseValues": {
    "indices": [
      1,
      312,
      822,
      14,
      980
    ],
    "values": [
      0.1,
      0.2,
      0.3,
      0.4,
      0.5
    ]
  },
  "setMetadata": {
    "genre": "documentary",
    "year": 2019
  },
  "namespace": "example-namespace",
  "filter": {
    "genre": {
      "$in": [
        "comedy",
        "documentary",
        "drama"
      ]
    },
    "year": {
      "$eq": 2019
    }
  },
  "dryRun": false
}

Response

Returns 200 with an object. Read it in later steps with {{updateARecord.response.data.<field>}}.

matchedRecordsinteger (int32)

The number of records that matched the filter (if a filter was provided).

json
{
  "matchedRecords": 42
}

Need more? See the Pinecone guide for connection setup and behaviour shared by every action.

Was this page helpful?