aboutsummaryrefslogtreecommitdiffstats
path: root/config-model/src/test/derived/rankingexpression/rankexpression.sd
diff options
context:
space:
mode:
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
+ }
+
}