Skip to content

Commit

Permalink
fix restful tests
Browse files Browse the repository at this point in the history
Signed-off-by: Cai Zhang <[email protected]>
  • Loading branch information
xiaocai2333 committed Oct 31, 2024
1 parent 8bece81 commit 668c333
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/restful_client_v2/testcases/test_vector_operations.py
Original file line number Diff line number Diff line change
Expand Up @@ -1761,7 +1761,7 @@ def test_search_vector_with_text_match_filter(self, tokenizer):
vector_to_search = [[random.random() for _ in range(dim)]]
for field in text_fields:
token = wf_map[field].most_common()[0][0]
expr = f"TextMatch({field}, '{token}')"
expr = f"text_match({field}, '{token}')"
logger.info(f"expr: {expr}")
rsp = self.vector_client.vector_search({"collectionName": name, "data":vector_to_search, "filter": f"{expr}", "outputFields": ["*"]})
assert rsp['code'] == 0, rsp
Expand Down Expand Up @@ -2574,7 +2574,7 @@ def test_query_vector_with_text_match_filter(self, tokenizer):
time.sleep(5)
for field in text_fields:
token = wf_map[field].most_common()[0][0]
expr = f"TextMatch({field}, '{token}')"
expr = f"text_match({field}, '{token}')"
logger.info(f"expr: {expr}")
rsp = self.vector_client.vector_query({"collectionName": name, "filter": f"{expr}", "outputFields": ["*"]})
assert rsp['code'] == 0, rsp
Expand Down

0 comments on commit 668c333

Please sign in to comment.