diff options
author | Tor Egge <Tor.Egge@online.no> | 2024-02-09 13:12:45 +0100 |
---|---|---|
committer | Tor Egge <Tor.Egge@online.no> | 2024-02-09 13:12:45 +0100 |
commit | 332bdd44a075c16418b49ddfe66965e5a46e2e8c (patch) | |
tree | d1a848f04b0deda0937687a041898faf55f199f8 /searchlib/src/vespa/searchlib/query/streaming/equiv_query_node.h | |
parent | 6e03787d79b327915dff98815db777d879986396 (diff) |
Handle search::streaming::EquivQueryNode as a leaf in the query tree.
Diffstat (limited to 'searchlib/src/vespa/searchlib/query/streaming/equiv_query_node.h')
-rw-r--r-- | searchlib/src/vespa/searchlib/query/streaming/equiv_query_node.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/searchlib/src/vespa/searchlib/query/streaming/equiv_query_node.h b/searchlib/src/vespa/searchlib/query/streaming/equiv_query_node.h new file mode 100644 index 00000000000..b5cdb31274f --- /dev/null +++ b/searchlib/src/vespa/searchlib/query/streaming/equiv_query_node.h @@ -0,0 +1,25 @@ +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. + +#pragma once + +#include "multi_term.h" + +namespace search::streaming { + +/** + N-ary "EQUIV" operator that merges terms from nodes below. +*/ +class EquivQueryNode : public MultiTerm +{ +public: + EquivQueryNode(std::unique_ptr<QueryNodeResultBase> result_base, uint32_t num_terms); + ~EquivQueryNode() override; + bool evaluate() const override; + const HitList & evaluateHits(HitList & hl) const override; + void unpack_match_data(uint32_t docid, const fef::ITermData& td, fef::MatchData& match_data) override; + EquivQueryNode* as_equiv_query_node() noexcept override; + const EquivQueryNode* as_equiv_query_node() const noexcept override; + std::vector<std::unique_ptr<QueryTerm>> steal_terms(); +}; + +} |