From 5a430b9c880966f9ed241c1ef9f417cddad884a4 Mon Sep 17 00:00:00 2001 From: Wessie Date: Sat, 21 Dec 2024 01:26:40 +0100 Subject: [PATCH] search/bleve: actually log the type of the correct variable --- search/bleve/main.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/search/bleve/main.go b/search/bleve/main.go index 3ff8971..44a5308 100644 --- a/search/bleve/main.go +++ b/search/bleve/main.go @@ -325,7 +325,7 @@ func NewQuery(ctx context.Context, s string) (query.Query, error) { dq, ok := bq.Should.(*query.DisjunctionQuery) if !ok { - zerolog.Ctx(ctx).Warn().Str("type", fmt.Sprintf("%T", q)).Msg("query was not a DisjunctionQuery") + zerolog.Ctx(ctx).Warn().Str("type", fmt.Sprintf("%T", bq.Should)).Msg("query was not a DisjunctionQuery") return q, nil } @@ -337,7 +337,7 @@ func NewQuery(ctx context.Context, s string) (query.Query, error) { // move the should (OR) into the must (AND) query set qq.AddMust(dq.Disjuncts...) default: - zerolog.Ctx(ctx).Warn().Str("type", fmt.Sprintf("%T", q)).Msg("query is unknown type") + zerolog.Ctx(ctx).Warn().Str("type", fmt.Sprintf("%T", bq.Must)).Msg("query is unknown type") return q, nil }