blob: 8da88c9bd5927032cc10e495d30d1efcaae07482 (
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
36
37
38
39
40
|
// Copyright Yahoo. 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/searchlib/fef/featureexecutor.h>
namespace search {
namespace fef {
namespace test {
class StaticRankExecutor : public FeatureExecutor
{
private:
const search::attribute::IAttributeVector * _attribute;
public:
StaticRankExecutor(const search::attribute::IAttributeVector * attribute);
void execute(uint32_t docId) override;
};
class StaticRankBlueprint : public Blueprint
{
private:
std::string _attributeName;
public:
StaticRankBlueprint();
~StaticRankBlueprint();
void visitDumpFeatures(const IIndexEnvironment &, IDumpFeatureVisitor &) const override {}
Blueprint::UP createInstance() const override { return Blueprint::UP(new StaticRankBlueprint()); }
bool setup(const IIndexEnvironment & indexEnv, const StringVector & params) override;
FeatureExecutor &createExecutor(const IQueryEnvironment &queryEnv, vespalib::Stash &stash) const override;
};
} // namespace test
} // namespace fef
} // namespace search
|