Update vectors

更新时间:
复制 MD 格式

This topic describes how to update vectors in DashVector using the console, an SDK, and an API.

Console

  1. Log on to the Vector Retrieval Service DashVector console.

  2. In the navigation pane on the left, click Cluster List. Select the collection that contains the vectors you want to update, and click Details.image

  1. In the left-side secondary navigation pane, click Update Vector. Enter the required information and click Confirm to update the vector.

    Note
    • If the specified ID does not exist when you update a vector, the update operation fails.

    • If you update only some fields, the other fields are set to None by default.

    1. Update a vector in a single-vector collectionimage

      The update vector has the following parameters.

      Parameter

      Corresponding API parameter

      Description

      Required

      Vector

      vector

      The vector data. For example, [1.0,2.0,3.0,4.0].

      Note

      The vector dimensions and data type must be the same as those of the collection.

      Yes

      Primary Key ID

      id

      • Must consist of uppercase letters, lowercase letters, digits, and the following special characters: _ - ! @ # $ % + = .

      • Cannot exceed 64 characters in length.

      Yes

      Fields

      fields

      The JSON field parameters. For example, {"price":100,"type":"dress"}

      No

      Partition

      partition

      The partition name. The default value is default.

      Note

      You can only update vectors in the selected partition.

      Yes

    2. Update vectors in a multi-vector collection

      image

      Note
      • Click Add Vector Update to add a new record. The number of vectors cannot exceed the limit defined for the collection.

      • Click the delete button on the right to delete the record.

      • For a given primary key ID, each vector name can be associated with only one vector.

      The following table describes the parameters for updating vectors.

      Parameter

      Corresponding API parameter

      Description

      Required

      Vector name

      {VectorName}

      A custom name. It must meet the following requirements:

      • Must be 3 to 32 characters in length.

      • Must consist of uppercase letters, lowercase letters, digits, and the following special characters: _ and -. For example: vector1, vector_1, or vector_a_name.

      • The vector name must be unique within the collection. Duplicate vector names are not allowed.

      Note

      You can only select a vector name that was specified when the collection was created.

      Yes

      Vector

      vector

      The vector data. For example, [1.0,2.0,3.0,4.0].

      Note

      The vector dimensions and data type must be the same as those defined when the collection was created.

      Yes

      Primary Key ID

      id

      • Must consist of uppercase letters, lowercase letters, digits, and the following special characters: _ - ! @ # $ % + = .

      • Cannot exceed 64 characters in length.

      Yes

      Fields

      fields

      The JSON field parameters. For example, {"price":100,"type":"dress"}

      No

      Partition

      partition

      The partition name. The default value is default.

      Note

      You can only update vectors in the selected partition.

      Yes

Use an SDK

  • For information about updating vectors using the Python SDK, see Update Doc.

  • For information about updating vectors using the Java SDK, see Update Doc.

Use an API

For information about updating vectors using the HTTP API, see Update Doc.