|
@@ -371,17 +371,18 @@ func GetDataExportSearchCountBySieveCondition(scd *SieveCondition, elasticAddres
|
|
|
if count > 0 {
|
|
|
res = doSearch(qstr, 0, count, "")
|
|
|
}
|
|
|
- secondKWS := jy.HttpEs(scd.Keyword[0].Keyword, "ik_smart", elasticAddress)
|
|
|
- scd.Keyword[0].Keyword = secondKWS
|
|
|
- scd.SelectType = "title"
|
|
|
- qstr = getDataExportSql(scd)
|
|
|
- res2 := doSearch(qstr, 0, 100, "")
|
|
|
- result := len(*delRepeatMapArr(res, res2))
|
|
|
- if result > 100 {
|
|
|
- result = 100
|
|
|
+ if secondKWS := jy.HttpEs(scd.Keyword[0].Keyword, "ik_smart", elasticAddress); secondKWS != "" {
|
|
|
+ scd.Keyword[0].Keyword = secondKWS
|
|
|
+ scd.SelectType = "title"
|
|
|
+ qstr = getDataExportSql(scd)
|
|
|
+ res2 := doSearch(qstr, 0, 100, "")
|
|
|
+ result := len(*delRepeatMapArr(res, res2))
|
|
|
+ if result > 100 {
|
|
|
+ result = 100
|
|
|
+ }
|
|
|
+ log.Printf("GetDataExportSearchCountUseId-%s-count:%d-分词-sql:%s\n", scd.Id, result, qstr)
|
|
|
+ return result
|
|
|
}
|
|
|
- log.Printf("GetDataExportSearchCountUseId-%s-count:%d-分词-sql:%s\n", scd.Id, result, qstr)
|
|
|
- return result
|
|
|
}
|
|
|
}
|
|
|
return
|