summaryrefslogtreecommitdiffstats
path: root/searchcore/src/tests/proton/documentdb/documentdbconfig/documentdbconfig_test.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'searchcore/src/tests/proton/documentdb/documentdbconfig/documentdbconfig_test.cpp')
-rw-r--r--searchcore/src/tests/proton/documentdb/documentdbconfig/documentdbconfig_test.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/searchcore/src/tests/proton/documentdb/documentdbconfig/documentdbconfig_test.cpp b/searchcore/src/tests/proton/documentdb/documentdbconfig/documentdbconfig_test.cpp
index aed01ca0192..544ff853384 100644
--- a/searchcore/src/tests/proton/documentdb/documentdbconfig/documentdbconfig_test.cpp
+++ b/searchcore/src/tests/proton/documentdb/documentdbconfig/documentdbconfig_test.cpp
@@ -17,6 +17,7 @@ using namespace search::index;
using namespace search;
using namespace vespa::config::search;
using proton::matching::RankingConstants;
+using proton::matching::RankingExpressions;
using proton::matching::OnnxModels;
using std::make_shared;
using std::shared_ptr;
@@ -69,6 +70,11 @@ public:
_builder.rankingConstants(make_shared<RankingConstants>(constants));
return *this;
}
+ MyConfigBuilder &addRankingExpression() {
+ auto expr_list = RankingExpressions().add("my_expr", "my_file");
+ _builder.rankingExpressions(make_shared<RankingExpressions>(expr_list));
+ return *this;
+ }
MyConfigBuilder &addOnnxModel() {
OnnxModels::Vector models = {{"my_model_name", "my_model_file"}};
_builder.onnxModels(make_shared<OnnxModels>(models));
@@ -138,6 +144,7 @@ struct Fixture {
fullCfg = MyConfigBuilder(4, schema, repo).addAttribute().
addRankProfile().
addRankingConstant().
+ addRankingExpression().
addOnnxModel().
addImportedField().
addSummary(true).
@@ -173,6 +180,7 @@ struct DelayAttributeAspectFixture {
attrCfg = MyConfigBuilder(4, schema, makeDocTypeRepo(true)).addAttribute().
addRankProfile().
addRankingConstant().
+ addRankingExpression().
addOnnxModel().
addImportedField().
addSummary(true).
@@ -180,6 +188,7 @@ struct DelayAttributeAspectFixture {
build();
noAttrCfg = MyConfigBuilder(4, schema, makeDocTypeRepo(hasDocField)).addRankProfile().
addRankingConstant().
+ addRankingExpression().
addOnnxModel().
addImportedField().
addSummary(hasDocField).