Merge branch 'master' into fix#1598

This commit is contained in:
Jin Hai 2020-03-10 18:10:23 +08:00 committed by GitHub
commit 2a6e70d5f0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 14 additions and 10 deletions

View File

@ -58,6 +58,7 @@ Please mark all change in change log and use the issue from GitHub
- \#1580 Old segment folder not removed after merge/compact if create_index is called before adding data - \#1580 Old segment folder not removed after merge/compact if create_index is called before adding data
- \#1590 Server down caused by failure to write file during concurrent mixed operations - \#1590 Server down caused by failure to write file during concurrent mixed operations
- \#1598 Server down during mixed operations - \#1598 Server down during mixed operations
- \#1601 External link bug in HTTP doc
## Feature ## Feature
- \#216 Add CLI to get server info - \#216 Add CLI to get server info

View File

@ -391,7 +391,7 @@ $ curl -X GET "http://127.0.0.1:19121/collections?offset=0&page_size=1" -H "acce
"metric_type": "L2", "metric_type": "L2",
"count": 0, "count": 0,
"index": "FLAT", "index": "FLAT",
"nlist": 16384 "index_params": {"nlist": 4096}
} }
], ],
"count": 58 "count": 58
@ -517,7 +517,7 @@ $ curl -X GET "http://127.0.0.1:19121/collections/test_collection" -H "accept: a
"metric_type": "L2", "metric_type": "L2",
"count": 0, "count": 0,
"index": "FLAT", "index": "FLAT",
"index_params": {} "index_params": {"nprobe": 16384}
} }
``` ```
@ -539,7 +539,7 @@ $ curl -X GET "http://127.0.0.1:19121/collections/test_collection?info=stat" -H
"segments_stat": [ "segments_stat": [
{ {
"count": 1000, "count": 1000,
"index": "IVFFLAT", "index": "FLAT",
"segment_name": "1583727170217439000", "segment_name": "1583727170217439000",
"size": 5284922 "size": 5284922
} }
@ -681,7 +681,7 @@ Updates the index type and nlist of a collection.
| Parameter | Description | Required? | | Parameter | Description | Required? |
| ------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------- | | ------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------- |
| `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 | | `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 |
| `params` | The extra params of indexing method to query the collection. Please refer to - [Index params](#index_param) for detailed introduction of supported indexes. | No | | `params` | The extra params of indexing method to query the collection. Please refer to [Index and search parameters](#Index-and-search-parameters) for detailed introduction of supported indexes. | No |
##### Query Parameters ##### Query Parameters
@ -1122,7 +1122,7 @@ $ curl -X GET "http://127.0.0.1:19121/collections/test_collection/segments/15837
| `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 | | `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 | | `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 |
| `vectors` | Vectors to query. | Yes | | `vectors` | Vectors to query. | Yes |
| `params` | Extra params for search. Please refer to [Search param](#index_param) to get more detail information. | Yes | | `params` | Extra params for search. Please refer to [Index and search parameters](#Index-and-search-parameters) to get more detail information. | Yes |
> 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`. > 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`.
@ -1510,7 +1510,7 @@ $ curl -X PUT "http://127.0.0.1:19121/system/task" -H "accept: application/json"
{ "code": 0, "message": "success" } { "code": 0, "message": "success" }
``` ```
## Index parameters ## Index and search parameters
For each index type, the RESTful API has specific index parameters and search parameters. For each index type, the RESTful API has specific index parameters and search parameters.

View File

@ -617,10 +617,7 @@ class WebController : public oatpp::web::server::api::ApiController {
} }
ADD_CORS(VectorsOp) ADD_CORS(VectorsOp)
/*************
* Search
* Delete by ID
* */
ENDPOINT("PUT", "/collections/{collection_name}/vectors", VectorsOp, ENDPOINT("PUT", "/collections/{collection_name}/vectors", VectorsOp,
PATH(String, collection_name), BODY_STRING(String, body)) { PATH(String, collection_name), BODY_STRING(String, body)) {
TimeRecorder tr(std::string(WEB_LOG_PREFIX) + "PUT \'/collections/" + collection_name->std_str() + "/vectors\'"); TimeRecorder tr(std::string(WEB_LOG_PREFIX) + "PUT \'/collections/" + collection_name->std_str() + "/vectors\'");
@ -648,6 +645,12 @@ class WebController : public oatpp::web::server::api::ApiController {
return response; return response;
} }
ADD_CORS(SystemOptions)
ENDPOINT("OPTIONS", "/system/{info}", SystemOptions) {
return createResponse(Status::CODE_204, "No Content");
}
ADD_CORS(SystemInfo) ADD_CORS(SystemInfo)
ENDPOINT("GET", "/system/{info}", SystemInfo, PATH(String, info), QUERIES(const QueryParams&, query_params)) { ENDPOINT("GET", "/system/{info}", SystemInfo, PATH(String, info), QUERIES(const QueryParams&, query_params)) {