|
@@ -103,13 +103,15 @@ func ConfrimExtractInfo(q map[string]interface{}) map[string]interface{} {
|
|
sess := ul.SourceMgo.GetMgoConn()
|
|
sess := ul.SourceMgo.GetMgoConn()
|
|
defer ul.SourceMgo.DestoryMongoConn(sess)
|
|
defer ul.SourceMgo.DestoryMongoConn(sess)
|
|
total := 0
|
|
total := 0
|
|
- it := sess.DB(ul.SourceMgo.DbName).C(ul.Ext_Name).Find(&q).Select(map[string]interface{}{"_id": 1}).Iter()
|
|
|
|
|
|
+ it := sess.DB(ul.SourceMgo.DbName).C(ul.Ext_Name).Find(&q).Select(map[string]interface{}{"_id": 1, "ai_zhipu": 1}).Iter()
|
|
for tmp := make(map[string]interface{}); it.Next(&tmp); total++ {
|
|
for tmp := make(map[string]interface{}); it.Next(&tmp); total++ {
|
|
- if total%100000 == 0 {
|
|
|
|
|
|
+ if total%1000 == 0 {
|
|
log.Debug("cur index ", total)
|
|
log.Debug("cur index ", total)
|
|
}
|
|
}
|
|
- tmpid := ul.BsonTOStringId(tmp["_id"])
|
|
|
|
- dict[tmpid] = tmpid
|
|
|
|
|
|
+ if tmp["ai_zhipu"] == nil { //已经识别的数据-不再识别
|
|
|
|
+ tmpid := ul.BsonTOStringId(tmp["_id"])
|
|
|
|
+ dict[tmpid] = tmpid
|
|
|
|
+ }
|
|
tmp = make(map[string]interface{})
|
|
tmp = make(map[string]interface{})
|
|
}
|
|
}
|
|
return dict
|
|
return dict
|