diff --git a/CHANGELOG.md b/CHANGELOG.md index 24ea875270..5211099105 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -66,6 +66,7 @@ Please mark all change in change log and use the issue from GitHub - \#2300 Upgrade mishrads configuration to version 0.4 - \#2311 Update mishards methods - \#2330 Change url for behavior 'get_entities_by_id' +- \#2347 Update http document for v0.9.0 ## Task diff --git a/core/src/server/web_impl/README.md b/core/src/server/web_impl/README.md index 00db5f053d..d277313789 100644 --- a/core/src/server/web_impl/README.md +++ b/core/src/server/web_impl/README.md @@ -540,22 +540,23 @@ $ curl -X GET "http://127.0.0.1:19121/collections/test_collection?info=stat" -H ```json { - "count": 150000, - "partitions_stat": [ + "partitions":[ { - "count": 1000, - "partition_tag": "_default", - "segments_stat": [ + "row_count":10000, + "segments":[ { - "count": 1000, - "index": "FLAT", - "segment_name": "1583727170217439000", - "size": 5284922 + "data_size":5284922, + "index_name":"IVFFLAT", + "name":"1589468453228582000", + "row_count":10000 } - ] + ], + "tag":"_default" } - ] + ], + "row_count":10000 } + ``` ### `/collections/{collection_name}` (DELETE) @@ -935,7 +936,7 @@ Deletes a partition by tag. ##### Request ```shell -$ curl -X DELETE "http://127.0.0.1:19121/collections/test_collection/partitions -H "accept: application/json" -d "{\"partition_tag\": \"tags_01\"}" +$ curl -X DELETE "http://127.0.0.1:19121/collections/test_collection/partitions" -H "accept: application/json" -d "{\"partition_tag\": \"tags_01\"}" ``` The deletion is successful if no information is returned. @@ -981,16 +982,16 @@ $ curl -X GET "http://127.0.0.1:19121/collections/test_collection/segments?offse ```json { - "code": 0, - "message": "OK", - "count": 2, - "segments": [ + "code":0, + "message":"OK", + "count":1, + "segments":[ { - "count": 10000, - "index": "IVFFLAT", - "partition_tag": "_default", - "segment_name": "1583727470444700000", - "size": 5284922 + "data_size":5284922, + "index_name":"IVFFLAT", + "name":"1589468453228582000", + "partition_tag":"_default", + "row_count":10000 } ] } @@ -1237,9 +1238,9 @@ Inserts vectors to a collection. Header
accept: application/json
Body

 {
-  "partition_tag": string,
+  "partition_tag": $string,
   "vectors": [[number($float/$uint8)]],
-  "ids": [integer($int64)]
+  "ids": [$string]
 }
 
MethodPOST @@ -1290,9 +1291,9 @@ $ curl -X POST "http://127.0.0.1:19121/collections/test_collection/vectors" -H " } ``` -### `/collections/{collection_name}/vectors?id={vector_id}` (GET) +### `/collections/{collection_name}/vectors?ids={vector_id_list}` (GET) -Obtain a vector to by ID. +Obtain vectors by ID. #### Request @@ -1305,10 +1306,10 @@ Obtain a vector to by ID. #### Query Parameters -| Parameter | Description | Required? | -| ----------------- | ----------------------- | --------- | -| `collection_name` | Name of the collection. | Yes | -| `vector_id` | Vector id. | Yes | +| Parameter | Description | Required? | +| ----------------- | ------------------------------------- | --------- | +| `collection_name` | Name of the collection. | Yes | +| `vector_id_list` | Vector id list, separated by commas. | Yes | #### Response @@ -1323,7 +1324,7 @@ Obtain a vector to by ID. ##### Request ```shell -$ curl -X GET "http://127.0.0.1:19121/collections/test_collection/vectors?id=1578989029645098000" -H "accept: application/json" -H "Content-Type: application/json" +$ curl -X GET "http://127.0.0.1:19121/collections/test_collection/vectors?ids=1578989029645098000,1578989029645098001" -H "accept: application/json" -H "Content-Type: application/json" ``` ##### Response @@ -1334,6 +1335,10 @@ $ curl -X GET "http://127.0.0.1:19121/collections/test_collection/vectors?id=157 { "id": "1578989029645098000", "vector": [0.1] + }, + { + "id": "1578989029645098001", + "vector": [0.2] } ] }