|
|
@@ -91,7 +91,7 @@ func MySelfList(c *gin.Context, req friend_circles.MySelfListReq) (resp friend_c |
|
|
|
searchResult, err := es.EsClient.Search(). |
|
|
|
Index(md.EggFriendCircleEsIndex). // 替换为你的索引名称 |
|
|
|
Query(query). |
|
|
|
Sort("create_at", false). // 按时间倒排 |
|
|
|
Sort("created_at", false). // 按时间倒排 |
|
|
|
From(from). |
|
|
|
Size(req.PageSize). |
|
|
|
Pretty(true). |
|
|
@@ -121,7 +121,7 @@ func MySelfList(c *gin.Context, req friend_circles.MySelfListReq) (resp friend_c |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
func GetRecommendList(c *gin.Context, req friend_circles.RecommendListReq) (resp friend_circles.RecommendListResp, err error) { |
|
|
|
func GetRecommendList(req friend_circles.RecommendListReq) (resp friend_circles.RecommendListResp, err error) { |
|
|
|
// 分页参数 |
|
|
|
from := (req.Page - 1) * req.PageSize |
|
|
|
|
|
|
@@ -132,7 +132,7 @@ func GetRecommendList(c *gin.Context, req friend_circles.RecommendListReq) (resp |
|
|
|
searchResult, err := es.EsClient.Search(). |
|
|
|
Index(md.EggFriendCircleEsAlias). // 替换为你的索引名称 |
|
|
|
Query(query). |
|
|
|
//Sort("create_at", false). // 按时间倒排 |
|
|
|
Sort("created_at", false). // 按时间倒排 |
|
|
|
From(from). |
|
|
|
Size(req.PageSize). |
|
|
|
Pretty(true). |
|
|
|