diff --git a/routers/search.go b/routers/search.go index 0956ff953..67ea72228 100644 --- a/routers/search.go +++ b/routers/search.go @@ -44,9 +44,9 @@ func Search(ctx *context.Context) { nameQuery := elastic.NewTermQuery("name", Key) descriptionQuery := elastic.NewTermQuery("description", Key) - boolQ.Filter(nameQuery) - boolQ.Filter(descriptionQuery) + boolQ.Should(nameQuery, descriptionQuery) + //boolQ.Filter(descriptionQuery) - res, err := client.Search(TableName + "-es-index").Query(nameQuery).Do(ctx.Req.Context()) + res, err := client.Search(TableName + "-es-index").Query(boolQ).Do(ctx.Req.Context()) ctx.JSON(200, res) }