Fix binary vector metric type validation

Signed-off-by: bigsheeper <yihao.dai@zilliz.com>
pull/4973/head^2
bigsheeper 2020-12-29 16:14:52 +08:00 committed by yefu.chen
parent be32a33eff
commit 1e3b7cd55e
1 changed files with 1 additions and 1 deletions

View File

@ -130,7 +130,7 @@ func ValidateDimension(dim int64, isBinary bool) error {
}
func ValidateVectorFieldMetricType(field *schemapb.FieldSchema) error {
if field.DataType != schemapb.DataType_VECTOR_FLOAT {
if (field.DataType != schemapb.DataType_VECTOR_FLOAT) && (field.DataType != schemapb.DataType_VECTOR_BINARY) {
return nil
}
for _, params := range field.IndexParams {