diff options
Diffstat (limited to 'config-model/src/test/derived/rankingexpression')
-rw-r--r-- | config-model/src/test/derived/rankingexpression/rank-profiles.cfg | 62 | ||||
-rw-r--r-- | config-model/src/test/derived/rankingexpression/rankexpression.sd | 30 |
2 files changed, 91 insertions, 1 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 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 + } + } |