From 2f1a2a9d4b5ee36695cb4bf87704460c1a280abe Mon Sep 17 00:00:00 2001 From: Keegan Carruthers-Smith Date: Fri, 19 Jan 2018 14:45:48 +0200 Subject: [PATCH] rest: Simplify query Change-Id: I50f66cf0886103e1cace55288cd8f469dfdbbfac --- rest/serve.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rest/serve.go b/rest/serve.go index be140b74..050ac786 100644 --- a/rest/serve.go +++ b/rest/serve.go @@ -111,7 +111,7 @@ func serveSearchAPIStructured(searcher zoekt.Searcher, req *SearchRequest) (*Sea query.NewAnd(&query.Repo{Pattern: r.Repo}, query.NewOr(branchQs...))) } - finalQ := query.NewAnd(q, query.NewOr(restrictions...)) + finalQ := query.Simplify(query.NewAnd(q, query.NewOr(restrictions...))) var options zoekt.SearchOptions options.SetDefaults()