diff options
Diffstat (limited to 'config-model/src/test/java/com/yahoo/searchdefinition/RankingExpressionConstantsTestCase.java')
-rw-r--r-- | config-model/src/test/java/com/yahoo/searchdefinition/RankingExpressionConstantsTestCase.java | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/config-model/src/test/java/com/yahoo/searchdefinition/RankingExpressionConstantsTestCase.java b/config-model/src/test/java/com/yahoo/searchdefinition/RankingExpressionConstantsTestCase.java index 19a50817f75..678c2301bc6 100644 --- a/config-model/src/test/java/com/yahoo/searchdefinition/RankingExpressionConstantsTestCase.java +++ b/config-model/src/test/java/com/yahoo/searchdefinition/RankingExpressionConstantsTestCase.java @@ -25,7 +25,7 @@ public class RankingExpressionConstantsTestCase extends AbstractSchemaTestCase { public void testConstants() throws ParseException { RankProfileRegistry rankProfileRegistry = new RankProfileRegistry(); QueryProfileRegistry queryProfileRegistry = new QueryProfileRegistry(); - SearchBuilder builder = new SearchBuilder(rankProfileRegistry); + SchemaBuilder builder = new SchemaBuilder(rankProfileRegistry); builder.importString( "search test {\n" + " document test { \n" + @@ -67,7 +67,7 @@ public class RankingExpressionConstantsTestCase extends AbstractSchemaTestCase { "\n" + "}\n"); builder.build(); - Schema s = builder.getSearch(); + Schema s = builder.getSchema(); RankProfile parent = rankProfileRegistry.get(s, "parent").compile(queryProfileRegistry, new ImportedMlModels()); assertEquals("0.0", parent.getFirstPhaseRanking().getRoot().toString()); @@ -91,7 +91,7 @@ public class RankingExpressionConstantsTestCase extends AbstractSchemaTestCase { @Test public void testNameCollision() throws ParseException { RankProfileRegistry rankProfileRegistry = new RankProfileRegistry(); - SearchBuilder builder = new SearchBuilder(rankProfileRegistry); + SchemaBuilder builder = new SchemaBuilder(rankProfileRegistry); builder.importString( "search test {\n" + " document test { \n" + @@ -111,7 +111,7 @@ public class RankingExpressionConstantsTestCase extends AbstractSchemaTestCase { "\n" + "}\n"); builder.build(); - Schema s = builder.getSearch(); + Schema s = builder.getSchema(); try { rankProfileRegistry.get(s, "test").compile(new QueryProfileRegistry(), new ImportedMlModels()); fail("Should have caused an exception"); @@ -125,7 +125,7 @@ public class RankingExpressionConstantsTestCase extends AbstractSchemaTestCase { @Test public void testNegativeLiteralArgument() throws ParseException { RankProfileRegistry rankProfileRegistry = new RankProfileRegistry(); - SearchBuilder builder = new SearchBuilder(rankProfileRegistry); + SchemaBuilder builder = new SchemaBuilder(rankProfileRegistry); builder.importString( "search test {\n" + " document test { \n" + @@ -142,7 +142,7 @@ public class RankingExpressionConstantsTestCase extends AbstractSchemaTestCase { "\n" + "}\n"); builder.build(); - Schema s = builder.getSearch(); + Schema s = builder.getSchema(); RankProfile profile = rankProfileRegistry.get(s, "test"); assertEquals("safeLog(popShareSlowDecaySignal,-9.21034037)", profile.getFunctions().get("POP_SLOW_SCORE").function().getBody().getRoot().toString()); } @@ -150,7 +150,7 @@ public class RankingExpressionConstantsTestCase extends AbstractSchemaTestCase { @Test public void testNegativeConstantArgument() throws ParseException { RankProfileRegistry rankProfileRegistry = new RankProfileRegistry(); - SearchBuilder builder = new SearchBuilder(rankProfileRegistry); + SchemaBuilder builder = new SchemaBuilder(rankProfileRegistry); builder.importString( "search test {\n" + " document test { \n" + @@ -170,7 +170,7 @@ public class RankingExpressionConstantsTestCase extends AbstractSchemaTestCase { "\n" + "}\n"); builder.build(); - Schema s = builder.getSearch(); + Schema s = builder.getSchema(); RankProfile profile = rankProfileRegistry.get(s, "test"); assertEquals("safeLog(popShareSlowDecaySignal,myValue)", profile.getFunctions().get("POP_SLOW_SCORE").function().getBody().getRoot().toString()); assertEquals("safeLog(popShareSlowDecaySignal,-9.21034037)", @@ -180,7 +180,7 @@ public class RankingExpressionConstantsTestCase extends AbstractSchemaTestCase { @Test public void testConstantDivisorInFunction() throws ParseException { RankProfileRegistry rankProfileRegistry = new RankProfileRegistry(); - SearchBuilder builder = new SearchBuilder(rankProfileRegistry); + SchemaBuilder builder = new SchemaBuilder(rankProfileRegistry); builder.importString( "search test {\n" + " document test { \n" + @@ -194,7 +194,7 @@ public class RankingExpressionConstantsTestCase extends AbstractSchemaTestCase { "\n" + "}\n"); builder.build(); - Schema s = builder.getSearch(); + Schema s = builder.getSchema(); RankProfile profile = rankProfileRegistry.get(s, "test"); assertEquals("k1 + (k2 + k3) / 100000000.0", profile.compile(new QueryProfileRegistry(), new ImportedMlModels()).getFunctions().get("rank_default").function().getBody().getRoot().toString()); @@ -203,7 +203,7 @@ public class RankingExpressionConstantsTestCase extends AbstractSchemaTestCase { @Test public void test3() throws ParseException { RankProfileRegistry rankProfileRegistry = new RankProfileRegistry(); - SearchBuilder builder = new SearchBuilder(rankProfileRegistry); + SchemaBuilder builder = new SchemaBuilder(rankProfileRegistry); builder.importString( "search test {\n" + " document test { \n" + @@ -220,7 +220,7 @@ public class RankingExpressionConstantsTestCase extends AbstractSchemaTestCase { "\n" + "}\n"); builder.build(); - Schema s = builder.getSearch(); + Schema s = builder.getSchema(); RankProfile profile = rankProfileRegistry.get(s, "test"); assertEquals("0.5 + 50 * (attribute(rating_yelp) - 3)", profile.compile(new QueryProfileRegistry(), new ImportedMlModels()).getFunctions().get("rank_default").function().getBody().getRoot().toString()); |