milvus-io / milvus

A cloud-native vector database, storage for next generation AI applications
https://milvus.io
Apache License 2.0
30.36k stars 2.91k forks source link

[Bug]: When the param is {'metric_type': 'HAMMING', 'params': {'nprobe': 10}} for binary index, search will raise error #18029

Closed zhuwenxing closed 2 years ago

zhuwenxing commented 2 years ago

Is there an existing issue for this?

Environment

- Milvus version:master-20220701-6954a5ba
- Deployment mode(standalone or cluster): both
- SDK version(e.g. pymilvus v2.0.0rc2):
- OS(Ubuntu or CentOS): 
- CPU/Memory: 
- GPU: 
- Others:

Current Behavior

In the deploy test, there are also some errors about search params for binary index, like BIN_FLAT when the param is {'metric_type': 'HAMMING', 'params': {'nprobe': 10}}

pymilvus.exceptions.MilvusException: <MilvusException: (code=1, message=fail to search on all shard leaders, err=fail to Search, QueryNode ID=1, reason=Search 1 failed, reason [UnexpectedError] Assert "search not support metric type: HAMMING" at /go/src/github.com/milvus-io/milvus/internal/core/src/query/SearchBruteForce.cpp:110

see https://github.com/milvus-io/milvus/runs/7156493125?check_suite_focus=true

It works well several days ago.

Expected Behavior

all test cases passed

Steps To Reproduce

see https://github.com/milvus-io/milvus/runs/7156493125?check_suite_focus=true

build the binary index and use 'HAMMING' as metric_type

Milvus Log

failed job: https://github.com/milvus-io/milvus/runs/7156493125?check_suite_focus=true log: docker-compose-logs-standalone-reinstall (6).zip

Anything else?

maybe related to PR https://github.com/milvus-io/milvus/pull/17977

zhuwenxing commented 2 years ago

/unassign @yanliang567

/assign @longjiquan please help to take a look

longjiquan commented 2 years ago

image

We don't support HAMMING as metric type when we do float vector search, see also https://milvus.io/docs/v2.0.x/metric.md#floating.

zhuwenxing commented 2 years ago

/unassign @longjiquan /assign @zhuwenxing

zhuwenxing commented 2 years ago

It works well with correct params.