blob: ef13a59abc8220645690e84065411b9e88f392bb (
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
|
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once
#include <memory>
namespace search::query {
struct QueryVisitor;
/**
This is the base of any node in the query tree. Both leaf nodes (terms)
and operator nodes (AND, NOT, OR, PHRASE, NEAR, ONEAR, etc).
*/
class Node {
public:
using UP = std::unique_ptr<Node>;
virtual ~Node() = default;
virtual void accept(QueryVisitor &visitor) = 0;
virtual bool isIntermediate() const { return false; }
virtual bool isLocationTerm() const { return false; }
};
}
|