aboutsummaryrefslogtreecommitdiffstats
path: root/searchlib/src/vespa/searchlib/query/streaming/equiv_query_node.h
blob: a048595467505859f29d3791132dbf99c0462846 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
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, const fef::IIndexEnvironment& index_env) 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();
};

}