diff options
author | Arne H Juul <arnej@yahooinc.com> | 2021-11-04 10:43:35 +0000 |
---|---|---|
committer | Arne H Juul <arnej@yahooinc.com> | 2021-11-04 10:43:35 +0000 |
commit | 362f7225c6c274d56af947bb6a552ded0ee6df6c (patch) | |
tree | bc7ec887c0b96538879a7c82b2e75733faae257c /config-model | |
parent | 8e165140c2726e4434e56a032aeadd012943dca6 (diff) |
extend unit test with match-features
Diffstat (limited to 'config-model')
4 files changed, 104 insertions, 2 deletions
diff --git a/config-model/src/test/derived/rankexpression/rank-profiles.cfg b/config-model/src/test/derived/rankexpression/rank-profiles.cfg index bb7c7fdd349..6400870b0c4 100644 --- a/config-model/src/test/derived/rankexpression/rank-profiles.cfg +++ b/config-model/src/test/derived/rankexpression/rank-profiles.cfg @@ -45,6 +45,8 @@ rankprofile[].fef.property[].name "vespa.hitcollector.rankscoredroplimit" rankprofile[].fef.property[].value "-0.5" rankprofile[].fef.property[].name "vespa.dump.ignoredefaultfeatures" rankprofile[].fef.property[].value "true" +rankprofile[].fef.property[].name "vespa.type.attribute.t1" +rankprofile[].fef.property[].value "tensor(m{},v[3])" rankprofile[].name "unranked" rankprofile[].fef.property[].name "vespa.rank.firstphase" rankprofile[].fef.property[].value "value(0)" @@ -54,6 +56,8 @@ rankprofile[].fef.property[].name "vespa.hitcollector.arraysize" rankprofile[].fef.property[].value "0" rankprofile[].fef.property[].name "vespa.dump.ignoredefaultfeatures" rankprofile[].fef.property[].value "true" +rankprofile[].fef.property[].name "vespa.type.attribute.t1" +rankprofile[].fef.property[].value "tensor(m{},v[3])" rankprofile[].name "static" rankprofile[].fef.property[].name "vespa.rank.firstphase" rankprofile[].fef.property[].value "attribute" @@ -77,6 +81,8 @@ rankprofile[].fef.property[].name "vespa.summary.feature" rankprofile[].fef.property[].value "attribute(foo4).out" rankprofile[].fef.property[].name "vespa.summary.feature" rankprofile[].fef.property[].value "attribute(bar4).out" +rankprofile[].fef.property[].name "vespa.type.attribute.t1" +rankprofile[].fef.property[].value "tensor(m{},v[3])" rankprofile[].name "overflow" rankprofile[].fef.property[].name "vespa.rank.firstphase" rankprofile[].fef.property[].value "rankingExpression(firstphase)" @@ -92,6 +98,8 @@ rankprofile[].fef.property[].name "vespa.hitcollector.arraysize" rankprofile[].fef.property[].value "201" rankprofile[].fef.property[].name "vespa.hitcollector.rankscoredroplimit" rankprofile[].fef.property[].value "501.5" +rankprofile[].fef.property[].name "vespa.type.attribute.t1" +rankprofile[].fef.property[].value "tensor(m{},v[3])" rankprofile[].name "duplicates" rankprofile[].fef.property[].name "fieldMatch(a).proximityLimit" rankprofile[].fef.property[].value "4" @@ -113,16 +121,22 @@ rankprofile[].fef.property[].name "fieldMatch(a).proximityTable" rankprofile[].fef.property[].value "0.4" rankprofile[].fef.property[].name "fieldMatch(a).proximityTable" rankprofile[].fef.property[].value "0.2" +rankprofile[].fef.property[].name "vespa.type.attribute.t1" +rankprofile[].fef.property[].value "tensor(m{},v[3])" rankprofile[].name "whitespace1" rankprofile[].fef.property[].name "vespa.rank.firstphase" rankprofile[].fef.property[].value "rankingExpression(firstphase)" rankprofile[].fef.property[].name "rankingExpression(firstphase).rankingScript" rankprofile[].fef.property[].value "1" +rankprofile[].fef.property[].name "vespa.type.attribute.t1" +rankprofile[].fef.property[].value "tensor(m{},v[3])" rankprofile[].name "whitespace2" rankprofile[].fef.property[].name "vespa.rank.firstphase" rankprofile[].fef.property[].value "rankingExpression(firstphase)" rankprofile[].fef.property[].name "rankingExpression(firstphase).rankingScript" rankprofile[].fef.property[].value "1" +rankprofile[].fef.property[].name "vespa.type.attribute.t1" +rankprofile[].fef.property[].value "tensor(m{},v[3])" rankprofile[].name "macros" rankprofile[].fef.property[].name "rankingExpression(myfeature).rankingScript" rankprofile[].fef.property[].value "70 * fieldMatch(title).completeness * pow(0 - fieldMatch(title).earliness,2) + 30 * pow(0 - fieldMatch(description).earliness,2)" @@ -138,6 +152,8 @@ rankprofile[].fef.property[].name "vespa.rank.secondphase" rankprofile[].fef.property[].value "rankingExpression(fourtimessum@5cf279212355b980.67f1e87166cfef86)" rankprofile[].fef.property[].name "vespa.summary.feature" rankprofile[].fef.property[].value "fieldMatch(title)" +rankprofile[].fef.property[].name "vespa.type.attribute.t1" +rankprofile[].fef.property[].value "tensor(m{},v[3])" rankprofile[].name "macros2" rankprofile[].fef.property[].name "foo" rankprofile[].fef.property[].value "some, list" @@ -161,16 +177,22 @@ rankprofile[].fef.property[].name "vespa.summary.feature" rankprofile[].fef.property[].value "rankingExpression(mysummaryfeature2)" rankprofile[].fef.property[].name "vespa.summary.feature" rankprofile[].fef.property[].value "rankingExpression(mysummaryfeature)" +rankprofile[].fef.property[].name "vespa.type.attribute.t1" +rankprofile[].fef.property[].value "tensor(m{},v[3])" rankprofile[].name "macros3" rankprofile[].fef.property[].name "rankingExpression(onlyusedinsummaryfeature).rankingScript" rankprofile[].fef.property[].value "5" rankprofile[].fef.property[].name "vespa.summary.feature" rankprofile[].fef.property[].value "rankingExpression(matches(title,rankingExpression(onlyusedinsummaryfeature)))" +rankprofile[].fef.property[].name "vespa.type.attribute.t1" +rankprofile[].fef.property[].value "tensor(m{},v[3])" rankprofile[].name "macros3-inherited" rankprofile[].fef.property[].name "rankingExpression(onlyusedinsummaryfeature).rankingScript" rankprofile[].fef.property[].value "5" rankprofile[].fef.property[].name "vespa.summary.feature" rankprofile[].fef.property[].value "rankingExpression(matches(title,rankingExpression(onlyusedinsummaryfeature)))" +rankprofile[].fef.property[].name "vespa.type.attribute.t1" +rankprofile[].fef.property[].value "tensor(m{},v[3])" rankprofile[].name "macros-inherited" rankprofile[].fef.property[].name "foo" rankprofile[].fef.property[].value "some, list" @@ -196,6 +218,8 @@ rankprofile[].fef.property[].name "vespa.summary.feature" rankprofile[].fef.property[].value "rankingExpression(mysummaryfeature2)" rankprofile[].fef.property[].name "vespa.summary.feature" rankprofile[].fef.property[].value "rankingExpression(mysummaryfeature)" +rankprofile[].fef.property[].name "vespa.type.attribute.t1" +rankprofile[].fef.property[].value "tensor(m{},v[3])" rankprofile[].name "macros-inherited2" rankprofile[].fef.property[].name "foo" rankprofile[].fef.property[].value "some, list" @@ -221,6 +245,8 @@ rankprofile[].fef.property[].name "vespa.summary.feature" rankprofile[].fef.property[].value "rankingExpression(mysummaryfeature2)" rankprofile[].fef.property[].name "vespa.summary.feature" rankprofile[].fef.property[].value "rankingExpression(mysummaryfeature)" +rankprofile[].fef.property[].name "vespa.type.attribute.t1" +rankprofile[].fef.property[].value "tensor(m{},v[3])" rankprofile[].name "macros-inherited3" rankprofile[].fef.property[].name "foo" rankprofile[].fef.property[].value "some, list" @@ -244,6 +270,8 @@ rankprofile[].fef.property[].name "vespa.summary.feature" rankprofile[].fef.property[].value "rankingExpression(mysummaryfeature2)" rankprofile[].fef.property[].name "vespa.summary.feature" rankprofile[].fef.property[].value "rankingExpression(mysummaryfeature)" +rankprofile[].fef.property[].name "vespa.type.attribute.t1" +rankprofile[].fef.property[].value "tensor(m{},v[3])" rankprofile[].name "macros-refering-macros" rankprofile[].fef.property[].name "rankingExpression(m1).rankingScript" rankprofile[].fef.property[].value "700 * fieldMatch(title).completeness" @@ -255,6 +283,8 @@ rankprofile[].fef.property[].name "vespa.rank.secondphase" rankprofile[].fef.property[].value "rankingExpression(secondphase)" rankprofile[].fef.property[].name "rankingExpression(secondphase).rankingScript" rankprofile[].fef.property[].value "40000 * rankingExpression(m2) * rankingExpression(m4)" +rankprofile[].fef.property[].name "vespa.type.attribute.t1" +rankprofile[].fef.property[].value "tensor(m{},v[3])" rankprofile[].name "macros-refering-macros-inherited" rankprofile[].fef.property[].name "rankingExpression(m1).rankingScript" rankprofile[].fef.property[].value "700 * fieldMatch(title).completeness" @@ -268,6 +298,8 @@ rankprofile[].fef.property[].name "vespa.rank.secondphase" rankprofile[].fef.property[].value "rankingExpression(secondphase)" rankprofile[].fef.property[].name "rankingExpression(secondphase).rankingScript" rankprofile[].fef.property[].value "3000 * rankingExpression(m2) * rankingExpression(m4)" +rankprofile[].fef.property[].name "vespa.type.attribute.t1" +rankprofile[].fef.property[].value "tensor(m{},v[3])" rankprofile[].name "macros-refering-macros-inherited2" rankprofile[].fef.property[].name "rankingExpression(m1).rankingScript" rankprofile[].fef.property[].value "700 * fieldMatch(title).completeness" @@ -279,6 +311,8 @@ rankprofile[].fef.property[].name "vespa.rank.secondphase" rankprofile[].fef.property[].value "rankingExpression(secondphase)" rankprofile[].fef.property[].name "rankingExpression(secondphase).rankingScript" rankprofile[].fef.property[].value "3002 * rankingExpression(m2)" +rankprofile[].fef.property[].name "vespa.type.attribute.t1" +rankprofile[].fef.property[].value "tensor(m{},v[3])" rankprofile[].name "macros-refering-macros-inherited-two-levels" rankprofile[].fef.property[].name "rankingExpression(m1).rankingScript" rankprofile[].fef.property[].value "700 * fieldMatch(title).completeness" @@ -294,3 +328,38 @@ rankprofile[].fef.property[].name "vespa.rank.secondphase" rankprofile[].fef.property[].value "rankingExpression(secondphase)" rankprofile[].fef.property[].name "rankingExpression(secondphase).rankingScript" rankprofile[].fef.property[].value "3000 * rankingExpression(m2) * rankingExpression(m4)" +rankprofile[].fef.property[].name "vespa.type.attribute.t1" +rankprofile[].fef.property[].value "tensor(m{},v[3])" +rankprofile[].name "withmf" +rankprofile[].fef.property[].name "rankingExpression(myplus).rankingScript" +rankprofile[].fef.property[].value "attribute(foo1) + attribute(foo2)" +rankprofile[].fef.property[].name "rankingExpression(mymul).rankingScript" +rankprofile[].fef.property[].value "attribute(t1) * query(fromq)" +rankprofile[].fef.property[].name "vespa.rank.firstphase" +rankprofile[].fef.property[].value "attribute(foo1)" +rankprofile[].fef.property[].name "vespa.rank.secondphase" +rankprofile[].fef.property[].value "attribute(foo2)" +rankprofile[].fef.property[].name "vespa.match.feature" +rankprofile[].fef.property[].value "attribute(foo1).out" +rankprofile[].fef.property[].name "vespa.match.feature" +rankprofile[].fef.property[].value "attribute(bar1)" +rankprofile[].fef.property[].name "vespa.match.feature" +rankprofile[].fef.property[].value "attribute(foo2).out" +rankprofile[].fef.property[].name "vespa.match.feature" +rankprofile[].fef.property[].value "attribute(bar2).out" +rankprofile[].fef.property[].name "vespa.match.feature" +rankprofile[].fef.property[].value "attribute(foo3).out" +rankprofile[].fef.property[].name "vespa.match.feature" +rankprofile[].fef.property[].value "attribute(bar3).out" +rankprofile[].fef.property[].name "vespa.match.feature" +rankprofile[].fef.property[].value "attribute(foo4)" +rankprofile[].fef.property[].name "vespa.match.feature" +rankprofile[].fef.property[].value "firstPhase" +rankprofile[].fef.property[].name "vespa.match.feature" +rankprofile[].fef.property[].value "secondPhase" +rankprofile[].fef.property[].name "vespa.match.feature" +rankprofile[].fef.property[].value "rankingExpression(myplus)" +rankprofile[].fef.property[].name "vespa.match.feature" +rankprofile[].fef.property[].value "rankingExpression(mymul)" +rankprofile[].fef.property[].name "vespa.type.attribute.t1" +rankprofile[].fef.property[].value "tensor(m{},v[3])" diff --git a/config-model/src/test/derived/rankexpression/rankexpression.sd b/config-model/src/test/derived/rankexpression/rankexpression.sd index 70d79a02a2e..73eb1cadadb 100644 --- a/config-model/src/test/derived/rankexpression/rankexpression.sd +++ b/config-model/src/test/derived/rankexpression/rankexpression.sd @@ -51,6 +51,9 @@ search rankexpression { indexing: attribute } + field t1 type tensor(m{},v[3]) { + indexing: attribute + } } rank-profile default { @@ -317,5 +320,30 @@ search rankexpression { } } -} + rank-profile withmf { + function myplus() { + expression: attribute(foo1)+attribute(foo2) + } + function mymul() { + expression: attribute(t1)*query(fromq) + } + first-phase { + expression: attribute(foo1) + } + second-phase { + expression: attribute(foo2) + } + match-features: attribute(foo1).out attribute(bar1) + match-features { attribute(foo2).out attribute(bar2).out } + match-features { + attribute(foo3).out attribute(bar3).out } + match-features { + attribute(foo4) + myplus + mymul + firstPhase + secondPhase + } + } +} diff --git a/config-model/src/test/derived/rankexpression/summary.cfg b/config-model/src/test/derived/rankexpression/summary.cfg index 4f417a848a7..22f4c3d4ca7 100644 --- a/config-model/src/test/derived/rankexpression/summary.cfg +++ b/config-model/src/test/derived/rankexpression/summary.cfg @@ -16,7 +16,7 @@ classes[].fields[].name "summaryfeatures" classes[].fields[].type "featuredata" classes[].fields[].name "documentid" classes[].fields[].type "longstring" -classes[].id 1736696699 +classes[].id 203924099 classes[].name "attributeprefetch" classes[].omitsummaryfeatures false classes[].fields[].name "year" @@ -37,6 +37,8 @@ classes[].fields[].name "bar3" classes[].fields[].type "integer" classes[].fields[].name "bar4" classes[].fields[].type "integer" +classes[].fields[].name "t1" +classes[].fields[].type "tensor" classes[].fields[].name "rankfeatures" classes[].fields[].type "featuredata" classes[].fields[].name "summaryfeatures" diff --git a/config-model/src/test/derived/rankexpression/summarymap.cfg b/config-model/src/test/derived/rankexpression/summarymap.cfg index e8d9bd08ca7..bd92b36548c 100644 --- a/config-model/src/test/derived/rankexpression/summarymap.cfg +++ b/config-model/src/test/derived/rankexpression/summarymap.cfg @@ -32,3 +32,6 @@ override[].arguments "bar3" override[].field "bar4" override[].command "attribute" override[].arguments "bar4" +override[].field "t1" +override[].command "attribute" +override[].arguments "t1" |