diff --git a/routers/search.go b/routers/search.go index 5c1535a9c..6bb8e10f9 100644 --- a/routers/search.go +++ b/routers/search.go @@ -43,7 +43,9 @@ func Search(ctx *context.Context) { boolQ := elastic.NewBoolQuery() nameQuery := elastic.NewMatchQuery("name", Key).Boost(2) descriptionQuery := elastic.NewMatchQuery("description", Key).Boost(1) + owner_idQuery := elastic.NewTermQuery("owner_id", 3) boolQ.Should(nameQuery, descriptionQuery) + boolQ.Must(owner_idQuery) res, err := client.Search(TableName + "-es-index").Query(boolQ).Do(ctx.Req.Context()) if err == nil { ctx.JSON(200, res)