diff options
author | Arne Juul <arnej@vespa.ai> | 2024-02-21 14:31:27 +0000 |
---|---|---|
committer | Arne Juul <arnej@vespa.ai> | 2024-02-22 10:36:19 +0000 |
commit | 97eff1f15dcafe4a8d0229fa36b3e0448de2f4d6 (patch) | |
tree | 7bfa620f51263b3e2c6cc1bd319b922a0cb33a09 /config-model/src/test | |
parent | 4f0947b6617f5c9ff0a133a1f12bb4a5b7d57bb6 (diff) |
allow inputs { query(foo) string }
Diffstat (limited to 'config-model/src/test')
3 files changed, 29 insertions, 4 deletions
diff --git a/config-model/src/test/derived/rankingexpression/rank-profiles.cfg b/config-model/src/test/derived/rankingexpression/rank-profiles.cfg index 87882eef273..8b769360053 100644 --- a/config-model/src/test/derived/rankingexpression/rank-profiles.cfg +++ b/config-model/src/test/derived/rankingexpression/rank-profiles.cfg @@ -670,3 +670,14 @@ rankprofile[].fef.property[].name "vespa.feature.rename" rankprofile[].fef.property[].value "useAttr(t1,42)" rankprofile[].fef.property[].name "vespa.type.attribute.t1" rankprofile[].fef.property[].value "tensor(m{},v[3])" +rankprofile[].name "withstringcompare" +rankprofile[].fef.property[].name "vespa.rank.firstphase" +rankprofile[].fef.property[].value "rankingExpression(firstphase)" +rankprofile[].fef.property[].name "rankingExpression(firstphase).rankingScript" +rankprofile[].fef.property[].value "if (attribute(surl) == query(myquerystring), 0.75, 0.25)" +rankprofile[].fef.property[].name "vespa.rank.secondphase" +rankprofile[].fef.property[].value "rankingExpression(secondphase)" +rankprofile[].fef.property[].name "rankingExpression(secondphase).rankingScript" +rankprofile[].fef.property[].value "if (attribute(surl) == query(undeclaredinput), 0.75, 0.25)" +rankprofile[].fef.property[].name "vespa.type.attribute.t1" +rankprofile[].fef.property[].value "tensor(m{},v[3])" diff --git a/config-model/src/test/derived/rankingexpression/rankexpression.sd b/config-model/src/test/derived/rankingexpression/rankexpression.sd index 1ccf74bfe17..76672906252 100644 --- a/config-model/src/test/derived/rankingexpression/rankexpression.sd +++ b/config-model/src/test/derived/rankingexpression/rankexpression.sd @@ -20,7 +20,7 @@ schema rankexpression { } field surl type string { - indexing: summary + indexing: summary | attribute } field year type int { @@ -507,4 +507,15 @@ schema rankexpression { } } + rank-profile withstringcompare { + inputs { + query(myquerystring) string + } + first-phase { + expression: if (attribute(surl) == query(myquerystring), 0.75, 0.25) + } + second-phase { + expression: if (attribute(surl) == query(undeclaredinput), 0.75, 0.25) + } + } } diff --git a/config-model/src/test/derived/rankingexpression/summary.cfg b/config-model/src/test/derived/rankingexpression/summary.cfg index b52cb055164..9f96f5ab4a7 100644 --- a/config-model/src/test/derived/rankingexpression/summary.cfg +++ b/config-model/src/test/derived/rankingexpression/summary.cfg @@ -10,8 +10,8 @@ classes[].fields[].name "title" classes[].fields[].command "" classes[].fields[].source "" classes[].fields[].name "surl" -classes[].fields[].command "" -classes[].fields[].source "" +classes[].fields[].command "attribute" +classes[].fields[].source "surl" classes[].fields[].name "year" classes[].fields[].command "attribute" classes[].fields[].source "year" @@ -24,7 +24,7 @@ classes[].fields[].source "" classes[].fields[].name "documentid" classes[].fields[].command "documentid" classes[].fields[].source "" -classes[].id 399614584 +classes[].id 799304810 classes[].name "attributeprefetch" classes[].omitsummaryfeatures false classes[].fields[].name "nrtgmp" @@ -33,6 +33,9 @@ classes[].fields[].source "nrtgmp" classes[].fields[].name "glmpfw" classes[].fields[].command "attribute" classes[].fields[].source "glmpfw" +classes[].fields[].name "surl" +classes[].fields[].command "attribute" +classes[].fields[].source "surl" classes[].fields[].name "year" classes[].fields[].command "attribute" classes[].fields[].source "year" |