test: remove re-building index (#32534)

Signed-off-by: zhuwenxing <wenxing.zhu@zilliz.com>
This commit is contained in:
zhuwenxing 2024-04-28 14:19:25 +08:00 committed by GitHub
parent 51297b51e1
commit 2ab57ca10c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -201,36 +201,6 @@ class TestActionSecondDeployment(TestDeployBase):
delete_expr = f"{ct.default_int64_field_name} in [0,1,2,3,4,5,6,7,8,9]"
collection_w.delete(expr=delete_expr)
# search and query
collection_w.search(vectors_to_search[:default_nq], default_search_field,
search_params, default_limit,
default_search_exp,
output_fields=[ct.default_int64_field_name],
check_task=CheckTasks.check_search_results,
check_items={"nq": default_nq,
"limit": default_limit})
collection_w.query(default_term_expr, output_fields=[ct.default_int64_field_name],
check_task=CheckTasks.check_query_not_empty)
# drop index if exist
if len(index_names) > 0:
for index_name in index_names:
collection_w.release()
collection_w.drop_index(index_name=index_name)
default_index_param = gen_index_param(vector_index_type)
self.create_index(collection_w, default_index_field, default_index_param)
collection_w.load()
collection_w.search(vectors_to_search[:default_nq], default_search_field,
search_params, default_limit,
default_search_exp,
output_fields=[ct.default_int64_field_name],
check_task=CheckTasks.check_search_results,
check_items={"nq": default_nq,
"limit": default_limit})
collection_w.query(default_term_expr, output_fields=[ct.default_int64_field_name],
check_task=CheckTasks.check_query_not_empty)
# search and query
collection_w.search(vectors_to_search[:default_nq], default_search_field,
search_params, default_limit,