Skip to content

Commit ba5834a

Browse files
authored
fix: Fix passing wrong json_cast_type in e2e (milvus-io#41015)
issue: milvus-io#35528 Signed-off-by: sunby <[email protected]>
1 parent 5146b41 commit ba5834a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tests/python_client/milvus_client_v2/test_milvus_client_search_v2.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -2822,7 +2822,7 @@ def test_search_expr_json_field(self):
28222822
for hits in search_res:
28232823
ids = hits.ids
28242824
assert set(ids).issubset(filter_ids_set)
2825-
# 6. search again with expression template and hint
2825+
# 6. search again with expression template and hint
28262826
search_params = default_search_params.copy()
28272827
search_params.update({"hints": "iterative_filter"})
28282828
search_res, _ = collection_w.search(search_vectors[:default_nq], default_search_field,
@@ -2840,10 +2840,10 @@ def test_search_expr_json_field(self):
28402840
log.info(filter_ids_set)
28412841
assert set(ids).issubset(filter_ids_set)
28422842
# 7. create json index
2843-
default_json_path_index = {"index_type": "INVERTED", "params": {"json_cast_type": DataType.DOUBLE,
2843+
default_json_path_index = {"index_type": "INVERTED", "params": {"json_cast_type": "double",
28442844
"json_path": f"{ct.default_json_field_name}['number']"}}
28452845
collection_w.create_index(ct.default_json_field_name, default_json_path_index, index_name = f"{ct.default_json_field_name}_0")
2846-
default_json_path_index = {"index_type": "INVERTED", "params": {"json_cast_type": DataType.DOUBLE,
2846+
default_json_path_index = {"index_type": "INVERTED", "params": {"json_cast_type": "double",
28472847
"json_path": f"{ct.default_json_field_name}['float']"}}
28482848
collection_w.create_index(ct.default_json_field_name, default_json_path_index, index_name = f"{ct.default_json_field_name}_1")
28492849
# 8. release and load to make sure the new index is loaded

0 commit comments

Comments
 (0)