diff options
author | Harald Musum <musum@verizonmedia.com> | 2021-05-20 11:42:43 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-20 11:42:43 +0200 |
commit | ff423f32a08d29aea73a101b7b0094b35638d697 (patch) | |
tree | d7cfe9762710cb102d28836db4ea257546257226 /searchcore/src/tests/proton/matching/index_environment/index_environment_test.cpp | |
parent | ad936521af553e0278d9ceb3c47b328383f34806 (diff) |
Revert "external ranking expressions"
Diffstat (limited to 'searchcore/src/tests/proton/matching/index_environment/index_environment_test.cpp')
-rw-r--r-- | searchcore/src/tests/proton/matching/index_environment/index_environment_test.cpp | 27 |
1 files changed, 1 insertions, 26 deletions
diff --git a/searchcore/src/tests/proton/matching/index_environment/index_environment_test.cpp b/searchcore/src/tests/proton/matching/index_environment/index_environment_test.cpp index 20b9e1206c7..421ebffafa4 100644 --- a/searchcore/src/tests/proton/matching/index_environment/index_environment_test.cpp +++ b/searchcore/src/tests/proton/matching/index_environment/index_environment_test.cpp @@ -3,7 +3,6 @@ #include <vespa/eval/eval/value_cache/constant_value.h> #include <vespa/searchcore/proton/matching/indexenvironment.h> -#include <vespa/searchcore/proton/matching/ranking_expressions.h> using namespace proton::matching; using search::fef::FieldInfo; @@ -16,21 +15,6 @@ using search::index::schema::DataType; using vespalib::eval::ConstantValue; using SIAF = Schema::ImportedAttributeField; -const vespalib::string my_expr_ref( - "this is my reference ranking expression.\n" - "this is my reference ranking expression.\n" - "it will not compile into a function.\n" - "it will not compile into a function.\n" - "it is just some text, that can also be compressed...\n" - "it is just some text, that can also be compressed...\n"); - -RankingExpressions make_expressions() { - RankingExpressions expr_list; - expr_list.add("expr1", TEST_PATH("my_expr")); - expr_list.add("expr2", TEST_PATH("my_expr.lz4")); - return expr_list; -} - OnnxModels make_models() { OnnxModels::Vector list; list.emplace_back(OnnxModel("model1", "path1").input_feature("input1","feature1").output_name("output1", "out1")); @@ -66,7 +50,7 @@ struct Fixture { Fixture(Schema::UP schema_) : repo(), schema(std::move(schema_)), - env(7, *schema, Properties(), repo, make_expressions(), make_models()) + env(7, *schema, Properties(), repo, make_models()) { } const FieldInfo *assertField(size_t idx, @@ -139,13 +123,4 @@ TEST_F("require that onnx model config can be obtained", Fixture(buildEmptySchem EXPECT_TRUE(f1.env.getOnnxModel("model3") == nullptr); } -TEST_F("require that external ranking expressions can be obtained", Fixture(buildEmptySchema())) { - auto expr1 = f1.env.getRankingExpression("expr1"); - auto expr2 = f1.env.getRankingExpression("expr2"); - auto expr3 = f1.env.getRankingExpression("expr3"); - EXPECT_EQUAL(expr1, my_expr_ref); - EXPECT_EQUAL(expr2, my_expr_ref); - EXPECT_TRUE(expr3.empty()); -} - TEST_MAIN() { TEST_RUN_ALL(); } |