|
@@ -92,10 +92,15 @@ func (l *GetSearchListLogic) GetSearchList(in *bxcore.SearchReq) (*bxcore.Search
|
|
|
}
|
|
|
//无限制
|
|
|
if res.IsLimit == 1 {
|
|
|
+ //分词后 第二页数据请求 先获取全部数据 再切割
|
|
|
+ if in.SplitKeywords != "" && strings.Contains(in.SplitKeywords, "+&&&") && in.PageNum == 2 {
|
|
|
+ in.KeyWords = strings.ReplaceAll(in.KeyWords, "+&&&", "")
|
|
|
+ in.PageNum = 1
|
|
|
+ }
|
|
|
count, list := util.GetBidSearchData(in)
|
|
|
res.KeyWords = in.KeyWords
|
|
|
//二次搜索- 一次搜索结果少于一页数据;关键词长度大于三;第一,二页请求;搜索范围包括title;四个条件
|
|
|
- if len([]rune(in.KeyWords)) > 3 && int(count) < util.SearchPageSize && int(count) > -1 && in.PageNum < 3 && strings.Contains(in.SelectType, "title") {
|
|
|
+ if len([]rune(in.KeyWords)) > 3 && int(count) < util.SearchPageSize && in.PageNum < 3 && strings.Contains(in.SelectType, "title") {
|
|
|
if iksk := util.HttpEs(in.KeyWords, "ik_smart", IC.DB.Es.Addr); iksk != "" {
|
|
|
iksk_temp := in.KeyWords
|
|
|
in.KeyWords = iksk
|
|
@@ -125,7 +130,8 @@ func (l *GetSearchListLogic) GetSearchList(in *bxcore.SearchReq) (*bxcore.Search
|
|
|
karr = append(karr, v)
|
|
|
kbool[v] = true
|
|
|
}
|
|
|
- res.KeyWords = strings.Join(karr, "+")
|
|
|
+ //+&&& 作为二次搜索第二页数据请求的标识(临时处理)
|
|
|
+ res.KeyWords = strings.Join(karr, "+") + "+&&&"
|
|
|
}
|
|
|
}
|
|
|
limitCount := MC.If(in.UserType != "fType", int64(util.SearchPageSize*util.SearchMaxPageNum_PAYED), int64(util.SearchPageSize*util.SearchMaxPageNum)).(int64)
|