diff options
author | Håvard Pettersen <havardpe@oath.com> | 2021-05-12 10:12:27 +0000 |
---|---|---|
committer | Håvard Pettersen <havardpe@oath.com> | 2021-05-20 10:19:26 +0000 |
commit | a6babd7ec4b48975fc5d6f2994b91bf3bfd2052c (patch) | |
tree | fc7f9baeaa4bc246d748e43fc51c3d5e6d108869 /searchcore/src/tests/proton/documentdb/documentdbconfig | |
parent | eeb4067cc6ab6bbd0cc03b4a9ef9eaad27677cb1 (diff) |
external ranking expressions
loaded from potentially compressed files
Diffstat (limited to 'searchcore/src/tests/proton/documentdb/documentdbconfig')
-rw-r--r-- | searchcore/src/tests/proton/documentdb/documentdbconfig/documentdbconfig_test.cpp | 9 |
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). |