未验证 提交 860cc97a 编写于 作者: B BossZou 提交者: GitHub

[skip ci] Update http document for v0.9.0 (#2347) (#2348)

Signed-off-by: Nyhz <413554850@qq.com>
上级 3c46b22d
......@@ -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
......
......@@ -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.
<tr><td>Header </td><td><pre><code>accept: application/json</code></pre> </td></tr>
<tr><td>Body</td><td><pre><code>
{
"partition_tag": string,
"partition_tag": $string,
"vectors": [[number($float/$uint8)]],
"ids": [integer($int64)]
"ids": [$string]
}
</code></pre> </td></tr>
<tr><td>Method</td><td>POST</td></tr>
......@@ -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]
}
]
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册