From 9f50ad9cf5f4bc3dfaab132a99c0bbf3a6f7cb1a Mon Sep 17 00:00:00 2001 From: "Dirk-Jan C. Binnema" Date: Thu, 8 Dec 2022 19:31:07 +0200 Subject: [PATCH] mu-query-match-decider: add 'Related' to flags We were _replacing_ the flags (such as Duplicate), but we should add to them instead. Add a unit-test for this. --- lib/mu-query-match-deciders.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/mu-query-match-deciders.cc b/lib/mu-query-match-deciders.cc index b988b970..999d6093 100644 --- a/lib/mu-query-match-deciders.cc +++ b/lib/mu-query-match-deciders.cc @@ -180,7 +180,7 @@ struct MatchDeciderRelated final : public MatchDecider { auto qm{make_query_match(doc)}; if (should_include(qm)) { - qm.flags = QueryMatch::Flags::Related; + qm.flags |= QueryMatch::Flags::Related; decider_info_.matches.emplace(doc.get_docid(), std::move(qm)); return true; } else