summaryrefslogtreecommitdiffstats
path: root/searchlib/src/tests/features
diff options
context:
space:
mode:
authorGeir Storli <geirst@yahooinc.com>2022-06-08 12:08:42 +0000
committerGeir Storli <geirst@yahooinc.com>2022-06-08 14:24:49 +0000
commitfcb0aba51001a67d89559aca5cca25b5e93d830e (patch)
tree403f1897755b88646f172d058dcfd558d7ea98e7 /searchlib/src/tests/features
parentbf4a9188b012a0db5b7be89758406f87fa41712c (diff)
Add bm25() and matches() and remove now() as default rank features to be dumped on Vespa 8.
Diffstat (limited to 'searchlib/src/tests/features')
-rw-r--r--searchlib/src/tests/features/bm25/bm25_test.cpp6
-rw-r--r--searchlib/src/tests/features/prod_features.cpp4
2 files changed, 8 insertions, 2 deletions
diff --git a/searchlib/src/tests/features/bm25/bm25_test.cpp b/searchlib/src/tests/features/bm25/bm25_test.cpp
index d3c812198e1..3a9dfffa8d7 100644
--- a/searchlib/src/tests/features/bm25/bm25_test.cpp
+++ b/searchlib/src/tests/features/bm25/bm25_test.cpp
@@ -94,6 +94,12 @@ TEST_F(Bm25BlueprintTest, blueprint_can_prepare_shared_state_with_average_field_
EXPECT_DOUBLE_EQ(10, as_value<double>(*store.get("bm25.afl.is")));
}
+TEST_F(Bm25BlueprintTest, dump_features_for_all_index_fields)
+{
+ FtTestApp::FT_DUMP(factory, "bm25", index_env,
+ StringList().add("bm25(is)").add("bm25(ia)").add("bm25(iws)"));
+}
+
struct Scorer {
double avg_field_length;
diff --git a/searchlib/src/tests/features/prod_features.cpp b/searchlib/src/tests/features/prod_features.cpp
index 2c04a326e3e..b213fd380d5 100644
--- a/searchlib/src/tests/features/prod_features.cpp
+++ b/searchlib/src/tests/features/prod_features.cpp
@@ -1473,7 +1473,7 @@ Test::testNow()
FT_SETUP_OK (pt, params, in, out.add("out"));
FT_SETUP_FAIL(pt, params.add("foo"));
- FT_DUMP(_factory, "now", StringList().add("now"));
+ FT_DUMP_EMPTY(_factory, "now");
}
{
@@ -1703,7 +1703,7 @@ Test::testMatches()
FT_SETUP_OK(pt, ft.getIndexEnv(), params.clear().add("bar"), in, out);
FT_SETUP_OK(pt, ft.getIndexEnv(), params.add("1"), in, out);
- FT_DUMP_EMPTY(_factory, "matches");
+ FT_DUMP(_factory, "matches", ft.getIndexEnv(), StringList().add("matches(foo)").add("matches(bar)"));
}
{ // Test executor for index fields
EXPECT_TRUE(assertMatches(0, "x", "a", "matches(foo)"));