milvus-sdk-go
milvus-sdk-go copied to clipboard
[Bug]: Search with invalid annoy `search_k` gets nil error
Is there an existing issue for this?
- [X] I have searched the existing issues
Current Behavior
go version: master milvus version: master-20221208-6709ccf6
-
milvus doc says about the valid annoy
search_k
: -
Search with
search_k := -2
also return search results, nil error -
Search with
search_k := 9
, which less than topK 20 also return results and nil error -
Search with
search_k := 1000
, which greater than topK(10)*n_trees(56) also return search results and nil error
Is the milvus annoy index document out of date?
Expected Behavior
No response
Steps To Reproduce
No response
Environment
No response
Anything else?
No response
/assign @cqy123456
/assign @cydrain
I have checked the code, since Milvus 1.x, we have not limitation for the parameter "search_k". It's valid range scope is MIN_INT64 ~ MAX_INT64. Don't know where the doc coming from.
I have checked ANNOY official website in github (https://github.com/spotify/annoy), the description for parameter "search_k" is as following:
So change "search_k" range scope to [k, MAX_INT64].
fixed with https://github.com/milvus-io/knowhere/pull/601
/assign @ThreadDao need to update test case
/unassign