diff --git a/routers/search.go b/routers/search.go index 4082ccf2f..5f84e106b 100644 --- a/routers/search.go +++ b/routers/search.go @@ -47,12 +47,16 @@ func Search(ctx *context.Context) { res, err := client.Search(TableName+"-es-index").Query(boolQ).Sort("updated_unix", false).Do(ctx.Req.Context()) if err == nil { ctx.JSON(200, res) + } else { + log.Info("query es error," + err.Error()) } } else { log.Info("query all content.") res, err := client.Search(TableName + "-es-index").Do(ctx.Req.Context()) if err == nil { ctx.JSON(200, res) + } else { + log.Info("query es error," + err.Error()) } } }