From ffdd156315e27fa061c9f31b1985fe355c0d1cae Mon Sep 17 00:00:00 2001 From: zhuwenxing Date: Sun, 27 Apr 2025 10:30:39 +0800 Subject: [PATCH] test: add flush for text/phrase match to make sure visibility (#41407) /kind improvement Signed-off-by: zhuwenxing --- tests/python_client/testcases/test_full_text_search.py | 1 + tests/python_client/testcases/test_phrase_match.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/python_client/testcases/test_full_text_search.py b/tests/python_client/testcases/test_full_text_search.py index 5c39dd2fca..f966d6b55d 100644 --- a/tests/python_client/testcases/test_full_text_search.py +++ b/tests/python_client/testcases/test_full_text_search.py @@ -2419,6 +2419,7 @@ class TestSearchWithFullTextSearch(TestcaseBase): if i + batch_size < len(df) else data[i: len(df)] ) + collection_w.flush() collection_w.create_index( "emb", {"index_type": "HNSW", "metric_type": "L2", "params": {"M": 16, "efConstruction": 500}}, diff --git a/tests/python_client/testcases/test_phrase_match.py b/tests/python_client/testcases/test_phrase_match.py index 600eda40fc..7e53224cec 100644 --- a/tests/python_client/testcases/test_phrase_match.py +++ b/tests/python_client/testcases/test_phrase_match.py @@ -349,7 +349,7 @@ class TestQueryPhraseMatch(TestcaseBase): collection.insert(pattern_documents) df = pd.DataFrame(pattern_documents)[["id", "text"]] log.info(f"Test data:\n {df}") - + collection.flush() collection.create_index( field_name="text", index_params={"index_type": "INVERTED"} )