diff --git a/internal/querynodev2/delegator/delegator_data.go b/internal/querynodev2/delegator/delegator_data.go index 33ea916414b07..c0b87fd284b0a 100644 --- a/internal/querynodev2/delegator/delegator_data.go +++ b/internal/querynodev2/delegator/delegator_data.go @@ -1004,12 +1004,12 @@ func (sd *shardDelegator) buildBM25IDF(req *internalpb.SearchRequest) (float64, proto.Unmarshal(req.GetPlaceholderGroup(), pb) if len(pb.Placeholders) != 1 || len(pb.Placeholders[0].Values) == 0 { - return 0, merr.WrapErrParameterInvalidMsg("please provide varchar for bm25") + return 0, merr.WrapErrParameterInvalidMsg("please provide varchar for BM25 Function based search") } holder := pb.Placeholders[0] if holder.Type != commonpb.PlaceholderType_VarChar { - return 0, fmt.Errorf("can't build BM25 IDF for data not varchar") + return 0, merr.WrapErrParameterInvalidMsg(fmt.Sprintf("please provide varchar for BM25 Function based search, got %s", holder.Type.String())) } str := funcutil.GetVarCharFromPlaceholder(holder) diff --git a/tests/python_client/testcases/test_full_text_search.py b/tests/python_client/testcases/test_full_text_search.py index 97803999051fa..b3445f75560b7 100644 --- a/tests/python_client/testcases/test_full_text_search.py +++ b/tests/python_client/testcases/test_full_text_search.py @@ -3089,7 +3089,7 @@ def test_search_for_full_text_search_with_invalid_search_data( search_data = cf.gen_vectors(nb=nq, dim=1000, vector_data_type="FLOAT_VECTOR") log.info(f"search data: {search_data}") error = {ct.err_code: 65535, - ct.err_msg: "can't build BM25 IDF for data not varchar"} + ct.err_msg: "please provide varchar for BM25 Function based search"} collection_w.search( data=search_data, anns_field="text_sparse_emb",