aboutsummaryrefslogtreecommitdiffstats
path: root/searchlib/src/vespa/searchlib/query/streaming/same_element_query_node.h
blob: 8e675feb569d6c13c85fbb4982dcc02650698eb3 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.

#pragma once

#include "query.h"

namespace search::streaming {

/**
   N-ary Same element operator. All terms must be within the same element.
*/
class SameElementQueryNode : public AndQueryNode
{
public:
    SameElementQueryNode() noexcept : AndQueryNode("SAME_ELEMENT") { }
    bool evaluate() const override;
    const HitList & evaluateHits(HitList & hl) const override;
    bool isFlattenable(ParseItem::ItemType) const override { return false; }
    void addChild(QueryNode::UP child) override;
};

}