aboutsummaryrefslogtreecommitdiffstats
path: root/config-model/src/test/derived/rankingexpression/rankexpression.sd
diff options
context:
space:
mode:
authorbjormel <bjormel@yahooinc.com>2023-10-26 13:59:28 +0000
committerbjormel <bjormel@yahooinc.com>2023-10-26 13:59:28 +0000
commit567be9a1f6353cec41c23bfd1fcd46b4b2a4d2d7 (patch)
tree4664a743e166a5e11aee7b9acd70ad8ee2617612 /config-model/src/test/derived/rankingexpression/rankexpression.sd
parente9058b555d4dfea2f6c872d9a677e8678b569569 (diff)
parentbce3b8e926bf9da880172acbe1ba4b12d5e026d6 (diff)
Merge branch 'master' into bjormel/aws-main-controllerbjormel/aws-main-controller
Diffstat (limited to 'config-model/src/test/derived/rankingexpression/rankexpression.sd')
-rw-r--r--config-model/src/test/derived/rankingexpression/rankexpression.sd30
1 files changed, 29 insertions, 1 deletions
diff --git a/config-model/src/test/derived/rankingexpression/rankexpression.sd b/config-model/src/test/derived/rankingexpression/rankexpression.sd
index b0de2c60299..15537f1f9d0 100644
--- a/config-model/src/test/derived/rankingexpression/rankexpression.sd
+++ b/config-model/src/test/derived/rankingexpression/rankexpression.sd
@@ -1,4 +1,4 @@
-# Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+# Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
schema rankexpression {
document rankexpression {
@@ -441,4 +441,32 @@ schema rankexpression {
}
}
+ rank-profile withnorm {
+ first-phase {
+ expression: attribute(foo1)
+ }
+ function normBar() {
+ expression: attribute(foo1) + attribute(year)
+ }
+ global-phase {
+ expression: normalize_linear(nativeRank) + reciprocal_rank(normBar(), 42.0)
+ rerank-count: 123
+ }
+ match-features: nativeRank
+ }
+
+ rank-profile withfusion {
+ first-phase {
+ expression: attribute(foo1)
+ }
+ function normBar() {
+ expression: attribute(foo1) + attribute(year)
+ }
+ global-phase {
+ expression: reciprocal_rank_fusion(normBar, nativeRank)
+ rerank-count: 456
+ }
+ match-features: nativeRank
+ }
+
}