diff options
author | Lester Solbakken <lesters@users.noreply.github.com> | 2019-11-08 16:12:24 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-11-08 16:12:24 +0100 |
commit | 1b3a300f3eec8df65a98229e1ce6c5526d71661e (patch) | |
tree | 7f9430fa6e6f6ddc70ae889133a24394558ffaaa /config-model | |
parent | 983935b160467ad8521b4059d5ffef33c9e75270 (diff) | |
parent | cdcafc6fc8b4417abab8c72bbce5c503533558ea (diff) |
Merge pull request #11259 from vespa-engine/bratseth/dynamic-tensors-in-verbose-form
Bratseth/dynamic tensors in verbose form
Diffstat (limited to 'config-model')
5 files changed, 82 insertions, 1 deletions
diff --git a/config-model/src/test/derived/tensor/attributes.cfg b/config-model/src/test/derived/tensor/attributes.cfg index 0c556aad868..2e0a207d249 100644 --- a/config-model/src/test/derived/tensor/attributes.cfg +++ b/config-model/src/test/derived/tensor/attributes.cfg @@ -82,3 +82,24 @@ attribute[].upperbound 9223372036854775807 attribute[].densepostinglistthreshold 0.4 attribute[].tensortype "tensor<float>(x[10])" attribute[].imported false +attribute[].name "f6" +attribute[].datatype FLOAT +attribute[].collectiontype SINGLE +attribute[].removeifzero false +attribute[].createifnonexistent false +attribute[].fastsearch false +attribute[].huge false +attribute[].ismutable false +attribute[].sortascending true +attribute[].sortfunction UCA +attribute[].sortstrength PRIMARY +attribute[].sortlocale "" +attribute[].enablebitvectors false +attribute[].enableonlybitvector false +attribute[].fastaccess false +attribute[].arity 8 +attribute[].lowerbound -9223372036854775808 +attribute[].upperbound 9223372036854775807 +attribute[].densepostinglistthreshold 0.4 +attribute[].tensortype "" +attribute[].imported false diff --git a/config-model/src/test/derived/tensor/documenttypes.cfg b/config-model/src/test/derived/tensor/documenttypes.cfg index af1748e484e..72fae572b76 100644 --- a/config-model/src/test/derived/tensor/documenttypes.cfg +++ b/config-model/src/test/derived/tensor/documenttypes.cfg @@ -40,6 +40,10 @@ documenttype[].datatype[].sstruct.field[].name "f5" documenttype[].datatype[].sstruct.field[].id 329055840 documenttype[].datatype[].sstruct.field[].datatype 21 documenttype[].datatype[].sstruct.field[].detailedtype "tensor<float>(x[10])" +documenttype[].datatype[].sstruct.field[].name "f6" +documenttype[].datatype[].sstruct.field[].id 596352344 +documenttype[].datatype[].sstruct.field[].datatype 1 +documenttype[].datatype[].sstruct.field[].detailedtype "" documenttype[].datatype[].id -1903234535 documenttype[].datatype[].type STRUCT documenttype[].datatype[].array.element.id 0 @@ -60,3 +64,4 @@ documenttype[].fieldsets{[document]}.fields[] "f2" documenttype[].fieldsets{[document]}.fields[] "f3" documenttype[].fieldsets{[document]}.fields[] "f4" documenttype[].fieldsets{[document]}.fields[] "f5" +documenttype[].fieldsets{[document]}.fields[] "f6" diff --git a/config-model/src/test/derived/tensor/rank-profiles.cfg b/config-model/src/test/derived/tensor/rank-profiles.cfg index 1ce9227d323..617901130a6 100644 --- a/config-model/src/test/derived/tensor/rank-profiles.cfg +++ b/config-model/src/test/derived/tensor/rank-profiles.cfg @@ -80,3 +80,33 @@ rankprofile[].fef.property[].name "vespa.type.attribute.f4" rankprofile[].fef.property[].value "tensor(x[10],y[20])" rankprofile[].fef.property[].name "vespa.type.attribute.f5" rankprofile[].fef.property[].value "tensor<float>(x[10])" +rankprofile[].name "profile5" +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<float>(d0[1],x[2]):{{d0:0,x:0}:attribute(f6),{d0:0,x:1}:reduce(attribute(f5), sum)}, sum)" +rankprofile[].fef.property[].name "vespa.type.attribute.f2" +rankprofile[].fef.property[].value "tensor<float>(x[2],y[1])" +rankprofile[].fef.property[].name "vespa.type.attribute.f3" +rankprofile[].fef.property[].value "tensor(x{})" +rankprofile[].fef.property[].name "vespa.type.attribute.f4" +rankprofile[].fef.property[].value "tensor(x[10],y[20])" +rankprofile[].fef.property[].name "vespa.type.attribute.f5" +rankprofile[].fef.property[].value "tensor<float>(x[10])" +rankprofile[].name "profile6" +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<float>(d0[1],x[2]):{{d0:0,x:0}:attribute(f6),{d0:0,x:1}:reduce(rankingExpression(joinedtensors), sum)}, sum)" +rankprofile[].fef.property[].name "vespa.type.attribute.f2" +rankprofile[].fef.property[].value "tensor<float>(x[2],y[1])" +rankprofile[].fef.property[].name "vespa.type.attribute.f3" +rankprofile[].fef.property[].value "tensor(x{})" +rankprofile[].fef.property[].name "vespa.type.attribute.f4" +rankprofile[].fef.property[].value "tensor(x[10],y[20])" +rankprofile[].fef.property[].name "vespa.type.attribute.f5" +rankprofile[].fef.property[].value "tensor<float>(x[10])" diff --git a/config-model/src/test/derived/tensor/summary.cfg b/config-model/src/test/derived/tensor/summary.cfg index 903b6033297..fb32eacbb4c 100644 --- a/config-model/src/test/derived/tensor/summary.cfg +++ b/config-model/src/test/derived/tensor/summary.cfg @@ -15,7 +15,7 @@ classes[].fields[].name "summaryfeatures" classes[].fields[].type "featuredata" classes[].fields[].name "documentid" classes[].fields[].type "longstring" -classes[].id 193983608 +classes[].id 1476352352 classes[].name "attributeprefetch" classes[].fields[].name "f2" classes[].fields[].type "tensor" @@ -25,6 +25,8 @@ classes[].fields[].name "f4" classes[].fields[].type "tensor" classes[].fields[].name "f5" classes[].fields[].type "tensor" +classes[].fields[].name "f6" +classes[].fields[].type "float" classes[].fields[].name "rankfeatures" classes[].fields[].type "featuredata" classes[].fields[].name "summaryfeatures" diff --git a/config-model/src/test/derived/tensor/tensor.sd b/config-model/src/test/derived/tensor/tensor.sd index b31352a2105..13727d1ec49 100644 --- a/config-model/src/test/derived/tensor/tensor.sd +++ b/config-model/src/test/derived/tensor/tensor.sd @@ -17,6 +17,9 @@ search tensor { field f5 type tensor<float>(x[10]) { indexing: attribute | summary } + field f6 type float { + indexing: attribute + } } rank-profile profile1 { @@ -55,4 +58,24 @@ search tensor { } + rank-profile profile5 { + + first-phase { + expression: sum(tensor<float>(d0[1],x[2]):[[attribute(f6), sum(attribute(f5))]]) + } + + } + + rank-profile profile6 { + + first-phase { + expression: sum(tensor<float>(d0[1],x[2]):[[attribute(f6), sum(joinedtensors())]]) + } + + function joinedtensors() { + expression: tensor(i[10])(i) * attribute(f4) + } + + } + } |