Skip to content

Commit

Permalink
test: modify cases for the update of IVF_FLAT (#29069)
Browse files Browse the repository at this point in the history
pr: #27179

Signed-off-by: nico <[email protected]>
  • Loading branch information
NicoYuan1986 authored Dec 12, 2023
1 parent d36bf21 commit 30ec598
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions tests/python_client/testcases/test_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -3027,8 +3027,7 @@ def test_search_with_expression_bool(self, dim, auto_id, _async, bool_type, enab
enable_dynamic_field=enable_dynamic_field)[0:4]

# 2. create index
index_param = {"index_type": "IVF_FLAT",
"metric_type": "COSINE", "params": {"nlist": 100}}
index_param = {"index_type": "FLAT", "metric_type": "COSINE", "params": {"nlist": 100}}
collection_w.create_index("float_vector", index_param)
collection_w.load()

Expand All @@ -3051,8 +3050,7 @@ def test_search_with_expression_bool(self, dim, auto_id, _async, bool_type, enab
expression = f"{default_bool_field_name} == {bool_type}"
log.info(
"test_search_with_expression_bool: searching with bool expression: %s" % expression)
vectors = [[random.random() for _ in range(dim)]
for _ in range(default_nq)]
vectors = [[random.random() for _ in range(dim)] for _ in range(default_nq)]

search_res, _ = collection_w.search(vectors[:default_nq], default_search_field,
default_search_params, nb, expression,
Expand Down Expand Up @@ -5087,7 +5085,7 @@ def test_search_with_different_string_expr(self, dim, expression, _async, enable
filter_ids.append(_id)

# 2. create index
index_param = {"index_type": "IVF_FLAT", "metric_type": "COSINE", "params": {"nlist": 100}}
index_param = {"index_type": "FLAT", "metric_type": "COSINE", "params": {"nlist": 100}}
collection_w.create_index("float_vector", index_param)
collection_w.load()

Expand Down

0 comments on commit 30ec598

Please sign in to comment.