summaryrefslogtreecommitdiffstats
path: root/config-model
diff options
context:
space:
mode:
authorJon Bratseth <bratseth@oath.com>2018-09-20 09:39:09 -0700
committerJon Bratseth <bratseth@oath.com>2018-09-20 09:39:09 -0700
commit772b67da6040957bd975b2418f98d2f18ee69fc4 (patch)
tree5232b46e61d7cc136df6d8afee2a8a4fd063f0c3 /config-model
parent0436890e9520083c2227a6afb4780f0b588f977b (diff)
Test non-empty tensor type output
Diffstat (limited to 'config-model')
-rw-r--r--config-model/src/test/derived/tensor/rank-profiles.cfg6
-rw-r--r--config-model/src/test/derived/tensor/tensor.sd6
2 files changed, 10 insertions, 2 deletions
diff --git a/config-model/src/test/derived/tensor/rank-profiles.cfg b/config-model/src/test/derived/tensor/rank-profiles.cfg
index cb496c06367..471343da63c 100644
--- a/config-model/src/test/derived/tensor/rank-profiles.cfg
+++ b/config-model/src/test/derived/tensor/rank-profiles.cfg
@@ -43,10 +43,14 @@ rankprofile[].fef.property[].value "tensor(x{})"
rankprofile[].fef.property[].name "vespa.type.attribute.f4"
rankprofile[].fef.property[].value "tensor(x[10],y[20])"
rankprofile[].name "profile3"
+rankprofile[].fef.property[].name "rankingExpression(joinedtensors).rankingScript"
+rankprofile[].fef.property[].value "tensor(i[10])(i) * attribute(f4)"
+rankprofile[].fef.property[].name "rankingExpression(joinedtensors).type"
+rankprofile[].fef.property[].value "tensor(i[10],x[10],y[20])"
rankprofile[].fef.property[].name "vespa.rank.firstphase"
rankprofile[].fef.property[].value "rankingExpression(firstphase)"
rankprofile[].fef.property[].name "rankingExpression(firstphase).rankingScript"
-rankprofile[].fef.property[].value "reduce(tensor(i[10])(i) * attribute(f4), sum)"
+rankprofile[].fef.property[].value "reduce(rankingExpression(joinedtensors), sum)"
rankprofile[].fef.property[].name "vespa.type.attribute.f2"
rankprofile[].fef.property[].value "tensor(x[2],y[])"
rankprofile[].fef.property[].name "vespa.type.attribute.f3"
diff --git a/config-model/src/test/derived/tensor/tensor.sd b/config-model/src/test/derived/tensor/tensor.sd
index 5792a7997f8..54463448e28 100644
--- a/config-model/src/test/derived/tensor/tensor.sd
+++ b/config-model/src/test/derived/tensor/tensor.sd
@@ -36,7 +36,11 @@ search tensor {
rank-profile profile3 {
first-phase {
- expression: sum(tensor(i[10])(i) * attribute(f4))
+ expression: sum(joinedtensors)
+ }
+
+ function joinedtensors() {
+ expression: tensor(i[10])(i) * attribute(f4)
}
}