diff options
author | Jon Bratseth <bratseth@gmail.com> | 2022-09-29 12:20:24 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-29 12:20:24 +0200 |
commit | 62928f4d8b7571c4b10fedffc56b762f57b6b2ca (patch) | |
tree | 533c53bfe302e9d2b0c667a6fa3c9951d6f55aea /config-model/src/test | |
parent | 8d21d066068350bbc3797f263e7b33c932a42c0e (diff) | |
parent | 19b596870cc90acf6edac347d9f1ed3032983d7c (diff) |
Merge pull request #24254 from vespa-engine/bratseth/consistent-terminology
Use consistent terminology
Diffstat (limited to 'config-model/src/test')
7 files changed, 18 insertions, 18 deletions
diff --git a/config-model/src/test/java/com/yahoo/schema/RankProfileTestCase.java b/config-model/src/test/java/com/yahoo/schema/RankProfileTestCase.java index ddca13a2984..51d19283b1e 100644 --- a/config-model/src/test/java/com/yahoo/schema/RankProfileTestCase.java +++ b/config-model/src/test/java/com/yahoo/schema/RankProfileTestCase.java @@ -258,7 +258,7 @@ public class RankProfileTestCase extends AbstractSchemaTestCase { assertEquals(8, rankProfile.getNumThreadsPerSearch()); assertEquals(70, rankProfile.getMinHitsPerThread()); assertEquals(1200, rankProfile.getNumSearchPartitions()); - RawRankProfile rawRankProfile = new RawRankProfile(rankProfile, new LargeRankExpressions(new MockFileRegistry()), new QueryProfileRegistry(), + RawRankProfile rawRankProfile = new RawRankProfile(rankProfile, new LargeRankingExpressions(new MockFileRegistry()), new QueryProfileRegistry(), new ImportedMlModels(), attributeFields, deployProperties); if (expectedTermwiseLimit != null) { assertTrue(findProperty(rawRankProfile.configProperties(), "vespa.matching.termwise_limit").isPresent()); @@ -317,7 +317,7 @@ public class RankProfileTestCase extends AbstractSchemaTestCase { } private static RawRankProfile createRawRankProfile(RankProfile profile, Schema schema) { - return new RawRankProfile(profile, new LargeRankExpressions(new MockFileRegistry()), new QueryProfileRegistry(), new ImportedMlModels(), new AttributeFields(schema), new TestProperties()); + return new RawRankProfile(profile, new LargeRankingExpressions(new MockFileRegistry()), new QueryProfileRegistry(), new ImportedMlModels(), new AttributeFields(schema), new TestProperties()); } private static void assertAttributeTypeSettings(RankProfile profile, Schema schema) { @@ -398,8 +398,8 @@ public class RankProfileTestCase extends AbstractSchemaTestCase { var schema = builder.getSchema(); var rankProfile = rankProfileRegistry.get(schema, "my_profile"); - var rawRankProfile = new RawRankProfile(rankProfile, new LargeRankExpressions(new MockFileRegistry()), queryProfileRegistry, - new ImportedMlModels(), new AttributeFields(schema), props); + var rawRankProfile = new RawRankProfile(rankProfile, new LargeRankingExpressions(new MockFileRegistry()), queryProfileRegistry, + new ImportedMlModels(), new AttributeFields(schema), props); if (postFilterThreshold != null) { assertEquals((double)postFilterThreshold, rankProfile.getPostFilterThreshold().getAsDouble(), 0.000001); diff --git a/config-model/src/test/java/com/yahoo/schema/RankPropertiesTestCase.java b/config-model/src/test/java/com/yahoo/schema/RankPropertiesTestCase.java index b538d834df9..a19918d83d2 100644 --- a/config-model/src/test/java/com/yahoo/schema/RankPropertiesTestCase.java +++ b/config-model/src/test/java/com/yahoo/schema/RankPropertiesTestCase.java @@ -58,7 +58,7 @@ public class RankPropertiesTestCase extends AbstractSchemaTestCase { assertEquals("query(a) = 1500", parent.getRankProperties().get(0).toString()); // Check derived model - RawRankProfile rawParent = new RawRankProfile(parent, new LargeRankExpressions(new MockFileRegistry()), new QueryProfileRegistry(), new ImportedMlModels(), attributeFields, new TestProperties()); + RawRankProfile rawParent = new RawRankProfile(parent, new LargeRankingExpressions(new MockFileRegistry()), new QueryProfileRegistry(), new ImportedMlModels(), attributeFields, new TestProperties()); assertEquals("(query(a), 1500)", rawParent.configProperties().get(0).toString()); } @@ -69,7 +69,7 @@ public class RankPropertiesTestCase extends AbstractSchemaTestCase { // Check derived model RawRankProfile rawChild = new RawRankProfile(rankProfileRegistry.get(schema, "child"), - new LargeRankExpressions(new MockFileRegistry()), + new LargeRankingExpressions(new MockFileRegistry()), new QueryProfileRegistry(), new ImportedMlModels(), attributeFields, @@ -185,7 +185,7 @@ public class RankPropertiesTestCase extends AbstractSchemaTestCase { assertEquals("-=1", operations.get(3).operation); AttributeFields attributeFields = new AttributeFields(schema); - RawRankProfile raw = new RawRankProfile(a, new LargeRankExpressions(new MockFileRegistry()), new QueryProfileRegistry(), new ImportedMlModels(), attributeFields, new TestProperties()); + RawRankProfile raw = new RawRankProfile(a, new LargeRankingExpressions(new MockFileRegistry()), new QueryProfileRegistry(), new ImportedMlModels(), attributeFields, new TestProperties()); assertEquals(9, raw.configProperties().size()); assertEquals("(vespa.mutate.on_match.attribute, synthetic_attribute_a)", raw.configProperties().get(0).toString()); assertEquals("(vespa.mutate.on_match.operation, +=7)", raw.configProperties().get(1).toString()); diff --git a/config-model/src/test/java/com/yahoo/schema/RankingExpressionConstantsTestCase.java b/config-model/src/test/java/com/yahoo/schema/RankingExpressionConstantsTestCase.java index c915a85a4cf..cbacfb502c9 100644 --- a/config-model/src/test/java/com/yahoo/schema/RankingExpressionConstantsTestCase.java +++ b/config-model/src/test/java/com/yahoo/schema/RankingExpressionConstantsTestCase.java @@ -80,7 +80,7 @@ public class RankingExpressionConstantsTestCase extends AbstractSchemaTestCase { assertEquals("16.6", child2.getFirstPhaseRanking().getRoot().toString()); assertEquals("foo: 14.0", child2.getFunctions().get("foo").function().getBody().toString()); List<Pair<String, String>> rankProperties = new RawRankProfile(child2, - new LargeRankExpressions(new MockFileRegistry()), + new LargeRankingExpressions(new MockFileRegistry()), queryProfileRegistry, new ImportedMlModels(), new AttributeFields(s), diff --git a/config-model/src/test/java/com/yahoo/schema/RankingExpressionInliningTestCase.java b/config-model/src/test/java/com/yahoo/schema/RankingExpressionInliningTestCase.java index 13d21884c7d..7b890eec9e9 100644 --- a/config-model/src/test/java/com/yahoo/schema/RankingExpressionInliningTestCase.java +++ b/config-model/src/test/java/com/yahoo/schema/RankingExpressionInliningTestCase.java @@ -276,7 +276,7 @@ public class RankingExpressionInliningTestCase extends AbstractSchemaTestCase { private String getRankingExpression(String name, RankProfile rankProfile, Schema schema) { Optional<String> rankExpression = - new RawRankProfile(rankProfile, new LargeRankExpressions(new MockFileRegistry()), new QueryProfileRegistry(), new ImportedMlModels(), new AttributeFields(schema), new TestProperties()) + new RawRankProfile(rankProfile, new LargeRankingExpressions(new MockFileRegistry()), new QueryProfileRegistry(), new ImportedMlModels(), new AttributeFields(schema), new TestProperties()) .configProperties() .stream() .filter(r -> r.getFirst().equals("rankingExpression(" + name + ").rankingScript")) diff --git a/config-model/src/test/java/com/yahoo/schema/RankingExpressionShadowingTestCase.java b/config-model/src/test/java/com/yahoo/schema/RankingExpressionShadowingTestCase.java index 33bbdb2fd6f..d420772bc74 100644 --- a/config-model/src/test/java/com/yahoo/schema/RankingExpressionShadowingTestCase.java +++ b/config-model/src/test/java/com/yahoo/schema/RankingExpressionShadowingTestCase.java @@ -215,7 +215,7 @@ public class RankingExpressionShadowingTestCase extends AbstractSchemaTestCase { private static RawRankProfile createRawRankProfile(RankProfile profile, QueryProfileRegistry queryProfiles, Schema schema) { return new RawRankProfile(profile, - new LargeRankExpressions(new MockFileRegistry()), + new LargeRankingExpressions(new MockFileRegistry()), queryProfiles, new ImportedMlModels(), new AttributeFields(schema), diff --git a/config-model/src/test/java/com/yahoo/schema/processing/RankingExpressionsTestCase.java b/config-model/src/test/java/com/yahoo/schema/processing/RankingExpressionsTestCase.java index 526576c9e0b..e5d27a55c9c 100644 --- a/config-model/src/test/java/com/yahoo/schema/processing/RankingExpressionsTestCase.java +++ b/config-model/src/test/java/com/yahoo/schema/processing/RankingExpressionsTestCase.java @@ -6,7 +6,7 @@ import com.yahoo.config.model.api.ModelContext; import com.yahoo.config.model.application.provider.MockFileRegistry; import com.yahoo.config.model.deploy.TestProperties; import com.yahoo.search.query.profile.QueryProfileRegistry; -import com.yahoo.schema.LargeRankExpressions; +import com.yahoo.schema.LargeRankingExpressions; import com.yahoo.schema.RankProfile; import com.yahoo.schema.RankProfileRegistry; import com.yahoo.schema.Schema; @@ -50,8 +50,8 @@ public class RankingExpressionsTestCase extends AbstractSchemaTestCase { functions.get("artistmatch").function().getBody().getRoot().toString()); assertEquals(0, functions.get("artistmatch").function().arguments().size()); - RawRankProfile rawRankProfile = new RawRankProfile(functionsRankProfile, new LargeRankExpressions(new MockFileRegistry()), new QueryProfileRegistry(), - new ImportedMlModels(), new AttributeFields(schema), deployProperties); + RawRankProfile rawRankProfile = new RawRankProfile(functionsRankProfile, new LargeRankingExpressions(new MockFileRegistry()), new QueryProfileRegistry(), + new ImportedMlModels(), new AttributeFields(schema), deployProperties); List<Pair<String, String>> rankProperties = rawRankProfile.configProperties(); assertEquals(6, rankProperties.size()); @@ -81,7 +81,7 @@ public class RankingExpressionsTestCase extends AbstractSchemaTestCase { } private void verifyProfile(RankProfile profile, List<String> expectedFunctions, List<Pair<String, String>> rankProperties, - LargeRankExpressions largeExpressions, QueryProfileRegistry queryProfiles, ImportedMlModels models, + LargeRankingExpressions largeExpressions, QueryProfileRegistry queryProfiles, ImportedMlModels models, AttributeFields attributes, ModelContext.Properties properties) { var functions = profile.getFunctions(); assertEquals(expectedFunctions.size(), functions.size()); @@ -97,7 +97,7 @@ public class RankingExpressionsTestCase extends AbstractSchemaTestCase { } } - private void verifySearch(Schema schema, RankProfileRegistry rankProfileRegistry, LargeRankExpressions largeExpressions, + private void verifySearch(Schema schema, RankProfileRegistry rankProfileRegistry, LargeRankingExpressions largeExpressions, QueryProfileRegistry queryProfiles, ImportedMlModels models, ModelContext.Properties properties) { AttributeFields attributes = new AttributeFields(schema); @@ -118,7 +118,7 @@ public class RankingExpressionsTestCase extends AbstractSchemaTestCase { void testLargeInheritedFunctions() throws IOException, ParseException { ModelContext.Properties properties = new TestProperties(); RankProfileRegistry rankProfileRegistry = new RankProfileRegistry(); - LargeRankExpressions largeExpressions = new LargeRankExpressions(new MockFileRegistry(), 50); + LargeRankingExpressions largeExpressions = new LargeRankingExpressions(new MockFileRegistry(), 50); QueryProfileRegistry queryProfiles = new QueryProfileRegistry(); ImportedMlModels models = new ImportedMlModels(); Schema schema = createSearch("src/test/examples/largerankingexpressions", properties, rankProfileRegistry); diff --git a/config-model/src/test/java/com/yahoo/schema/processing/TensorTransformTestCase.java b/config-model/src/test/java/com/yahoo/schema/processing/TensorTransformTestCase.java index 028ad5dea86..aefcea95713 100644 --- a/config-model/src/test/java/com/yahoo/schema/processing/TensorTransformTestCase.java +++ b/config-model/src/test/java/com/yahoo/schema/processing/TensorTransformTestCase.java @@ -10,7 +10,7 @@ import com.yahoo.search.query.profile.types.FieldDescription; import com.yahoo.search.query.profile.types.FieldType; import com.yahoo.search.query.profile.types.QueryProfileType; import com.yahoo.search.query.profile.types.QueryProfileTypeRegistry; -import com.yahoo.schema.LargeRankExpressions; +import com.yahoo.schema.LargeRankingExpressions; import com.yahoo.schema.RankProfile; import com.yahoo.schema.RankProfileRegistry; import com.yahoo.schema.Schema; @@ -197,7 +197,7 @@ public class TensorTransformTestCase extends AbstractSchemaTestCase { Schema s = builder.getSchema(); RankProfile test = rankProfileRegistry.get(s, "test").compile(queryProfiles, new ImportedMlModels()); List<Pair<String, String>> testRankProperties = new RawRankProfile(test, - new LargeRankExpressions(new MockFileRegistry()), + new LargeRankingExpressions(new MockFileRegistry()), queryProfiles, new ImportedMlModels(), new AttributeFields(s), new TestProperties()).configProperties(); |