|
@@ -77,7 +77,7 @@ func FilterKey(k string) string {
|
|
|
}
|
|
|
|
|
|
// InterceptSearchKW 超过keywordsLimit个字,截断
|
|
|
-//返回截取后的字符串和截取掉中的前3个字
|
|
|
+// 返回截取后的字符串和截取掉中的前3个字
|
|
|
// b_word:截取后的关键词;a_word:截取后 后面三个字;s_word:已截取 处理过的关键词
|
|
|
func InterceptSearchKW(word string, keywordsLimit int, isFilter bool) (bWord, aWord, sWord string) {
|
|
|
if isFilter {
|
|
@@ -144,7 +144,6 @@ func HttpEs(ques, analyzer, esAddress string) (res string) {
|
|
|
return
|
|
|
}
|
|
|
|
|
|
-//
|
|
|
func getESResp(ques, analyzer string, adds []string) (resp *http.Response, err error) {
|
|
|
for _, v := range adds {
|
|
|
curl := v + "/bidding/_analyze"
|
|
@@ -166,14 +165,16 @@ const (
|
|
|
RedisNameNew = "newother"
|
|
|
SearchPageSize = 50 //招标搜索分页--每页显示数量
|
|
|
//招标搜索分页--最大页数
|
|
|
- SearchMaxPageNum = 10 //免费用户500条记录
|
|
|
- SearchMaxPageNum_PAYED = 100 //付费用户5000条记录
|
|
|
- SearchMaxPageCount_NOLOGIN = 5000 //未登录用户5000条记录
|
|
|
+ SearchMaxPageNum = 10 //免费用户500条记录
|
|
|
+ SearchMaxPageNum_PAYED = 100 //付费用户5000条记录
|
|
|
|
|
|
)
|
|
|
|
|
|
// MakeCollection 是否收藏
|
|
|
func MakeCollection(userId string, list []*bxcore.SearchList) {
|
|
|
+ if userId == "" {
|
|
|
+ return
|
|
|
+ }
|
|
|
if list == nil || len(list) == 0 {
|
|
|
return
|
|
|
}
|