res = hc.compute_vector_distance(tbl_name, database_name, "vector_field", "primary_key_name", [1, 2, 3], [[1, 1]], MetricType.L2)
Result:
This method returns a dictionary representing the distance between vectors.
Parameter description:
Parameters | Description | Required |
---|---|---|
table_name (str) | Table name | Yes |
database_name (str) | Database where the table is located | Yes |
vector_field (str) | Target vector field included in the table | Yes |
primary_key_name (str) | Primary key name | Yes |
primary_field (list) | Primary field | Yes |
float_vectors (list[list]) | Floating-point vector to be compared | Yes |
metric_type (MetricType) | Metric type | Yes |
Table 112 Calculate Vector Distance (Python API)