test: add flush for text/phrase match to make sure visibility (#41407)

/kind improvement

Signed-off-by: zhuwenxing <wenxing.zhu@zilliz.com>
This commit is contained in:
zhuwenxing 2025-04-27 10:30:39 +08:00 committed by GitHub
parent 6a15790799
commit ffdd156315
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 1 deletions

View File

@ -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}},

View File

@ -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"}
)