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,10 +486,15 @@ def gen_invaild_search_params_type():
|
|||
|
||||
def gen_search_param(index_type, metric_type="L2"):
|
||||
search_params = []
|
||||
if index_type in ["FLAT", "IVF_FLAT", "IVF_SQ8", "IVF_PQ"]:
|
||||
for nprobe in [64, 128]:
|
||||
ivf_search_params = {"metric_type": metric_type, "params": {"nprobe": nprobe}}
|
||||
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]:
|
||||
ivf_search_params = {"metric_type": metric_type, "params": {"nprobe": nprobe}}
|
||||
search_params.append(ivf_search_params)
|
||||
elif index_type in ["BIN_FLAT", "BIN_IVF_FLAT"]:
|
||||
if metric_type not in ct.binary_metrics:
|
||||
log.error("Metric type error: binary index only supports distance type in (%s)" % ct.binary_metrics)
|
||||
|
|
|
@ -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},
|
||||
{"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}]
|
||||
|
||||
Handler_type = ["GRPC", "HTTP"]
|
||||
|
|
|
@ -5164,14 +5164,14 @@ class TestCollectionRangeSearch(TestcaseBase):
|
|||
"ids": [],
|
||||
"limit": 0})
|
||||
# 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,
|
||||
range_search_params, default_limit,
|
||||
default_search_exp,
|
||||
check_task=CheckTasks.check_search_results,
|
||||
check_items={"nq": default_nq,
|
||||
"ids": [],
|
||||
"limit": 0})
|
||||
"ids": insert_ids,
|
||||
"limit": default_limit})
|
||||
|
||||
@pytest.mark.tags(CaseLabel.L2)
|
||||
def test_range_search_radius_range_filter_not_in_params(self):
|
||||
|
|
Loading…
Reference in New Issue