mirror of
https://github.com/eiblog/eiblog.git
synced 2026-02-13 18:02:26 +08:00
fixed #6,发布文章异步提交,随机 session key等
This commit is contained in:
8
front.go
8
front.go
@@ -199,10 +199,12 @@ func HandleSearchPage(c *gin.Context) {
|
||||
start = 1
|
||||
}
|
||||
h["Word"] = q
|
||||
var result *ESSearchResult
|
||||
|
||||
vals := c.Request.URL.Query()
|
||||
result = Elasticsearch(q, setting.Conf.General.PageNum, start-1)
|
||||
if result != nil {
|
||||
result, err := Elasticsearch(q, setting.Conf.General.PageNum, start-1)
|
||||
if err != nil {
|
||||
logd.Error(err)
|
||||
} else {
|
||||
result.Took /= 1000
|
||||
for i, v := range result.Hits.Hits {
|
||||
if artc := Ei.MapArticles[result.Hits.Hits[i].Source.Slug]; len(v.Highlight.Content) == 0 && artc != nil {
|
||||
|
||||
Reference in New Issue
Block a user