Skip to content

[ERROR] metric_type should be metricType in Create Collection API docs #942

@ivhacks

Description

@ivhacks

Where is the error
https://milvus.io/api-reference/restful/v2.4.x/v2/Collection%20(v2)/Create.md

How would you like to improve it
Change all instances of metric_type to metricType

I'm learning about Milvus and am trying to create a database to compare colors by Euclidean distance. When I run the following commands, as per the current docs, to create and describe a collection, its metric type shows as the default, COSINE (note the snake_case on metric_type):

curl -s --request POST "http://localhost:19530/v2/vectordb/collections/create" \
--data-raw '{
    "collectionName": "colors",
    "dimension": 3,
    "metric_type": "L2",
    "autoId": true
}'

curl -s --request POST "http://localhost:19530/v2/vectordb/collections/describe" --data-raw '{
    "collectionName": "colors"
}' | jq

However, when I change it to metricType, it properly comes back as using L2:

curl -s --request POST "http://localhost:19530/v2/vectordb/collections/create" \
--data-raw '{
    "collectionName": "colors",
    "dimension": 3,
    "metricType": "L2",
    "autoId": true
}'

curl -s --request POST "http://localhost:19530/v2/vectordb/collections/describe" --data-raw '{
    "collectionName": "colors"
}' | jq

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions