Closed NicoYuan1986 closed 2 years ago
- Milvus version:master-20220916-11b352c - Deployment mode(standalone or cluster):standalone - SDK version(e.g. pymilvus v2.0.0rc2):2.2.0.dev30 - OS(Ubuntu or CentOS): - CPU/Memory: - GPU: - Others:
Search pagination with invalid offset value raised no exception.
Return an error code. Such as ,MilvusException: (code=1, message=Invalid offset value, should be in range [...])
Run:
@pytest.mark.tags(CaseLabel.L1) @pytest.mark.parametrize("offset", [-1, 16385]) def test_search_with_invalid_offset_value(self, offset, auto_id, dim, _async): # 1. initialize collection_w = self.init_collection_general(prefix, True, auto_id=auto_id, dim=dim)[0] # 2. search search_param = {"metric_type": "L2", "params": {"nprobe": 10}, "offset": offset} vectors = [[random.random() for _ in range(dim)] for _ in range(default_nq)] collection_w.search(vectors[:default_nq], default_search_field, search_param, default_limit, default_search_exp, _async=_async, check_task=CheckTasks.check_search_results, check_items={"nq": default_nq, "limit": default_limit, "_async": _async})
No response
/assign @XuanYang-cn /unassign
/unassign /assign @NicoYuan1986 Please help verify
Thank you for your help! The issue has been well solved now.
Is there an existing issue for this?
Environment
Current Behavior
Search pagination with invalid offset value raised no exception.
Expected Behavior
Return an error code. Such as ,MilvusException: (code=1, message=Invalid offset value, should be in range [...])
Steps To Reproduce
Run:
Milvus Log
No response
Anything else?
No response