mirror of
https://gitee.com/milvus-io/milvus.git
synced 2025-12-30 23:45:28 +08:00
/kind improvement --------- Signed-off-by: zhuwenxing <wenxing.zhu@zilliz.com> Signed-off-by: zhuwenxing <wxzhuyeah@gmail.com>
15 lines
406 B
Go
15 lines
406 B
Go
package helper
|
|
|
|
import (
|
|
"github.com/milvus-io/milvus/client/v2/entity"
|
|
)
|
|
|
|
// TNewBM25Function creates a new BM25 function with the given input and output fields
|
|
func TNewBM25Function(inputField, outputField string) *entity.Function {
|
|
return entity.NewFunction().
|
|
WithName(inputField + "_bm25_emb").
|
|
WithInputFields(inputField).
|
|
WithOutputFields(outputField).
|
|
WithType(entity.FunctionTypeBM25)
|
|
}
|