aboutsummaryrefslogtreecommitdiffstats
path: root/searchlib/src/vespa/searchlib/features/tensor_factory_blueprint.h
blob: 71f3699db9ce36089b05eb7ca841efb2b94e3c6a (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
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.

#pragma once

#include <vespa/searchlib/fef/blueprint.h>
#include <vespa/vespalib/stllike/string.h>
#include <vespa/eval/eval/value_type.h>

namespace search::features {

/**
 * Factory class for tensor rank features.
 */
class TensorFactoryBlueprint : public fef::Blueprint
{
protected:
    static vespalib::string ATTRIBUTE_SOURCE;
    static vespalib::string QUERY_SOURCE;

    vespalib::string _sourceType;
    vespalib::string _sourceParam;
    vespalib::string _dimension;
    vespalib::eval::ValueType _valueType;

    bool extractSource(const vespalib::string &source);
    TensorFactoryBlueprint(const vespalib::string &baseName);
    ~TensorFactoryBlueprint();

public:
    void visitDumpFeatures(const fef::IIndexEnvironment &,
                           fef::IDumpFeatureVisitor &) const override {}
};

}