Fix behavior when the index isn't there.
One of the tests expects an empty list returned, we're currently returning an error.
This commit is contained in:
parent
9e2a39e938
commit
d51f5ca064
1 changed files with 1 additions and 0 deletions
|
@ -260,6 +260,7 @@ func (s *Server) Search(ctx context.Context, in *pb.SearchRequest) (*pb.Outputs,
|
||||||
res, err := client.IndexStats(searchIndices[0]).Do(ctx)
|
res, err := client.IndexStats(searchIndices[0]).Do(ctx)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Printf("Error on ES index stats\n%v\n", err)
|
log.Printf("Error on ES index stats\n%v\n", err)
|
||||||
|
return &pb.Outputs{}, nil
|
||||||
}
|
}
|
||||||
numRefreshes := res.Indices[searchIndices[0]].Primaries.Refresh.Total
|
numRefreshes := res.Indices[searchIndices[0]].Primaries.Refresh.Total
|
||||||
if numRefreshes != s.NumESRefreshes {
|
if numRefreshes != s.NumESRefreshes {
|
||||||
|
|
Loading…
Reference in a new issue