aboutsummaryrefslogtreecommitdiffstats
path: root/streamingvisitors/src/tests/searchvisitor/cfg
diff options
context:
space:
mode:
authorGeir Storli <geirst@yahooinc.com>2023-04-28 09:31:47 +0000
committerGeir Storli <geirst@yahooinc.com>2023-04-28 09:31:47 +0000
commit07f6d5be822832bb5c4bd31e0bdf23d0a8b5ac99 (patch)
treeb31f85524b26fce23d539ba1d1ff27a3e6bd011c /streamingvisitors/src/tests/searchvisitor/cfg
parent9c04252f9c8573bdbb787b5e3a0f671487eb412e (diff)
Test match features returned in streaming search result.
Diffstat (limited to 'streamingvisitors/src/tests/searchvisitor/cfg')
-rwxr-xr-xstreamingvisitors/src/tests/searchvisitor/cfg/generate.sh3
-rw-r--r--streamingvisitors/src/tests/searchvisitor/cfg/rank-profiles.mycl.cfg24
-rw-r--r--streamingvisitors/src/tests/searchvisitor/cfg/summary.mycl.cfg16
-rw-r--r--streamingvisitors/src/tests/searchvisitor/cfg/test.sd11
4 files changed, 31 insertions, 23 deletions
diff --git a/streamingvisitors/src/tests/searchvisitor/cfg/generate.sh b/streamingvisitors/src/tests/searchvisitor/cfg/generate.sh
index 1eade461060..8a107453373 100755
--- a/streamingvisitors/src/tests/searchvisitor/cfg/generate.sh
+++ b/streamingvisitors/src/tests/searchvisitor/cfg/generate.sh
@@ -23,3 +23,6 @@ mv rank-profiles.cfg rank-profiles.mycl.cfg
mv summary.cfg summary.mycl.cfg
mv vsmfields.cfg vsmfields.mycl.cfg
mv vsmsummary.cfg vsmsummary.mycl.cfg
+
+# Add newline at eof
+for file in *.cfg; do echo >> $file; done
diff --git a/streamingvisitors/src/tests/searchvisitor/cfg/rank-profiles.mycl.cfg b/streamingvisitors/src/tests/searchvisitor/cfg/rank-profiles.mycl.cfg
index d3132a8ff25..be0f97b5276 100644
--- a/streamingvisitors/src/tests/searchvisitor/cfg/rank-profiles.mycl.cfg
+++ b/streamingvisitors/src/tests/searchvisitor/cfg/rank-profiles.mycl.cfg
@@ -1,4 +1,8 @@
rankprofile[0].name "default"
+rankprofile[0].fef.property[0].name "vespa.rank.firstphase"
+rankprofile[0].fef.property[0].value "rankingExpression(firstphase)"
+rankprofile[0].fef.property[1].name "rankingExpression(firstphase).rankingScript"
+rankprofile[0].fef.property[1].value "attribute(id) + 10"
rankprofile[1].name "unranked"
rankprofile[1].fef.property[0].name "vespa.rank.firstphase"
rankprofile[1].fef.property[0].value "value(0)"
@@ -8,8 +12,18 @@ rankprofile[1].fef.property[2].name "vespa.hitcollector.arraysize"
rankprofile[1].fef.property[2].value "0"
rankprofile[1].fef.property[3].name "vespa.dump.ignoredefaultfeatures"
rankprofile[1].fef.property[3].value "true"
-rankprofile[2].name "myrank"
-rankprofile[2].fef.property[0].name "vespa.rank.firstphase"
-rankprofile[2].fef.property[0].value "rankingExpression(firstphase)"
-rankprofile[2].fef.property[1].name "rankingExpression(firstphase).rankingScript"
-rankprofile[2].fef.property[1].value "attribute(id) + 10"
+rankprofile[2].name "match_features"
+rankprofile[2].fef.property[0].name "rankingExpression(myfunc).rankingScript"
+rankprofile[2].fef.property[0].value "attribute(id) + 20"
+rankprofile[2].fef.property[1].name "vespa.rank.firstphase"
+rankprofile[2].fef.property[1].value "rankingExpression(firstphase)"
+rankprofile[2].fef.property[2].name "rankingExpression(firstphase).rankingScript"
+rankprofile[2].fef.property[2].value "attribute(id) + 10"
+rankprofile[2].fef.property[3].name "vespa.match.feature"
+rankprofile[2].fef.property[3].value "attribute(id)"
+rankprofile[2].fef.property[4].name "vespa.match.feature"
+rankprofile[2].fef.property[4].value "rankingExpression(myfunc)"
+rankprofile[2].fef.property[5].name "vespa.feature.rename"
+rankprofile[2].fef.property[5].value "rankingExpression(myfunc)"
+rankprofile[2].fef.property[6].name "vespa.feature.rename"
+rankprofile[2].fef.property[6].value "myfunc"
diff --git a/streamingvisitors/src/tests/searchvisitor/cfg/summary.mycl.cfg b/streamingvisitors/src/tests/searchvisitor/cfg/summary.mycl.cfg
index 5983609ac9d..c67bcafddaa 100644
--- a/streamingvisitors/src/tests/searchvisitor/cfg/summary.mycl.cfg
+++ b/streamingvisitors/src/tests/searchvisitor/cfg/summary.mycl.cfg
@@ -15,8 +15,8 @@ classes[0].fields[2].source ""
classes[0].fields[3].name "documentid"
classes[0].fields[3].command "documentid"
classes[0].fields[3].source ""
-classes[1].id 1473683981
-classes[1].name "mysum"
+classes[1].id 1783786855
+classes[1].name "attributeprefetch"
classes[1].omitsummaryfeatures false
classes[1].fields[0].name "id"
classes[1].fields[0].command "attribute"
@@ -27,15 +27,3 @@ classes[1].fields[1].source ""
classes[1].fields[2].name "summaryfeatures"
classes[1].fields[2].command "summaryfeatures"
classes[1].fields[2].source ""
-classes[2].id 1783786855
-classes[2].name "attributeprefetch"
-classes[2].omitsummaryfeatures false
-classes[2].fields[0].name "id"
-classes[2].fields[0].command "attribute"
-classes[2].fields[0].source "id"
-classes[2].fields[1].name "rankfeatures"
-classes[2].fields[1].command "rankfeatures"
-classes[2].fields[1].source ""
-classes[2].fields[2].name "summaryfeatures"
-classes[2].fields[2].command "summaryfeatures"
-classes[2].fields[2].source ""
diff --git a/streamingvisitors/src/tests/searchvisitor/cfg/test.sd b/streamingvisitors/src/tests/searchvisitor/cfg/test.sd
index ad998aa91f6..ba2be3f1d93 100644
--- a/streamingvisitors/src/tests/searchvisitor/cfg/test.sd
+++ b/streamingvisitors/src/tests/searchvisitor/cfg/test.sd
@@ -4,13 +4,16 @@ schema test {
indexing: attribute | summary
}
}
- document-summary mysum {
- summary id type int {}
- }
- rank-profile myrank {
+ rank-profile default {
first-phase {
expression: attribute(id) + 10
}
}
+ rank-profile match_features inherits default {
+ function myfunc() {
+ expression: attribute(id) + 20
+ }
+ match-features: attribute(id) myfunc()
+ }
}