mirror of https://github.com/milvus-io/milvus.git
fix: optimize BM25 err message (#37074)
issue: https://github.com/milvus-io/milvus/issues/37022 Signed-off-by: Buqian Zheng <zhengbuqian@gmail.com>pull/36693/head
parent
84d48b498b
commit
088d5d7d76
|
@ -1013,12 +1013,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)
|
||||
|
|
|
@ -3089,7 +3089,7 @@ class TestSearchWithFullTextSearchNegative(TestcaseBase):
|
|||
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",
|
||||
|
|
Loading…
Reference in New Issue