|
@@ -234,7 +234,7 @@ func (c *Customer) GetData(stype string) {
|
|
因为要记录所有匹配上的关键词,所有优先匹配附加词,在匹配关键词
|
|
因为要记录所有匹配上的关键词,所有优先匹配附加词,在匹配关键词
|
|
*/
|
|
*/
|
|
//1.附加词匹配
|
|
//1.附加词匹配
|
|
- IsMatch := true
|
|
|
|
|
|
+ IsMatch := false
|
|
// qu.Debug("sr.AW---", len(sr.AW))
|
|
// qu.Debug("sr.AW---", len(sr.AW))
|
|
for i, aw := range sr.AW {
|
|
for i, aw := range sr.AW {
|
|
// qu.Debug("-------------------------开始附加词匹配--------------------------")
|
|
// qu.Debug("-------------------------开始附加词匹配--------------------------")
|
|
@@ -247,13 +247,14 @@ func (c *Customer) GetData(stype string) {
|
|
// qu.Debug("-------------------------开始关键词匹配--------------------------")
|
|
// qu.Debug("-------------------------开始关键词匹配--------------------------")
|
|
IsMatchKey := RegMatch(fieldText, kw.MatchType, kw.KeyReg, matchKey, matchKeyType, true, false)
|
|
IsMatchKey := RegMatch(fieldText, kw.MatchType, kw.KeyReg, matchKey, matchKeyType, true, false)
|
|
// qu.Debug(IsMatchKey, "------------------------------------------------------------")
|
|
// qu.Debug(IsMatchKey, "------------------------------------------------------------")
|
|
- if !IsMatchKey {
|
|
|
|
- IsMatch = false
|
|
|
|
|
|
+ if IsMatchKey {
|
|
|
|
+ IsMatch = true
|
|
}
|
|
}
|
|
- } else {
|
|
|
|
- IsMatch = false
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ if len(sr.AW) == 0 {
|
|
|
|
+ IsMatch = true
|
|
|
|
+ }
|
|
/*
|
|
/*
|
|
到此已经匹配完数据
|
|
到此已经匹配完数据
|
|
*/
|
|
*/
|