|
@@ -727,7 +727,7 @@ func ExtRegCore(extfrom string, doc map[string]interface{}, j *ju.Job, in *RegLu
|
|
|
}
|
|
|
} else {
|
|
|
for _, v := range j.Block {
|
|
|
- extinfo := extRegCoreToResult(extfrom, v.Text, &v.Tag, j, in)
|
|
|
+ extinfo := extRegCoreToResult(extfrom, v.Text, &v.Classify, j, in)
|
|
|
if len(extinfo) > 0 {
|
|
|
AddExtLog("extract", j.SourceMid, nil, extinfo, in, et.TaskInfo) //抽取日志
|
|
|
}
|
|
@@ -947,7 +947,7 @@ func extRegCoreToResult(extfrom, text string, tag *map[string]bool, j *ju.Job, v
|
|
|
if v.RegCore.NumSign == -1 { //正负值修正
|
|
|
val = "-" + val
|
|
|
}
|
|
|
- exfield := ju.ExtField{Field: k, Code: v.Code, RuleText: v.RuleText, Type: "regexp", MatchType: "regcontent", ExtFrom: extfrom, Value: val}
|
|
|
+ exfield := ju.ExtField{BlockTag:*tag,Field: k, Code: v.Code, RuleText: v.RuleText, Type: "regexp", MatchType: "regcontent", ExtFrom: extfrom, Value: val}
|
|
|
if extfrom == "title" {
|
|
|
exfield.Score = 4
|
|
|
}
|
|
@@ -999,7 +999,7 @@ func extRegCoreToResult(extfrom, text string, tag *map[string]bool, j *ju.Job, v
|
|
|
if j.Result[v.Field] == nil {
|
|
|
j.Result[v.Field] = [](*ju.ExtField){}
|
|
|
}
|
|
|
- field := &ju.ExtField{Field: v.Field, Code: v.Code, RuleText: v.RuleText, Type: "regexp", MatchType: "regcontent", ExtFrom: extfrom, Value: val}
|
|
|
+ field := &ju.ExtField{BlockTag:*tag,Field: v.Field, Code: v.Code, RuleText: v.RuleText, Type: "regexp", MatchType: "regcontent", ExtFrom: extfrom, Value: val}
|
|
|
if extfrom == "title" {
|
|
|
field.Score = 4
|
|
|
}
|