diff options
Diffstat (limited to 'config-model/src/test/derived/rankingexpression/rankexpression.sd')
-rw-r--r-- | config-model/src/test/derived/rankingexpression/rankexpression.sd | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/config-model/src/test/derived/rankingexpression/rankexpression.sd b/config-model/src/test/derived/rankingexpression/rankexpression.sd index 15537f1f9d0..1ccf74bfe17 100644 --- a/config-model/src/test/derived/rankingexpression/rankexpression.sd +++ b/config-model/src/test/derived/rankingexpression/rankexpression.sd @@ -469,4 +469,42 @@ schema rankexpression { match-features: nativeRank } + rank-profile function-with-arg-as-summary-feature { + function plusOne(x) { + expression: x + 1 + } + function useAttr(name, weight) { + expression: attribute(name) * weight + } + first-phase { + expression: nativeRank + } + summary-features { + attribute(t1) + plusOne(41) + useAttr(foo1, 17) + } + } + + rank-profile function-with-arg-in-global-phase { + function plusOne(x) { + expression: x + 1 + } + function useAttr(name, weight) { + expression: attribute(name) * weight + } + function withIndirect(name) { + expression: useAttr(name, 1.25) + } + first-phase { + expression: nativeRank + } + global-phase { + expression: sum(useAttr(t1, 42) + plusOne(2) + withIndirect(foo1) + plusOne(attribute(foo2))) + } + match-features { + plusOne(attribute(foo2)) + } + } + } |