When offset < 0 and offset + limit <= 0 ,the error message only mentioned limit even if the limit is correct.
For example, when offset = -10 and limit = 10, we'll get <MilvusException: (code=1, message=limit should be in range [1, 16385], but got 0)>.
Expected Behavior
Error message should be more exact and user friendly.
Steps To Reproduce
Run this case to get the same result.
@pytest.mark.tags(CaseLabel.L1)
@pytest.mark.parametrize("offset", [-10])
def test_search_pagination_with_invalid_offset_value(self, offset, dim, _async):
"""
target: test search pagination with invalid offset value
method: create connection, collection, insert and search with invalid offset value
expected: search successfully
"""
# 1. initialize
collection_w = self.init_collection_general(prefix, True, 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})
Is there an existing issue for this?
Environment
Current Behavior
When offset < 0 and offset + limit <= 0 ,the error message only mentioned limit even if the limit is correct. For example, when offset = -10 and limit = 10, we'll get <MilvusException: (code=1, message=limit should be in range [1, 16385], but got 0)>.
Expected Behavior
Error message should be more exact and user friendly.
Steps To Reproduce
Run this case to get the same result.
Milvus Log
No response
Anything else?
No response