milvus-io / milvus

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

[Bug]: The feature of search_params in search and search_iterator should be consistent #25145

Closed NicoYuan1986 closed 1 year ago

NicoYuan1986 commented 1 year ago

Is there an existing issue for this?

Environment

- Milvus version: master-20230626-c31635a0
- Deployment mode(standalone or cluster): standalone
- MQ type(rocksmq, pulsar or kafka): rocksmq
- SDK version(e.g. pymilvus v2.0.0rc2): 2.4.0.dev80
- OS(Ubuntu or CentOS): 
- CPU/Memory: 
- GPU: 
- Others:

Current Behavior

The feature of search_params in search and search_iterator should be consistent.

  1. search_params = {} is allowed in search, while reports error in search_iterator. example: image

  2. default value of search list Now we do not need to set search_list while using diskann. failed test case: test_search_iterator_after_different_index_metrics (only fail on pytest now) image

[2023-06-26 16:31:33 - ERROR - pymilvus.decorators]: RPC error: [search], <MilvusException: (code=1, message=attempt #0: fail to Search, QueryNode ID=1, reason=[UnexpectedError] Assert "search_list_size.has_value()" at /go/src/github.com/milvus-io/milvus/internal/core/src/index/VectorDiskIndex.cpp:207
 => param search_listis empty: channel=by-dev-rootcoord-dml_8_442436915735203130v0: fail to access shard delegator: fail to search on all shard leaders)>, <Time:{'RPC start': '2023-06-26 16:31:33.093414', 'RPC error': '2023-06-26 16:31:33.453735'}> (decorators.py:108)

Expected Behavior

pass

Steps To Reproduce

No response

Milvus Log

No response

Anything else?

No response

NicoYuan1986 commented 1 year ago

24921 may help

MrPresent-Han commented 1 year ago

@NicoYuan1986 problem1: if metrics type is not set, then sdk side cannot decide the default radius of first page iteration. For normal search operation, metrics type will be set on query node according to the genuine metrics type of index. But if we want to know this info on sdk side, there has to be an extra rpc call to querycoord.

yanliang567 commented 1 year ago

I think all search APIs do not have to specify the metric type in search params, this is one of principles for all the sdk? @czs007 any comments? /assign @czs007

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. Rotten issues close after 30d of inactivity. Reopen the issue with /reopen.

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. Rotten issues close after 30d of inactivity. Reopen the issue with /reopen.