summaryrefslogtreecommitdiffstats
path: root/searchlib/src/tests/fef/rank_program/rank_program_test.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'searchlib/src/tests/fef/rank_program/rank_program_test.cpp')
-rw-r--r--searchlib/src/tests/fef/rank_program/rank_program_test.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/searchlib/src/tests/fef/rank_program/rank_program_test.cpp b/searchlib/src/tests/fef/rank_program/rank_program_test.cpp
index 8e23731e961..7e28178e5f7 100644
--- a/searchlib/src/tests/fef/rank_program/rank_program_test.cpp
+++ b/searchlib/src/tests/fef/rank_program/rank_program_test.cpp
@@ -6,6 +6,7 @@
#include <vespa/searchlib/features/rankingexpressionfeature.h>
#include <vespa/searchlib/fef/blueprintfactory.h>
#include <vespa/searchlib/fef/indexproperties.h>
+#include <vespa/searchlib/fef/matchdatalayout.h>
#include <vespa/searchlib/fef/test/indexenvironment.h>
#include <vespa/searchlib/fef/test/queryenvironment.h>
#include <vespa/searchlib/fef/test/plugin/sum.h>
@@ -69,10 +70,11 @@ struct Fixture {
IndexEnvironment indexEnv;
BlueprintResolver::SP resolver;
Properties overrides;
+ MatchData::UP match_data;
RankProgram program;
size_t track_cnt;
Fixture() : factory(), indexEnv(), resolver(new BlueprintResolver(factory, indexEnv)),
- overrides(), program(resolver), track_cnt(0)
+ overrides(), match_data(), program(resolver), track_cnt(0)
{
factory.addPrototype(Blueprint::SP(new BoxingBlueprint()));
factory.addPrototype(Blueprint::SP(new DocidBlueprint()));
@@ -107,7 +109,8 @@ struct Fixture {
ASSERT_TRUE(resolver->compile());
MatchDataLayout mdl;
QueryEnvironment queryEnv(&indexEnv);
- program.setup(mdl, queryEnv, overrides);
+ match_data = mdl.createMatchData();
+ program.setup(*match_data, queryEnv, overrides);
return *this;
}
double get(uint32_t docid = default_docid) {