diff options
Diffstat (limited to 'searchcore/src/tests/proton/matching')
5 files changed, 2 insertions, 34 deletions
diff --git a/searchcore/src/tests/proton/matching/index_environment/.gitattributes b/searchcore/src/tests/proton/matching/index_environment/.gitattributes deleted file mode 100644 index c7aff0d0972..00000000000 --- a/searchcore/src/tests/proton/matching/index_environment/.gitattributes +++ /dev/null @@ -1 +0,0 @@ -/my_expr.lz4 binary 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(); } diff --git a/searchcore/src/tests/proton/matching/index_environment/my_expr b/searchcore/src/tests/proton/matching/index_environment/my_expr deleted file mode 100644 index 2fdd1e4c9ff..00000000000 --- a/searchcore/src/tests/proton/matching/index_environment/my_expr +++ /dev/null @@ -1,6 +0,0 @@ -this is my reference ranking expression. -this is my reference ranking expression. -it will not compile into a function. -it will not compile into a function. -it is just some text, that can also be compressed... -it is just some text, that can also be compressed... diff --git a/searchcore/src/tests/proton/matching/index_environment/my_expr.lz4 b/searchcore/src/tests/proton/matching/index_environment/my_expr.lz4 Binary files differdeleted file mode 100644 index c88594ce81d..00000000000 --- a/searchcore/src/tests/proton/matching/index_environment/my_expr.lz4 +++ /dev/null diff --git a/searchcore/src/tests/proton/matching/matching_test.cpp b/searchcore/src/tests/proton/matching/matching_test.cpp index 2bee53a5215..8057dbf2da6 100644 --- a/searchcore/src/tests/proton/matching/matching_test.cpp +++ b/searchcore/src/tests/proton/matching/matching_test.cpp @@ -280,7 +280,7 @@ struct MyWorld { } Matcher::SP createMatcher() { - return std::make_shared<Matcher>(schema, config, clock, queryLimiter, constantValueRepo, RankingExpressions(), OnnxModels(), 0); + return std::make_shared<Matcher>(schema, config, clock, queryLimiter, constantValueRepo, OnnxModels(), 0); } struct MySearchHandler : ISearchHandler { |