aboutsummaryrefslogtreecommitdiffstats
path: root/searchlib/src/vespa/searchlib/query/streaming/querynoderesultbase.h
blob: 4097250f67ef4f76be1f8413adcf67ff6c3cf18c (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
28
29
30
31
32
33
34
35
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once

#include <vespa/searchlib/query/query_normalization.h>
#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 allow_float_terms_rewrite(vespalib::stringref index) const noexcept {
        (void) index;
        return false;
    }
    virtual Normalizing normalizing_mode(vespalib::stringref index) const noexcept {
        (void) index;
        return Normalizing::NONE;
    }
    virtual std::unique_ptr<QueryNodeResultBase> create() const { return {}; }
};
}