From d51f5ca0649f7e56f5f5a41c24467bc1d0976558 Mon Sep 17 00:00:00 2001 From: Jeffrey Picard Date: Wed, 5 Jan 2022 10:07:15 -0500 Subject: [PATCH] Fix behavior when the index isn't there. One of the tests expects an empty list returned, we're currently returning an error. --- server/search.go | 1 + 1 file changed, 1 insertion(+) diff --git a/server/search.go b/server/search.go index 0f00b1c..9be86e9 100644 --- a/server/search.go +++ b/server/search.go @@ -260,6 +260,7 @@ func (s *Server) Search(ctx context.Context, in *pb.SearchRequest) (*pb.Outputs, res, err := client.IndexStats(searchIndices[0]).Do(ctx) if err != nil { log.Printf("Error on ES index stats\n%v\n", err) + return &pb.Outputs{}, nil } numRefreshes := res.Indices[searchIndices[0]].Primaries.Refresh.Total if numRefreshes != s.NumESRefreshes { -- 2.45.2