diff options
Diffstat (limited to 'config-model/src')
15 files changed, 58 insertions, 57 deletions
diff --git a/config-model/src/main/java/com/yahoo/schema/ApplicationBuilder.java b/config-model/src/main/java/com/yahoo/schema/ApplicationBuilder.java index 894415091e4..f002676f05d 100644 --- a/config-model/src/main/java/com/yahoo/schema/ApplicationBuilder.java +++ b/config-model/src/main/java/com/yahoo/schema/ApplicationBuilder.java @@ -34,7 +34,7 @@ import java.util.Set; /** * Application builder. Usage: * 1) Add all schemas, using the addXXX() methods, - * 2) provide the available rank types and rank expressions, using the setRankXXX() methods, + * 2) provide the available rank types and ranking expressions, using the setRankXXX() methods, * 3) invoke the {@link #build} method * * @author bratseth diff --git a/config-model/src/main/java/com/yahoo/schema/ImmutableSchema.java b/config-model/src/main/java/com/yahoo/schema/ImmutableSchema.java index c352d9c417f..82583addb9b 100644 --- a/config-model/src/main/java/com/yahoo/schema/ImmutableSchema.java +++ b/config-model/src/main/java/com/yahoo/schema/ImmutableSchema.java @@ -36,7 +36,7 @@ public interface ImmutableSchema { DeployLogger getDeployLogger(); ModelContext.Properties getDeployProperties(); Map<Reference, RankProfile.Constant> constants(); - LargeRankExpressions rankExpressionFiles(); + LargeRankingExpressions rankExpressionFiles(); Map<String, OnnxModel> onnxModels(); Stream<ImmutableSDField> allImportedFields(); SDDocumentType getDocument(); diff --git a/config-model/src/main/java/com/yahoo/schema/LargeRankExpressions.java b/config-model/src/main/java/com/yahoo/schema/LargeRankingExpressions.java index cfdd4729b97..2ae9041b1a2 100644 --- a/config-model/src/main/java/com/yahoo/schema/LargeRankExpressions.java +++ b/config-model/src/main/java/com/yahoo/schema/LargeRankingExpressions.java @@ -8,43 +8,44 @@ import java.util.Map; import java.util.concurrent.ConcurrentHashMap; import java.util.stream.Collectors; -public class LargeRankExpressions { - private final Map<String, RankExpressionBody> expressions = new ConcurrentHashMap<>(); +public class LargeRankingExpressions { + + private final Map<String, RankingExpressionBody> expressions = new ConcurrentHashMap<>(); private final FileRegistry fileRegistry; private final int limit; - public LargeRankExpressions(FileRegistry fileRegistry) { + public LargeRankingExpressions(FileRegistry fileRegistry) { this(fileRegistry, 8192); } - public LargeRankExpressions(FileRegistry fileRegistry, int limit) { + public LargeRankingExpressions(FileRegistry fileRegistry, int limit) { this.fileRegistry = fileRegistry; this.limit = limit; } - public void add(RankExpressionBody expression) { + public void add(RankingExpressionBody expression) { String name = expression.getName(); - RankExpressionBody prev = expressions.putIfAbsent(name, expression); + RankingExpressionBody prev = expressions.putIfAbsent(name, expression); if (prev == null) { expression.validate(); expression.register(fileRegistry); } else { if ( ! prev.getBlob().equals(expression.getBlob())) { - throw new IllegalArgumentException("Rank expression '" + name + - "' defined twice. Previous blob with " + prev.getBlob().remaining() + - " bytes, while current has " + expression.getBlob().remaining() + " bytes"); + throw new IllegalArgumentException("Ranking expression '" + name + + "' defined twice. Previous blob with " + prev.getBlob().remaining() + + " bytes, while current has " + expression.getBlob().remaining() + " bytes"); } } } public int limit() { return limit; } /** Returns a read-only list of ranking constants ordered by name */ - public Collection<RankExpressionBody> expressions() { + public Collection<RankingExpressionBody> expressions() { return expressions.values().stream().sorted().collect(Collectors.toUnmodifiableList()); } // Note: Use by integration tests in internal repo /** Returns a read-only map of the ranking constants in this indexed by name */ - public Map<String, RankExpressionBody> asMap() { + public Map<String, RankingExpressionBody> asMap() { return Collections.unmodifiableMap(expressions); } diff --git a/config-model/src/main/java/com/yahoo/schema/RankExpressionBody.java b/config-model/src/main/java/com/yahoo/schema/RankingExpressionBody.java index d383a25aecb..89fad690ca2 100644 --- a/config-model/src/main/java/com/yahoo/schema/RankExpressionBody.java +++ b/config-model/src/main/java/com/yahoo/schema/RankingExpressionBody.java @@ -7,11 +7,11 @@ import java.nio.ByteBuffer; import static java.util.Objects.requireNonNull; -public class RankExpressionBody extends DistributableResource { +public class RankingExpressionBody extends DistributableResource { private final ByteBuffer blob; - public RankExpressionBody(String name, ByteBuffer blob) { + public RankingExpressionBody(String name, ByteBuffer blob) { super(name, name + ".lz4", PathType.BLOB); this.blob = requireNonNull(blob, "Blob cannot be null"); } diff --git a/config-model/src/main/java/com/yahoo/schema/Schema.java b/config-model/src/main/java/com/yahoo/schema/Schema.java index c1556bcfccc..180c8e6012f 100644 --- a/config-model/src/main/java/com/yahoo/schema/Schema.java +++ b/config-model/src/main/java/com/yahoo/schema/Schema.java @@ -83,8 +83,8 @@ public class Schema implements ImmutableSchema { /** The explicitly defined summaries of this schema. _Must_ preserve order. */ private final Map<String, DocumentSummary> summaries = new LinkedHashMap<>(); - /** External rank expression files of this */ - private final LargeRankExpressions largeRankExpressions; + /** External ranking expression files of this */ + private final LargeRankingExpressions largeRankingExpressions; /** Constants that will be available in all rank profiles. */ // TODO: Remove on Vespa 9: Should always be in a rank profile @@ -150,7 +150,7 @@ public class Schema implements ImmutableSchema { this.deployLogger = deployLogger; this.properties = properties; this.documentsOnly = documentsOnly; - largeRankExpressions = new LargeRankExpressions(fileRegistry); + largeRankingExpressions = new LargeRankingExpressions(fileRegistry); } /** @@ -223,7 +223,7 @@ public class Schema implements ImmutableSchema { } @Override - public LargeRankExpressions rankExpressionFiles() { return largeRankExpressions; } + public LargeRankingExpressions rankExpressionFiles() { return largeRankingExpressions; } public void add(RankProfile.Constant constant) { constants.put(constant.name(), constant); diff --git a/config-model/src/main/java/com/yahoo/schema/derived/RankProfileList.java b/config-model/src/main/java/com/yahoo/schema/derived/RankProfileList.java index c549f9af7ce..27e6d6e57a6 100644 --- a/config-model/src/main/java/com/yahoo/schema/derived/RankProfileList.java +++ b/config-model/src/main/java/com/yahoo/schema/derived/RankProfileList.java @@ -5,7 +5,7 @@ import ai.vespa.rankingexpression.importer.configmodelview.ImportedMlModels; import com.yahoo.config.model.api.ModelContext; import com.yahoo.config.model.deploy.DeployState; import com.yahoo.search.query.profile.QueryProfileRegistry; -import com.yahoo.schema.LargeRankExpressions; +import com.yahoo.schema.LargeRankingExpressions; import com.yahoo.schema.OnnxModel; import com.yahoo.schema.RankProfileRegistry; import com.yahoo.searchlib.rankingexpression.Reference; @@ -36,14 +36,14 @@ public class RankProfileList extends Derived implements RankProfilesConfig.Produ private final Map<String, RawRankProfile> rankProfiles; private final FileDistributedConstants constants; - private final LargeRankExpressions largeRankExpressions; + private final LargeRankingExpressions largeRankingExpressions; private final FileDistributedOnnxModels onnxModels; public static final RankProfileList empty = new RankProfileList(); private RankProfileList() { constants = new FileDistributedConstants(null, List.of()); - largeRankExpressions = new LargeRankExpressions(null); + largeRankingExpressions = new LargeRankingExpressions(null); onnxModels = new FileDistributedOnnxModels(null, List.of()); rankProfiles = Map.of(); } @@ -55,11 +55,11 @@ public class RankProfileList extends Derived implements RankProfilesConfig.Produ * @param attributeFields the attribute fields to create a ranking for */ public RankProfileList(Schema schema, - LargeRankExpressions largeRankExpressions, + LargeRankingExpressions largeRankingExpressions, AttributeFields attributeFields, DeployState deployState) { setName(schema == null ? "default" : schema.getName()); - this.largeRankExpressions = largeRankExpressions; + this.largeRankingExpressions = largeRankingExpressions; this.rankProfiles = deriveRankProfiles(schema, attributeFields, deployState); this.constants = deriveFileDistributedConstants(schema, rankProfiles.values(), deployState); this.onnxModels = deriveFileDistributedOnnxModels(schema, rankProfiles.values(), deployState); @@ -77,7 +77,7 @@ public class RankProfileList extends Derived implements RankProfilesConfig.Produ Map<String, RawRankProfile> rawRankProfiles = new LinkedHashMap<>(); if (schema != null) { // profiles belonging to a schema have a default profile RawRankProfile rawRank = new RawRankProfile(deployState.rankProfileRegistry().get(schema, "default"), - largeRankExpressions, + largeRankingExpressions, deployState.getQueryProfiles().getRegistry(), deployState.getImportedModels(), attributeFields, @@ -113,8 +113,8 @@ public class RankProfileList extends Derived implements RankProfilesConfig.Produ ExecutorService executor) { Map<String, Future<RawRankProfile>> futureRawRankProfiles = new LinkedHashMap<>(); for (RankProfile profile : profiles) { - futureRawRankProfiles.put(profile.name(), executor.submit(() -> new RawRankProfile(profile, largeRankExpressions, queryProfiles, importedModels, - attributeFields, deployProperties))); + futureRawRankProfiles.put(profile.name(), executor.submit(() -> new RawRankProfile(profile, largeRankingExpressions, queryProfiles, importedModels, + attributeFields, deployProperties))); } try { Map<String, RawRankProfile> rawRankProfiles = new LinkedHashMap<>(); @@ -196,7 +196,7 @@ public class RankProfileList extends Derived implements RankProfilesConfig.Produ } public void getConfig(RankingExpressionsConfig.Builder builder) { - largeRankExpressions.expressions().forEach((expr) -> builder.expression.add(new RankingExpressionsConfig.Expression.Builder().name(expr.getName()).fileref(expr.getFileReference()))); + largeRankingExpressions.expressions().forEach((expr) -> builder.expression.add(new RankingExpressionsConfig.Expression.Builder().name(expr.getName()).fileref(expr.getFileReference()))); } public void getConfig(RankingConstantsConfig.Builder builder) { diff --git a/config-model/src/main/java/com/yahoo/schema/derived/RawRankProfile.java b/config-model/src/main/java/com/yahoo/schema/derived/RawRankProfile.java index 11af3b0bf78..59f4035f34f 100644 --- a/config-model/src/main/java/com/yahoo/schema/derived/RawRankProfile.java +++ b/config-model/src/main/java/com/yahoo/schema/derived/RawRankProfile.java @@ -9,8 +9,8 @@ import com.yahoo.config.model.api.ModelContext; import com.yahoo.search.query.profile.QueryProfileRegistry; import com.yahoo.schema.FeatureNames; import com.yahoo.schema.OnnxModel; -import com.yahoo.schema.LargeRankExpressions; -import com.yahoo.schema.RankExpressionBody; +import com.yahoo.schema.LargeRankingExpressions; +import com.yahoo.schema.RankingExpressionBody; import com.yahoo.schema.document.RankType; import com.yahoo.schema.RankProfile; import com.yahoo.schema.expressiontransforms.OnnxModelTransformer; @@ -60,7 +60,7 @@ public class RawRankProfile implements RankProfilesConfig.Producer { private final Collection<OnnxModel> onnxModels; /** Creates a raw rank profile from the given rank profile. */ - public RawRankProfile(RankProfile rankProfile, LargeRankExpressions largeExpressions, + public RawRankProfile(RankProfile rankProfile, LargeRankingExpressions largeExpressions, QueryProfileRegistry queryProfiles, ImportedMlModels importedModels, AttributeFields attributeFields, ModelContext.Properties deployProperties) { this.name = rankProfile.name(); @@ -344,7 +344,7 @@ public class RawRankProfile implements RankProfilesConfig.Producer { } /** Derives the properties this produces */ - public List<Pair<String, String>> derive(LargeRankExpressions largeRankExpressions) { + public List<Pair<String, String>> derive(LargeRankingExpressions largeRankingExpressions) { List<Pair<String, String>> properties = new ArrayList<>(); for (RankProfile.RankProperty property : rankProperties) { if (RankingExpression.propertyName(RankProfile.FIRST_PHASE).equals(property.getName())) { @@ -453,20 +453,20 @@ public class RawRankProfile implements RankProfilesConfig.Producer { } } if (properties.size() >= 1000000) throw new IllegalArgumentException("Too many rank properties"); - distributeLargeExpressionsAsFiles(properties, largeRankExpressions); + distributeLargeExpressionsAsFiles(properties, largeRankingExpressions); return properties; } - private void distributeLargeExpressionsAsFiles(List<Pair<String, String>> properties, LargeRankExpressions largeRankExpressions) { + private void distributeLargeExpressionsAsFiles(List<Pair<String, String>> properties, LargeRankingExpressions largeRankingExpressions) { for (ListIterator<Pair<String, String>> iter = properties.listIterator(); iter.hasNext();) { Pair<String, String> property = iter.next(); String expression = property.getSecond(); - if (expression.length() > largeRankExpressions.limit()) { + if (expression.length() > largeRankingExpressions.limit()) { String propertyName = property.getFirst(); String functionName = RankingExpression.extractScriptName(propertyName); if (functionName != null) { String mangledName = rankprofileName + "." + functionName; - largeRankExpressions.add(new RankExpressionBody(mangledName, ByteBuffer.wrap(expression.getBytes(StandardCharsets.UTF_8)))); + largeRankingExpressions.add(new RankingExpressionBody(mangledName, ByteBuffer.wrap(expression.getBytes(StandardCharsets.UTF_8)))); iter.set(new Pair<>(RankingExpression.propertyExpressionName(functionName), mangledName)); } } diff --git a/config-model/src/main/java/com/yahoo/vespa/model/VespaModel.java b/config-model/src/main/java/com/yahoo/vespa/model/VespaModel.java index 9bb03d3f07c..c9b462ce30b 100644 --- a/config-model/src/main/java/com/yahoo/vespa/model/VespaModel.java +++ b/config-model/src/main/java/com/yahoo/vespa/model/VespaModel.java @@ -26,7 +26,7 @@ import com.yahoo.config.provision.AllocatedHosts; import com.yahoo.config.provision.ClusterSpec; import com.yahoo.container.QrConfig; import com.yahoo.path.Path; -import com.yahoo.schema.LargeRankExpressions; +import com.yahoo.schema.LargeRankingExpressions; import com.yahoo.schema.OnnxModel; import com.yahoo.schema.RankProfile; import com.yahoo.schema.RankProfileRegistry; @@ -164,7 +164,7 @@ public final class VespaModel extends AbstractConfigProducerRoot implements Mode createGlobalRankProfiles(deployState); rankProfileList = new RankProfileList(null, // null search -> global - new LargeRankExpressions(deployState.getFileRegistry()), + new LargeRankingExpressions(deployState.getFileRegistry()), AttributeFields.empty, deployState); diff --git a/config-model/src/main/java/com/yahoo/vespa/model/application/validation/RankSetupValidator.java b/config-model/src/main/java/com/yahoo/vespa/model/application/validation/RankSetupValidator.java index 5c531d28a8e..276092e61f4 100644 --- a/config-model/src/main/java/com/yahoo/vespa/model/application/validation/RankSetupValidator.java +++ b/config-model/src/main/java/com/yahoo/vespa/model/application/validation/RankSetupValidator.java @@ -64,7 +64,7 @@ public class RankSetupValidator extends Validator { ".") .toFile(); for (SearchCluster cluster : model.getSearchClusters()) { - // Skipping rank expression checking for streaming clusters, not implemented yet + // Skipping rannking expression checking for streaming clusters, not implemented yet if (cluster.isStreaming()) continue; IndexedSearchCluster sc = (IndexedSearchCluster) cluster; @@ -188,7 +188,7 @@ public class RankSetupValidator extends Validator { private void validateWarn(Exception e, DeployLogger deployLogger) { String msg = "Unable to execute '" + binaryName + - "', validation of rank expressions will only take place when you start Vespa: " + + "', validation of ranking expressions will only take place when you start Vespa: " + Exceptions.toMessageString(e); deployLogger.logApplicationPackage(Level.WARNING, msg); } 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/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(); |