PowderLi ab188dccae
Add a new configuration item: proxy.http.port (#25923)
user define the port for high-level restful api by themselves
    user can only use the default port same as grcp only while tlsMode == 0
fix need authenticate only while authorizationEnable: true
restful api allow origin: *
support insert a single row and an array whose length is 1 at the same time
http response code: 401-incorrect username & password; 403-user has no permission
create collection with default index: vector_idx
while field.DataType == varchar, show it's max_length
check the required parameter

Signed-off-by: PowderLi <min.li@zilliz.com>
2023-08-08 10:17:09 +08:00

58 lines
1.5 KiB
Go

package httpserver
const (
ContextUsername = "username"
VectorCollectionsPath = "/vector/collections"
VectorCollectionsCreatePath = "/vector/collections/create"
VectorCollectionsDescribePath = "/vector/collections/describe"
VectorCollectionsDropPath = "/vector/collections/drop"
VectorInsertPath = "/vector/insert"
VectorSearchPath = "/vector/search"
VectorGetPath = "/vector/get"
VectorQueryPath = "/vector/query"
VectorDeletePath = "/vector/delete"
ShardNumDefault = 1
EnableDynamic = true
EnableAutoID = true
DisableAutoID = false
HTTPCollectionName = "collectionName"
HTTPDbName = "dbName"
DefaultDbName = "default"
DefaultIndexName = "vector_idx"
DefaultOutputFields = "*"
HTTPReturnCode = "code"
HTTPReturnMessage = "message"
HTTPReturnData = "data"
HTTPReturnFieldName = "name"
HTTPReturnFieldType = "type"
HTTPReturnFieldPrimaryKey = "primaryKey"
HTTPReturnFieldAutoID = "autoId"
HTTPReturnDescription = "description"
HTTPReturnIndexName = "indexName"
HTTPReturnIndexField = "fieldName"
HTTPReturnIndexMetricsType = "metricType"
HTTPReturnDistance = "distance"
DefaultMetricType = "L2"
DefaultPrimaryFieldName = "id"
DefaultVectorFieldName = "vector"
Dim = "dim"
)
const (
ParamAnnsField = "anns_field"
Params = "params"
ParamRoundDecimal = "round_decimal"
ParamOffset = "offset"
ParamLimit = "limit"
BoundedTimestamp = 2
)