diff --git a/internals/export/elasticsearch.go b/internals/export/elasticsearch.go index 1d8ae8f..3b607ce 100644 --- a/internals/export/elasticsearch.go +++ b/internals/export/elasticsearch.go @@ -116,7 +116,9 @@ func (export StreamedExport) ProcessStreamedExport(ctx context.Context, params E } // handle pit creation - pit, err := cli.OpenPointInTime(params.Indices).KeepAlive("5m").Do(context.Background()) + pit, err := cli.OpenPointInTime(params.Indices). + IgnoreUnavailable(params.IgnoreUnavailable). + KeepAlive("5m").Do(context.Background()) if err != nil { zap.L().Error("OpenPointInTime failed", zap.Error(err)) return err @@ -159,7 +161,6 @@ func (export StreamedExport) ProcessStreamedExport(ctx context.Context, params E response, err := cli.Search(). Request(params.SearchRequest). Size(size). - IgnoreUnavailable(params.IgnoreUnavailable). AllowNoIndices(params.AllowNoIndices). Do(context.Background()) if err != nil {