diff options
Diffstat (limited to 'config-model/src/test')
-rw-r--r-- | config-model/src/test/derived/rankexpression/macro.expression (renamed from config-model/src/test/derived/rankingexpression/macro.expression) | 0 | ||||
-rw-r--r-- | config-model/src/test/derived/rankexpression/overflow.expression (renamed from config-model/src/test/derived/rankingexpression/overflow.expression) | 0 | ||||
-rw-r--r-- | config-model/src/test/derived/rankexpression/rank-profiles.cfg (renamed from config-model/src/test/derived/rankingexpression/rank-profiles.cfg) | 9 | ||||
-rw-r--r-- | config-model/src/test/derived/rankexpression/rankexpression.expression (renamed from config-model/src/test/derived/rankingexpression/rankexpression.expression) | 0 | ||||
-rw-r--r-- | config-model/src/test/derived/rankexpression/rankexpression.sd (renamed from config-model/src/test/derived/rankingexpression/rankexpression.sd) | 49 | ||||
-rw-r--r-- | config-model/src/test/derived/rankexpression/summary.cfg (renamed from config-model/src/test/derived/rankingexpression/summary.cfg) | 0 | ||||
-rw-r--r-- | config-model/src/test/derived/rankexpression/summarymap.cfg (renamed from config-model/src/test/derived/rankingexpression/summarymap.cfg) | 0 | ||||
-rw-r--r-- | config-model/src/test/java/com/yahoo/searchdefinition/derived/ExportingTestCase.java | 4 |
8 files changed, 19 insertions, 43 deletions
diff --git a/config-model/src/test/derived/rankingexpression/macro.expression b/config-model/src/test/derived/rankexpression/macro.expression index 054b025b2e7..054b025b2e7 100644 --- a/config-model/src/test/derived/rankingexpression/macro.expression +++ b/config-model/src/test/derived/rankexpression/macro.expression diff --git a/config-model/src/test/derived/rankingexpression/overflow.expression b/config-model/src/test/derived/rankexpression/overflow.expression index 4d3a6faeeb5..4d3a6faeeb5 100644 --- a/config-model/src/test/derived/rankingexpression/overflow.expression +++ b/config-model/src/test/derived/rankexpression/overflow.expression diff --git a/config-model/src/test/derived/rankingexpression/rank-profiles.cfg b/config-model/src/test/derived/rankexpression/rank-profiles.cfg index 6bad0434ac3..6400870b0c4 100644 --- a/config-model/src/test/derived/rankingexpression/rank-profiles.cfg +++ b/config-model/src/test/derived/rankexpression/rank-profiles.cfg @@ -363,12 +363,3 @@ 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])" -rankprofile[].name "withboolean" -rankprofile[].fef.property[].name "rankingExpression(mytrue).rankingScript" -rankprofile[].fef.property[].value "1.0" -rankprofile[].fef.property[].name "rankingExpression(myfalse).rankingScript" -rankprofile[].fef.property[].value "0.0" -rankprofile[].fef.property[].name "rankingExpression(mybooleanexpression).rankingScript" -rankprofile[].fef.property[].value "5.0" -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.expression b/config-model/src/test/derived/rankexpression/rankexpression.expression index d6cb73c829d..d6cb73c829d 100644 --- a/config-model/src/test/derived/rankingexpression/rankexpression.expression +++ b/config-model/src/test/derived/rankexpression/rankexpression.expression diff --git a/config-model/src/test/derived/rankingexpression/rankexpression.sd b/config-model/src/test/derived/rankexpression/rankexpression.sd index 25d657eaf0b..73eb1cadadb 100644 --- a/config-model/src/test/derived/rankingexpression/rankexpression.sd +++ b/config-model/src/test/derived/rankexpression/rankexpression.sd @@ -69,8 +69,7 @@ search rankexpression { rank-features: attribute(foo1).out attribute(bar1) rank-features { attribute(foo2).out attribute(bar2).out } rank-features { - attribute(foo3).out attribute(bar3).out - } + attribute(foo3).out attribute(bar3).out } rank-features { attribute(foo4).out attribute(bar4).out @@ -102,8 +101,7 @@ search rankexpression { summary-features: attribute(foo1).out attribute(bar1) summary-features { attribute(foo2).out attribute(bar2).out } summary-features { - attribute(foo3).out attribute(bar3).out - } + attribute(foo3).out attribute(bar3).out } summary-features { attribute(foo4).out attribute(bar4).out @@ -164,10 +162,10 @@ search rankexpression { second-phase { expression: fourtimessum(match,rankBoost) } - function fourtimessum(var1, var2) { + macro fourtimessum(var1, var2) { expression: 4*(var1+var2) } - function myfeature() { + macro myfeature() { expression { 70 * fieldMatch(title).completeness * pow(0 - fieldMatch(title).earliness, 2) + 30 * pow(0 - fieldMatch(description).earliness, 2) @@ -189,21 +187,21 @@ search rankexpression { second-phase { expression: fourtimessum(match,match) + mysummaryfeature + myfeature } - function fourtimessum(var1, var2) { + macro fourtimessum(var1, var2) { expression: 4*(var1+var2) } - function myfeature() { + macro myfeature() { expression { 70 * fieldMatch(title).completeness * pow(0 - fieldMatch(title).earliness, 2) + 30 * pow(0 - fieldMatch(description).earliness, 2) } } - function mysummaryfeature() { + macro mysummaryfeature() { expression { 70 * fieldMatch(title).completeness } } - function mysummaryfeature2() { + macro mysummaryfeature2() { expression { 71 * fieldMatch(title).completeness } @@ -215,7 +213,7 @@ search rankexpression { } rank-profile macros3 { - function onlyusedinsummaryfeature() { + macro onlyusedinsummaryfeature() { expression: 5 } summary-features { @@ -231,7 +229,7 @@ search rankexpression { } rank-profile macros-inherited inherits macros2 { - function mysummaryfeature() { + macro mysummaryfeature() { expression { 80 * fieldMatch(title).completeness } @@ -252,7 +250,7 @@ search rankexpression { } rank-profile macros-inherited3 inherits macros-inherited2 { - function myfeature() { + macro myfeature() { expression { 700 * fieldMatch(title).completeness } @@ -265,17 +263,17 @@ search rankexpression { } rank-profile macros-refering-macros { - function m2() { + macro m2() { expression: m1 * 67 } - function m1() { + macro m1() { expression { 700 * fieldMatch(title).completeness } } - function m4() { + macro m4() { expression: file:macro.expression } @@ -288,7 +286,7 @@ search rankexpression { } rank-profile macros-refering-macros-inherited inherits macros-refering-macros { - function m3() { + macro m3() { expression { if(isNan(attribute(nrtgmp))==1, 0.0, @@ -312,7 +310,7 @@ search rankexpression { } rank-profile macros-refering-macros-inherited-two-levels inherits macros-refering-macros-inherited { - function m5() { + macro m5() { expression { if(isNan(attribute(glmpfw))==1, m1, @@ -338,8 +336,7 @@ search rankexpression { match-features: attribute(foo1).out attribute(bar1) match-features { attribute(foo2).out attribute(bar2).out } match-features { - attribute(foo3).out attribute(bar3).out - } + attribute(foo3).out attribute(bar3).out } match-features { attribute(foo4) myplus @@ -349,16 +346,4 @@ search rankexpression { } } - rank-profile withboolean { - function mytrue() { - expression: true - } - function myfalse() { - expression: false - } - function mybooleanexpression() { - expression: true + if(false, 3.0, 4.0) - } - } - } diff --git a/config-model/src/test/derived/rankingexpression/summary.cfg b/config-model/src/test/derived/rankexpression/summary.cfg index aec076aa8fe..aec076aa8fe 100644 --- a/config-model/src/test/derived/rankingexpression/summary.cfg +++ b/config-model/src/test/derived/rankexpression/summary.cfg diff --git a/config-model/src/test/derived/rankingexpression/summarymap.cfg b/config-model/src/test/derived/rankexpression/summarymap.cfg index bd92b36548c..bd92b36548c 100644 --- a/config-model/src/test/derived/rankingexpression/summarymap.cfg +++ b/config-model/src/test/derived/rankexpression/summarymap.cfg diff --git a/config-model/src/test/java/com/yahoo/searchdefinition/derived/ExportingTestCase.java b/config-model/src/test/java/com/yahoo/searchdefinition/derived/ExportingTestCase.java index ac97863b7a7..719d353f03a 100644 --- a/config-model/src/test/java/com/yahoo/searchdefinition/derived/ExportingTestCase.java +++ b/config-model/src/test/java/com/yahoo/searchdefinition/derived/ExportingTestCase.java @@ -108,8 +108,8 @@ public class ExportingTestCase extends AbstractExportingTestCase { } @Test - public void testRankingExpression() throws IOException, ParseException { - assertCorrectDeriving("rankingexpression"); + public void testRankExpression() throws IOException, ParseException { + assertCorrectDeriving("rankexpression"); } @Test |