aboutsummaryrefslogtreecommitdiffstats
path: root/config-model/src/test/derived
diff options
context:
space:
mode:
authorArne Juul <root@screwdriver.com>2023-10-12 11:46:18 +0000
committerArne Juul <root@screwdriver.com>2023-10-13 10:26:39 +0000
commit5467c074d4922bdd3ed330a9079b4e3291f82861 (patch)
tree4ebd7db84e6327890f9566083bab8e2a49a64729 /config-model/src/test/derived
parente7d54515ca2a5eceea0bf17c5b96b969aea8c53a (diff)
allow configuring normalizers
Diffstat (limited to 'config-model/src/test/derived')
-rw-r--r--config-model/src/test/derived/rankingexpression/rank-profiles.cfg62
-rw-r--r--config-model/src/test/derived/rankingexpression/rankexpression.sd28
2 files changed, 90 insertions, 0 deletions
diff --git a/config-model/src/test/derived/rankingexpression/rank-profiles.cfg b/config-model/src/test/derived/rankingexpression/rank-profiles.cfg
index b0f7d0f2477..b3257c962dd 100644
--- a/config-model/src/test/derived/rankingexpression/rank-profiles.cfg
+++ b/config-model/src/test/derived/rankingexpression/rank-profiles.cfg
@@ -520,3 +520,65 @@ rankprofile[].fef.property[].name "vespa.type.attribute.t1"
rankprofile[].fef.property[].value "tensor(m{},v[3])"
rankprofile[].fef.property[].name "vespa.type.query.v"
rankprofile[].fef.property[].value "tensor(v[3])"
+rankprofile[].name "withnorm"
+rankprofile[].fef.property[].name "rankingExpression(normBar).rankingScript"
+rankprofile[].fef.property[].value "attribute(foo1) + attribute(year)"
+rankprofile[].fef.property[].name "vespa.rank.firstphase"
+rankprofile[].fef.property[].value "attribute(foo1)"
+rankprofile[].fef.property[].name "vespa.rank.globalphase"
+rankprofile[].fef.property[].value "rankingExpression(globalphase)"
+rankprofile[].fef.property[].name "rankingExpression(globalphase).rankingScript"
+rankprofile[].fef.property[].value "normalize@3551296680@linear + normalize@2879443254@rrank"
+rankprofile[].fef.property[].name "vespa.match.feature"
+rankprofile[].fef.property[].value "nativeRank"
+rankprofile[].fef.property[].name "vespa.match.feature"
+rankprofile[].fef.property[].value "attribute(year)"
+rankprofile[].fef.property[].name "vespa.match.feature"
+rankprofile[].fef.property[].value "attribute(foo1)"
+rankprofile[].fef.property[].name "vespa.hidden.matchfeature"
+rankprofile[].fef.property[].value "attribute(year)"
+rankprofile[].fef.property[].name "vespa.hidden.matchfeature"
+rankprofile[].fef.property[].value "attribute(foo1)"
+rankprofile[].fef.property[].name "vespa.globalphase.rerankcount"
+rankprofile[].fef.property[].value "123"
+rankprofile[].fef.property[].name "vespa.type.attribute.t1"
+rankprofile[].fef.property[].value "tensor(m{},v[3])"
+rankprofile[].normalizer[].name "normalize@3551296680@linear"
+rankprofile[].normalizer[].input "nativeRank"
+rankprofile[].normalizer[].algo LINEAR
+rankprofile[].normalizer[].kparam 0.0
+rankprofile[].normalizer[].name "normalize@2879443254@rrank"
+rankprofile[].normalizer[].input "normBar"
+rankprofile[].normalizer[].algo RRANK
+rankprofile[].normalizer[].kparam 42.0
+rankprofile[].name "withfusion"
+rankprofile[].fef.property[].name "rankingExpression(normBar).rankingScript"
+rankprofile[].fef.property[].value "attribute(foo1) + attribute(year)"
+rankprofile[].fef.property[].name "vespa.rank.firstphase"
+rankprofile[].fef.property[].value "attribute(foo1)"
+rankprofile[].fef.property[].name "vespa.rank.globalphase"
+rankprofile[].fef.property[].value "rankingExpression(globalphase)"
+rankprofile[].fef.property[].name "rankingExpression(globalphase).rankingScript"
+rankprofile[].fef.property[].value "normalize@5385018767@rrank + normalize@3221316369@rrank"
+rankprofile[].fef.property[].name "vespa.match.feature"
+rankprofile[].fef.property[].value "nativeRank"
+rankprofile[].fef.property[].name "vespa.match.feature"
+rankprofile[].fef.property[].value "attribute(year)"
+rankprofile[].fef.property[].name "vespa.match.feature"
+rankprofile[].fef.property[].value "attribute(foo1)"
+rankprofile[].fef.property[].name "vespa.hidden.matchfeature"
+rankprofile[].fef.property[].value "attribute(year)"
+rankprofile[].fef.property[].name "vespa.hidden.matchfeature"
+rankprofile[].fef.property[].value "attribute(foo1)"
+rankprofile[].fef.property[].name "vespa.globalphase.rerankcount"
+rankprofile[].fef.property[].value "456"
+rankprofile[].fef.property[].name "vespa.type.attribute.t1"
+rankprofile[].fef.property[].value "tensor(m{},v[3])"
+rankprofile[].normalizer[].name "normalize@5385018767@rrank"
+rankprofile[].normalizer[].input "normBar"
+rankprofile[].normalizer[].algo RRANK
+rankprofile[].normalizer[].kparam 60.0
+rankprofile[].normalizer[].name "normalize@3221316369@rrank"
+rankprofile[].normalizer[].input "nativeRank"
+rankprofile[].normalizer[].algo RRANK
+rankprofile[].normalizer[].kparam 60.0
diff --git a/config-model/src/test/derived/rankingexpression/rankexpression.sd b/config-model/src/test/derived/rankingexpression/rankexpression.sd
index 16dff61b63a..15537f1f9d0 100644
--- a/config-model/src/test/derived/rankingexpression/rankexpression.sd
+++ b/config-model/src/test/derived/rankingexpression/rankexpression.sd
@@ -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
+ }
+
}