aboutsummaryrefslogtreecommitdiffstats
path: root/searchlib/src/vespa/searchlib/query/streaming/querynoderesultbase.h
blob: 62fc32a457528a2dbe47031a0ec2a925d395a11b (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
26
27
// 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::streaming {

/**
  This is the base of any item that can be attached to the leafs in a querytree.
  The intention is to put stuff here that are search specific. Fx to differentiate
  between streamed and indexed variants.
*/
class QueryNodeResultBase
{
public:
    virtual ~QueryNodeResultBase() = default;
    virtual QueryNodeResultBase * clone() const = 0;
};

class QueryNodeResultFactory {
public:
    virtual ~QueryNodeResultFactory() = default;
    virtual bool getRewriteFloatTerms() const { return false; }
    virtual std::unique_ptr<QueryNodeResultBase> create() const { return std::unique_ptr<QueryNodeResultBase>(); }
};
}