瀏覽代碼

机器人回复匹配度优化

renjiaojiao 2 年之前
父節點
當前提交
482e5c3289
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      rpc/knowledge/util/elasticsearch_dsl.go

+ 1 - 1
rpc/knowledge/util/elasticsearch_dsl.go

@@ -19,7 +19,7 @@ func DSL4SmartResponse(question string, entId string, msgType int, addr, index,
 	if len(hanlpCutWords) == 0 {
 		hanlpCutWords = append(hanlpCutWords, question)
 	}
-	question = strings.Join(hanlpCutWords, "")
+	question = strings.Join(hanlpCutWords, " ")
 	lenQuestion := len([]rune(question))
 	//logx.Info("lenQuestion", lenQuestion)
 	if lenQuestion >= 2 {