From 20ff1b39bd4ba57c80bbe0cef332d285461fe2c0 Mon Sep 17 00:00:00 2001 From: zouap Date: Fri, 24 Dec 2021 10:50:19 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zouap --- routers/search.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/routers/search.go b/routers/search.go index 60d7be80e..5e1e0a76f 100644 --- a/routers/search.go +++ b/routers/search.go @@ -2,7 +2,7 @@ package routers import ( "code.gitea.io/gitea/modules/context" - "github.com/olivere/elastic" + "github.com/olivere/elastic/v7" ) type Table struct { @@ -39,6 +39,6 @@ func Search(ctx *context.Context) { panic(err) } - res, err := client.Search(TableName + "-es-index").Do(ctx) + res, err := client.Search(TableName + "-es-index").Do(ctx.Req.Context()) ctx.JSON(200, res) }