mirror of https://github.com/milvus-io/milvus.git
Update range search test cases (#22900)
Signed-off-by: Binbin Lv <binbin.lv@zilliz.com>pull/22938/head
parent
980aaeceb9
commit
9ded71f2bb
|
@ -486,7 +486,12 @@ def gen_invaild_search_params_type():
|
||||||
|
|
||||||
def gen_search_param(index_type, metric_type="L2"):
|
def gen_search_param(index_type, metric_type="L2"):
|
||||||
search_params = []
|
search_params = []
|
||||||
if index_type in ["FLAT", "IVF_FLAT", "IVF_SQ8", "IVF_PQ"]:
|
if index_type in ["FLAT", "IVF_FLAT", "IVF_SQ8", "IVF_PQ", "GPU_FLAT", "GPU_IVF_FLAT", "GPU_IVF_PQ", "GPU_IVF_SQ8",
|
||||||
|
"RAFT_IVF_FLAT", "RAFT_IVF_PQ"]:
|
||||||
|
if index_type in ["GPU_FLAT"]:
|
||||||
|
ivf_search_params = {"metric_type": metric_type, "params": {}}
|
||||||
|
search_params.append(ivf_search_params)
|
||||||
|
else:
|
||||||
for nprobe in [64, 128]:
|
for nprobe in [64, 128]:
|
||||||
ivf_search_params = {"metric_type": metric_type, "params": {"nprobe": nprobe}}
|
ivf_search_params = {"metric_type": metric_type, "params": {"nprobe": nprobe}}
|
||||||
search_params.append(ivf_search_params)
|
search_params.append(ivf_search_params)
|
||||||
|
|
|
@ -187,7 +187,7 @@ all_index_types = ["FLAT", "IVF_FLAT", "IVF_SQ8", "IVF_PQ", "HNSW", "ANNOY", "DI
|
||||||
|
|
||||||
default_index_params = [{"nlist": 128}, {"nlist": 128}, {"nlist": 128}, {"nlist": 128, "m": 16, "nbits": 8},
|
default_index_params = [{"nlist": 128}, {"nlist": 128}, {"nlist": 128}, {"nlist": 128, "m": 16, "nbits": 8},
|
||||||
{"M": 48, "efConstruction": 500}, {"n_trees": 50}, {}, {"nlist": 128}, {"nlist": 128},
|
{"M": 48, "efConstruction": 500}, {"n_trees": 50}, {}, {"nlist": 128}, {"nlist": 128},
|
||||||
{"nlist": 128}, {"nlist": 128}, {"nlist": 128, "m": 16, "nbits": 8}, {"nlist": 128},
|
{}, {"nlist": 128}, {"nlist": 128, "m": 16, "nbits": 8}, {"nlist": 128},
|
||||||
{"nlist": 128}, {"nlist": 128, "m": 16, "nbits": 8}]
|
{"nlist": 128}, {"nlist": 128, "m": 16, "nbits": 8}]
|
||||||
|
|
||||||
Handler_type = ["GRPC", "HTTP"]
|
Handler_type = ["GRPC", "HTTP"]
|
||||||
|
|
|
@ -5164,14 +5164,14 @@ class TestCollectionRangeSearch(TestcaseBase):
|
||||||
"ids": [],
|
"ids": [],
|
||||||
"limit": 0})
|
"limit": 0})
|
||||||
# 4. range search with IP
|
# 4. range search with IP
|
||||||
range_search_params = {"metric_type": "IP", "params": {"nprobe": 10, "radius": 1}}
|
range_search_params = {"metric_type": "IP", "params": {"nprobe": 10, "radius": 0}}
|
||||||
collection_w.search(vectors[:default_nq], default_search_field,
|
collection_w.search(vectors[:default_nq], default_search_field,
|
||||||
range_search_params, default_limit,
|
range_search_params, default_limit,
|
||||||
default_search_exp,
|
default_search_exp,
|
||||||
check_task=CheckTasks.check_search_results,
|
check_task=CheckTasks.check_search_results,
|
||||||
check_items={"nq": default_nq,
|
check_items={"nq": default_nq,
|
||||||
"ids": [],
|
"ids": insert_ids,
|
||||||
"limit": 0})
|
"limit": default_limit})
|
||||||
|
|
||||||
@pytest.mark.tags(CaseLabel.L2)
|
@pytest.mark.tags(CaseLabel.L2)
|
||||||
def test_range_search_radius_range_filter_not_in_params(self):
|
def test_range_search_radius_range_filter_not_in_params(self):
|
||||||
|
|
Loading…
Reference in New Issue