| `table_name` | The name of the table to create, which must be unique within its database. | Yes |
| `dimension` | The dimension of the vectors that are to be inserted into the created table. | Yes |
| `collection_name` | The name of the collection to create, which must be unique within its database. | Yes |
| `dimension` | The dimension of the vectors that are to be inserted into the created collection. | Yes |
| `index_file_size` | Threshold value that triggers index building for raw data files. The default is 1024. | No |
| `metric_type` | The method vector distances are compared in Milvus. The default is L2. Currently supported metrics include `L2` (Euclidean distance), `IP` (Inner Product), `HAMMING` (Hamming distance), `JACCARD` (Jaccard distance), and `TANIMOTO` (Tanomoto distance). | No |
...
...
@@ -420,7 +423,7 @@ Creates a table.
##### Request
```shell
$ curl -X POST "http://192.168.1.65:19121/tables"-H"accept: application/json"-H"Content-Type: application/json"-d"{\"table_name\":\"test_table\",\"dimension\":1,\"index_file_size\":10,\"metric_type\":\"L2\"}"
$ curl -X POST "http://192.168.1.65:19121/collections"-H"accept: application/json"-H"Content-Type: application/json"-d"{\"collection_name\":\"test_collection\",\"dimension\":1,\"index_file_size\":10,\"metric_type\":\"L2\"}"
@@ -470,8 +473,8 @@ Gets all information about a table by name.
| Parameter | Description | Required? |
|-----------------|---|------|
| `table_name` | Name of the table. | Yes |
| `info` | Type of information to acquire. `info` must either be empty or `stat`. When `info` is empty, Milvus returns table name, dimension, index file size, metric type, offset, index type, and nlist of the table. When `info` is `stat`, Milvus returns the table offset, partition status, and segment status. | No |
| `collection_name` | Name of the collection. | Yes |
| `info` | Type of information to acquire. `info` must either be empty or `stat`. When `info` is empty, Milvus returns collection name, dimension, index file size, metric type, offset, index type, and nlist of the collection. When `info` is `stat`, Milvus returns the collection offset, partition status, and segment status. | No |
#### Response
...
...
@@ -487,24 +490,24 @@ Gets all information about a table by name.
##### Request
```shell
$ curl -X GET "http://192.168.1.65:19121/tables/test_table"-H"accept: application/json"
$ curl -X GET "http://192.168.1.65:19121/collections/test_collection"-H"accept: application/json"
@@ -628,14 +631,14 @@ Updates the index type and nlist of a table.
| Parameter | Description | Required? |
|-----------------|---|------|
| `index_type` | The type of indexing method to query the table. Please refer to [Index Types](https://www.milvus.io/docs/reference/index.md) for detailed introduction of supported indexes. The default is "FLAT". | No |
| `index_type` | The type of indexing method to query the collection. Please refer to [Index Types](https://www.milvus.io/docs/reference/index.md) for detailed introduction of supported indexes. The default is "FLAT". | No |
| `nlist` | Number of vector buckets in a file. The default is 16384. | No |
##### Query Parameters
| Parameter | Description | Required? |
|-----------------|---|------|
| `table_name` | Name of the table. | Yes |
| `collection_name` | Name of the collection. | Yes |
#### Response
...
...
@@ -658,7 +661,7 @@ Updates the index type and nlist of a table.
##### Request
```shell
$ curl -X POST "http://192.168.1.65:19121/tables/test_table/indexes"-H"accept: application/json"-H"Content-Type: application/json"-d"{\"index_type\":\"FLAT\",\"nlist\":16384}"
$ curl -X POST "http://192.168.1.65:19121/collections/test_collection/indexes"-H"accept: application/json"-H"Content-Type: application/json"-d"{\"index_type\":\"FLAT\",\"nlist\":16384}"
@@ -933,20 +1076,19 @@ Searches vectors in a table.
| Parameter | Description | Required? |
|-----------------|---|------|
| `topk` | The top k most similar results of each query vector. | Yes |
| `nprobe` | Number of queried vector buckets. | Yes |
| `tags` | Tags of partitions that you need to search. You do not have to specify this value if the table is not partitioned or you wish to search the whole table. | No |
| `tags` | Tags of partitions that you need to search. You do not have to specify this value if the collection is not partitioned or you wish to search the whole collection. | No |
| `file_ids` | IDs of the vector files. You do not have to specify this value if you do not use Milvus in distributed scenarios. Also, if you assign a value to `file_ids`, the value of `tags` is ignored. | No |
| `records` | Numeric vectors to insert to the table. | Yes |
| `records_bin` | Binary vectors to insert to the table. | Yes |
| `records` | Numeric vectors to insert to the collection. | Yes |
| `records_bin` | Binary vectors to insert to the collection. | Yes |
> Note: Select `records` or `records_bin` depending on the metric used by the table. If the table uses `L2` or `IP`, you must use `records`. If the table uses `HAMMING`, `JACCARD`, or `TANIMOTO`, you must use `records_bin`.
> Note: Type of items of vectors depends on the metric used by the collection. If the collection uses `L2` or `IP`, you must use `float`. If the collection uses `HAMMING`, `JACCARD`, or `TANIMOTO`, you must use `uint8`.
##### Query Parameters
| Parameter | Description | Required? |
|-----------------|---|------|
| `table_name` | Name of the table. | Yes |
| `collection_name` | Name of the collection. | Yes |
#### Response
...
...
@@ -961,7 +1103,7 @@ Searches vectors in a table.
##### Request
```shell
$ curl -X PUT "http://192.168.1.65:19121/tables/test_table/vectors"-H"accept: application/json"-H"Content-Type: application/json"-d"{\"topk\":2,\"nprobe\":16,\"records\":[[0.1]]}"
$ curl -X PUT "http://192.168.1.65:19121/collections/test_collection/vectors"-H"accept: application/json"-H"Content-Type: application/json"-d"{\"topk\":2,\"nprobe\":16,\"records\":[[0.1]]}"
> Note: It is recommended that you do not insert more than 1 million vectors per request.
...
...
@@ -985,8 +1180,7 @@ Inserts vectors to a table.
<tr><td>Body</td><td><pre><code>
{
"tag": string,
"records": [[number($float)]],
“records_bin”:[[number($uint64)]]
"vectors": [[number($float/$uint8)]],
"ids": [integer($int64)]
}
</code></pre></td></tr>
...
...
@@ -998,17 +1192,16 @@ Inserts vectors to a table.
| Parameter | Description | Required? |
|-----------------|---|------|
| `tag` | Tag of the partition to insert vectors to. | No |
| `records` | Numeric vectors to insert to the table. | Yes |
| `records_bin` | Binary vectors to insert to the table. | Yes |
| `ids` | IDs of the vectors to insert to the table. If you assign IDs to the vectors, you must provide IDs for all vectors in the table. If you do not specify this parameter, Milvus automatically assigns IDs to the vectors. | No |
| `vectors` | Vectors to insert to the collection. | Yes |
| `ids` | IDs of the vectors to insert to the collection. If you assign IDs to the vectors, you must provide IDs for all vectors in the collection. If you do not specify this parameter, Milvus automatically assigns IDs to the vectors. | No |
> Note: Select `records` or `records_bin` depending on the metric used by the table. If the table uses `L2` or `IP`, you must use `records`. If the table uses `HAMMING`, `JACCARD`, or `TANIMOTO`, you must use `records_bin`.
> Note: Type of items of `vectors` depends on the metric used by the collection. If the collection uses `L2` or `IP`, you must use `float`. If the collection uses `HAMMING`, `JACCARD`, or `TANIMOTO`, you must use `uint8`.
##### Query Parameters
| Parameter | Description | Required? |
|-----------------|---|------|
| `table_name` | Name of the table. | Yes |
| `collection_name` | Name of the collection. | Yes |
#### Response
...
...
@@ -1023,7 +1216,7 @@ Inserts vectors to a table.
##### Request
```shell
$ curl -X POST "http://192.168.1.65:19121/tables/test_table/vectors"-H"accept: application/json"-H"Content-Type: application/json"-d"{\"records\":[[0.1],[0.2],[0.3],[0.4]]}"
$ curl -X POST "http://192.168.1.65:19121/collections/test_collection/vectors"-H"accept: application/json"-H"Content-Type: application/json"-d"{\"vectors\":[[0.1],[0.2],[0.3],[0.4]]}"