diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2021-06-10 00:05:23 +0200 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2021-06-10 00:29:22 +0200 |
commit | 9d0218f6ceeb987b6b16bd097839969092d6310c (patch) | |
tree | df9185e17ca73c202f48ea8955b558bec8ecf11d /config-model/src | |
parent | 2a2f3144d8a65302843202156aa0109f583eae75 (diff) |
Rename RankExpressionFiles -> LargeRankExpressions and RankExpressionFile -> RankExpressionBody.
Diffstat (limited to 'config-model/src')
13 files changed, 92 insertions, 111 deletions
diff --git a/config-model/src/main/java/com/yahoo/searchdefinition/DistributableResource.java b/config-model/src/main/java/com/yahoo/searchdefinition/DistributableResource.java index 60431c156fd..ffa9cbe9ba5 100644 --- a/config-model/src/main/java/com/yahoo/searchdefinition/DistributableResource.java +++ b/config-model/src/main/java/com/yahoo/searchdefinition/DistributableResource.java @@ -52,7 +52,6 @@ public class DistributableResource { this.pathType = PathType.URI; } - protected void setFileReference(String fileReference) { this.fileReference = fileReference; } /** Initiate sending of this constant to some services over file distribution */ public void sendTo(Collection<? extends AbstractService> services) { fileReference = sendToServices(services).value(); diff --git a/config-model/src/main/java/com/yahoo/searchdefinition/ImmutableSearch.java b/config-model/src/main/java/com/yahoo/searchdefinition/ImmutableSearch.java index 6b40289e17d..24bc081aded 100644 --- a/config-model/src/main/java/com/yahoo/searchdefinition/ImmutableSearch.java +++ b/config-model/src/main/java/com/yahoo/searchdefinition/ImmutableSearch.java @@ -32,7 +32,7 @@ public interface ImmutableSearch { DeployLogger getDeployLogger(); ModelContext.Properties getDeployProperties(); RankingConstants rankingConstants(); - RankExpressionFiles rankExpressionFiles(); + LargeRankExpressions rankExpressionFiles(); OnnxModels onnxModels(); Stream<ImmutableSDField> allImportedFields(); diff --git a/config-model/src/main/java/com/yahoo/searchdefinition/LargeRankExpressions.java b/config-model/src/main/java/com/yahoo/searchdefinition/LargeRankExpressions.java new file mode 100644 index 00000000000..6fadcb39d11 --- /dev/null +++ b/config-model/src/main/java/com/yahoo/searchdefinition/LargeRankExpressions.java @@ -0,0 +1,38 @@ +package com.yahoo.searchdefinition; + +import com.yahoo.vespa.model.AbstractService; + +import java.util.Collection; +import java.util.Collections; +import java.util.HashMap; +import java.util.Map; + +public class LargeRankExpressions { + private final Map<String, RankExpressionBody> expressions = new HashMap<>(); + + public void add(RankExpressionBody expression) { + expression.validate(); + String name = expression.getName(); + if (expressions.containsKey(name)) { + throw new IllegalArgumentException("Rank expression '" + name + + "' defined twice. Previous blob with " + expressions.get(name).getBlob().remaining() + + " bytes, while current has " + expression.getBlob().remaining() + " bytes"); + } + expressions.put(name, expression); + } + + /** Returns the ranking constant with the given name, or null if not present */ + public RankExpressionBody get(String name) { + return expressions.get(name); + } + + /** Returns a read-only map of the ranking constants in this indexed by name */ + public Map<String, RankExpressionBody> asMap() { + return Collections.unmodifiableMap(expressions); + } + + /** Initiate sending of these constants to some services over file distribution */ + public void sendTo(Collection<? extends AbstractService> services) { + expressions.values().forEach(constant -> constant.sendTo(services)); + } +} diff --git a/config-model/src/main/java/com/yahoo/searchdefinition/RankExpressionBody.java b/config-model/src/main/java/com/yahoo/searchdefinition/RankExpressionBody.java new file mode 100644 index 00000000000..8c6830de815 --- /dev/null +++ b/config-model/src/main/java/com/yahoo/searchdefinition/RankExpressionBody.java @@ -0,0 +1,10 @@ +package com.yahoo.searchdefinition; + +import java.nio.ByteBuffer; + +public class RankExpressionBody extends DistributableResource { + + public RankExpressionBody(String name, ByteBuffer body) { + super(name, body); + } +} diff --git a/config-model/src/main/java/com/yahoo/searchdefinition/RankExpressionFile.java b/config-model/src/main/java/com/yahoo/searchdefinition/RankExpressionFile.java deleted file mode 100644 index 56385efeb0b..00000000000 --- a/config-model/src/main/java/com/yahoo/searchdefinition/RankExpressionFile.java +++ /dev/null @@ -1,35 +0,0 @@ -package com.yahoo.searchdefinition; - -import com.yahoo.config.application.api.ApplicationPackage; -import com.yahoo.vespa.model.AbstractService; -import com.yahoo.vespa.model.utils.FileSender; - -import java.util.Collection; - -public class RankExpressionFile extends DistributableResource { - - public RankExpressionFile(String name, String path) { - super(name, path); - validate(); - } - - @Override - public void sendTo(Collection<? extends AbstractService> services) { - /* - * TODO This is a very dirty hack due to using both SEARCH_DEFINITIONS_DIR and SCHEMA_DIR - * and doing so inconsistently, combined with using both fields from application package on disk and in zookeeper. - * The mess is spread out nicely, but ZookeeperClient, and writeSearchDefinitions and ZkApplicationPackage and FilesApplicationPackage - * should be consolidated - */ - try { - setFileReference(FileSender.sendFileToServices(ApplicationPackage.SCHEMAS_DIR + "/" + getFileName(), services).value()); - } catch (IllegalArgumentException e1) { - try { - setFileReference(FileSender.sendFileToServices(ApplicationPackage.SEARCH_DEFINITIONS_DIR + "/" + getFileName(), services).value()); - } catch (IllegalArgumentException e2) { - throw new IllegalArgumentException("Failed to find expression file '" + getFileName() + "' in '" - + ApplicationPackage.SEARCH_DEFINITIONS_DIR + "' or '" + ApplicationPackage.SCHEMAS_DIR + "'.", e2); - } - } - } -} diff --git a/config-model/src/main/java/com/yahoo/searchdefinition/RankExpressionFiles.java b/config-model/src/main/java/com/yahoo/searchdefinition/RankExpressionFiles.java deleted file mode 100644 index 34ad912dd00..00000000000 --- a/config-model/src/main/java/com/yahoo/searchdefinition/RankExpressionFiles.java +++ /dev/null @@ -1,47 +0,0 @@ -package com.yahoo.searchdefinition; - -import com.yahoo.config.application.api.DeployLogger; -import com.yahoo.vespa.model.AbstractService; - -import java.util.Collection; -import java.util.Collections; -import java.util.HashMap; -import java.util.Map; -import java.util.logging.Level; - -public class RankExpressionFiles { - private final Map<String, RankExpressionFile> expressions = new HashMap<>(); - - //TODO Deploy logger should not be necessary, as redefinition is illegal, but legacy prevents enforcement starting now. - public void add(RankExpressionFile expression, DeployLogger deployLogger) { - expression.validate(); - String name = expression.getName(); - if (expressions.containsKey(name)) { - if ( expressions.get(name).getFileName().equals(expression.getFileName()) ) { - //TODO Throw instead, No later than Vespa 8 - deployLogger.logApplicationPackage(Level.WARNING, "Rank expression file '" + name + - "' defined twice with identical expression (illegal and will be enforced soon) '" + expression.getFileName() + "'."); - } else { - throw new IllegalArgumentException("Rank expression file '" + name + - "' defined twice (illegal but not enforced), but redefinition is not matching (illegal and enforced), " + - "previous = '" + expressions.get(name).getFileName() + "', new = '" + expression.getFileName() + "'."); - } - } - expressions.put(name, expression); - } - - /** Returns the ranking constant with the given name, or null if not present */ - public RankExpressionFile get(String name) { - return expressions.get(name); - } - - /** Returns a read-only map of the ranking constants in this indexed by name */ - public Map<String, RankExpressionFile> asMap() { - return Collections.unmodifiableMap(expressions); - } - - /** Initiate sending of these constants to some services over file distribution */ - public void sendTo(Collection<? extends AbstractService> services) { - expressions.values().forEach(constant -> constant.sendTo(services)); - } -} diff --git a/config-model/src/main/java/com/yahoo/searchdefinition/Search.java b/config-model/src/main/java/com/yahoo/searchdefinition/Search.java index f11afef0eb2..4b7b1625a01 100644 --- a/config-model/src/main/java/com/yahoo/searchdefinition/Search.java +++ b/config-model/src/main/java/com/yahoo/searchdefinition/Search.java @@ -83,7 +83,7 @@ public class Search implements ImmutableSearch { private final Map<String, DocumentSummary> summaries = new LinkedHashMap<>(); /** External rank expression files of this */ - private final RankExpressionFiles rankExpressionFiles = new RankExpressionFiles(); + private final LargeRankExpressions largeRankExpressions = new LargeRankExpressions(); /** Ranking constants of this */ private final RankingConstants rankingConstants = new RankingConstants(); @@ -188,7 +188,7 @@ public class Search implements ImmutableSearch { } @Override - public RankExpressionFiles rankExpressionFiles() { return rankExpressionFiles; } + public LargeRankExpressions rankExpressionFiles() { return largeRankExpressions; } @Override public RankingConstants rankingConstants() { return rankingConstants; } @@ -198,7 +198,7 @@ public class Search implements ImmutableSearch { public void sendTo(Collection<? extends AbstractService> services) { rankingConstants.sendTo(services); - rankExpressionFiles.sendTo(services); + largeRankExpressions.sendTo(services); onnxModels.sendTo(services); } diff --git a/config-model/src/main/java/com/yahoo/searchdefinition/derived/RankProfileList.java b/config-model/src/main/java/com/yahoo/searchdefinition/derived/RankProfileList.java index d414b9ed79f..7c533cce006 100644 --- a/config-model/src/main/java/com/yahoo/searchdefinition/derived/RankProfileList.java +++ b/config-model/src/main/java/com/yahoo/searchdefinition/derived/RankProfileList.java @@ -6,8 +6,7 @@ import com.yahoo.config.model.api.ModelContext; import com.yahoo.search.query.profile.QueryProfileRegistry; import com.yahoo.searchdefinition.OnnxModel; import com.yahoo.searchdefinition.OnnxModels; -import com.yahoo.searchdefinition.RankExpressionFile; -import com.yahoo.searchdefinition.RankExpressionFiles; +import com.yahoo.searchdefinition.LargeRankExpressions; import com.yahoo.searchdefinition.RankProfileRegistry; import com.yahoo.searchdefinition.RankingConstant; import com.yahoo.searchdefinition.RankingConstants; @@ -34,14 +33,14 @@ public class RankProfileList extends Derived implements RankProfilesConfig.Produ private final Map<String, RawRankProfile> rankProfiles = new java.util.LinkedHashMap<>(); private final RankingConstants rankingConstants; - private final RankExpressionFiles rankExpressionFiles; + private final LargeRankExpressions largeRankExpressions; private final OnnxModels onnxModels; public static RankProfileList empty = new RankProfileList(); private RankProfileList() { rankingConstants = new RankingConstants(); - rankExpressionFiles = new RankExpressionFiles(); + largeRankExpressions = new LargeRankExpressions(); onnxModels = new OnnxModels(); } @@ -53,7 +52,7 @@ public class RankProfileList extends Derived implements RankProfilesConfig.Produ */ public RankProfileList(Search search, RankingConstants rankingConstants, - RankExpressionFiles rankExpressionFiles, + LargeRankExpressions largeRankExpressions, AttributeFields attributeFields, RankProfileRegistry rankProfileRegistry, QueryProfileRegistry queryProfiles, @@ -61,7 +60,7 @@ public class RankProfileList extends Derived implements RankProfilesConfig.Produ ModelContext.Properties deployProperties) { setName(search == null ? "default" : search.getName()); this.rankingConstants = rankingConstants; - this.rankExpressionFiles = rankExpressionFiles; + this.largeRankExpressions = largeRankExpressions; onnxModels = search == null ? new OnnxModels() : search.onnxModels(); // as ONNX models come from parsing rank expressions deriveRankProfiles(rankProfileRegistry, queryProfiles, importedModels, search, attributeFields, deployProperties); } @@ -74,7 +73,8 @@ public class RankProfileList extends Derived implements RankProfilesConfig.Produ ModelContext.Properties deployProperties) { if (search != null) { // profiles belonging to a search have a default profile RawRankProfile defaultProfile = new RawRankProfile(rankProfileRegistry.get(search, "default"), - queryProfiles, importedModels, attributeFields, deployProperties); + largeRankExpressions, queryProfiles, importedModels, + attributeFields, deployProperties); rankProfiles.put(defaultProfile.getName(), defaultProfile); } @@ -84,7 +84,8 @@ public class RankProfileList extends Derived implements RankProfilesConfig.Produ this.onnxModels.add(rank.onnxModels()); } - RawRankProfile rawRank = new RawRankProfile(rank, queryProfiles, importedModels, attributeFields, deployProperties); + RawRankProfile rawRank = new RawRankProfile(rank, largeRankExpressions, queryProfiles, importedModels, + attributeFields, deployProperties); rankProfiles.put(rawRank.getName(), rawRank); } } @@ -100,7 +101,7 @@ public class RankProfileList extends Derived implements RankProfilesConfig.Produ public void sendTo(Collection<? extends AbstractService> services) { rankingConstants.sendTo(services); - rankExpressionFiles.sendTo(services); + largeRankExpressions.sendTo(services); onnxModels.sendTo(services); } @@ -115,7 +116,7 @@ public class RankProfileList extends Derived implements RankProfilesConfig.Produ } public void getConfig(RankingExpressionsConfig.Builder builder) { - rankExpressionFiles.asMap().values().forEach((expr) -> builder.expression.add(new RankingExpressionsConfig.Expression.Builder().name(expr.getName()).fileref(expr.getFileReference()))); + largeRankExpressions.asMap().values().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/searchdefinition/derived/RawRankProfile.java b/config-model/src/main/java/com/yahoo/searchdefinition/derived/RawRankProfile.java index 82e40d94aed..97d695cead9 100644 --- a/config-model/src/main/java/com/yahoo/searchdefinition/derived/RawRankProfile.java +++ b/config-model/src/main/java/com/yahoo/searchdefinition/derived/RawRankProfile.java @@ -9,6 +9,8 @@ import com.yahoo.config.model.api.ModelContext; import com.yahoo.config.model.deploy.TestProperties; import com.yahoo.search.query.profile.QueryProfileRegistry; import com.yahoo.searchdefinition.OnnxModel; +import com.yahoo.searchdefinition.LargeRankExpressions; +import com.yahoo.searchdefinition.RankExpressionBody; import com.yahoo.searchdefinition.document.RankType; import com.yahoo.searchdefinition.RankProfile; import com.yahoo.searchdefinition.expressiontransforms.OnnxModelTransformer; @@ -20,6 +22,7 @@ import com.yahoo.searchlib.rankingexpression.rule.SerializationContext; import com.yahoo.tensor.TensorType; import com.yahoo.vespa.config.search.RankProfilesConfig; +import java.nio.ByteBuffer; import java.nio.charset.StandardCharsets; import java.util.ArrayList; import java.util.HashSet; @@ -27,6 +30,7 @@ import java.util.Iterator; import java.util.LinkedHashMap; import java.util.LinkedHashSet; import java.util.List; +import java.util.ListIterator; import java.util.Map; import java.util.Set; import java.util.stream.Collectors; @@ -55,19 +59,20 @@ public class RawRankProfile implements RankProfilesConfig.Producer { /** * Creates a raw rank profile from the given rank profile */ - public RawRankProfile(RankProfile rankProfile, QueryProfileRegistry queryProfiles, ImportedMlModels importedModels, + public RawRankProfile(RankProfile rankProfile, LargeRankExpressions largeExpressions, + QueryProfileRegistry queryProfiles, ImportedMlModels importedModels, AttributeFields attributeFields, ModelContext.Properties deployProperties) { this.name = rankProfile.getName(); compressedProperties = compress(new Deriver(rankProfile.compile(queryProfiles, importedModels), - attributeFields, deployProperties).derive()); + attributeFields, deployProperties).derive(largeExpressions)); } /** * Only for testing */ - public RawRankProfile(RankProfile rankProfile, QueryProfileRegistry queryProfiles, - ImportedMlModels importedModels, AttributeFields attributeFields) { - this(rankProfile, queryProfiles, importedModels, attributeFields, new TestProperties()); + public RawRankProfile(RankProfile rankProfile, QueryProfileRegistry queryProfiles, ImportedMlModels importedModels, + AttributeFields attributeFields) { + this(rankProfile, new LargeRankExpressions(), queryProfiles, importedModels, attributeFields, new TestProperties()); } private Compressor.Compression compress(List<Pair<String, String>> properties) { @@ -142,6 +147,9 @@ public class RawRankProfile implements RankProfilesConfig.Producer { private final int numSearchPartitions; private final double termwiseLimit; private final double rankScoreDropLimit; + private final int largeRankExpressionLimit; + private final boolean distributeLargeRankExpressions; + private final boolean useDistributedRankExpressions; /** * The rank type definitions used to derive settings for the native rank features @@ -150,6 +158,7 @@ public class RawRankProfile implements RankProfilesConfig.Producer { private final Map<String, String> attributeTypes; private final Map<String, String> queryFeatureTypes; private final Set<String> filterFields = new java.util.LinkedHashSet<>(); + private final String rankprofileName; private RankingExpression firstPhaseRanking; private RankingExpression secondPhaseRanking; @@ -159,6 +168,7 @@ public class RawRankProfile implements RankProfilesConfig.Producer { */ Deriver(RankProfile compiled, AttributeFields attributeFields, ModelContext.Properties deployProperties) { + rankprofileName = compiled.getName(); attributeTypes = compiled.getAttributeTypes(); queryFeatureTypes = compiled.getQueryFeatureTypes(); firstPhaseRanking = compiled.getFirstPhaseRanking(); @@ -174,6 +184,9 @@ public class RawRankProfile implements RankProfilesConfig.Producer { keepRankCount = compiled.getKeepRankCount(); rankScoreDropLimit = compiled.getRankScoreDropLimit(); ignoreDefaultRankFeatures = compiled.getIgnoreDefaultRankFeatures(); + largeRankExpressionLimit = deployProperties.featureFlags().largeRankExpressionLimit(); + distributeLargeRankExpressions = deployProperties.featureFlags().distributeExternalRankExpressions(); + useDistributedRankExpressions = deployProperties.featureFlags().useExternalRankExpressions(); rankProperties = new ArrayList<>(compiled.getRankProperties()); Map<String, RankProfile.RankingExpressionFunction> functions = compiled.getFunctions(); @@ -319,7 +332,7 @@ public class RawRankProfile implements RankProfilesConfig.Producer { } /** Derives the properties this produces */ - public List<Pair<String, String>> derive() { + public List<Pair<String, String>> derive(LargeRankExpressions largeRankExpressions) { List<Pair<String, String>> properties = new ArrayList<>(); for (RankProfile.RankProperty property : rankProperties) { if (RankingExpression.propertyName(RankProfile.FIRST_PHASE).equals(property.getName())) { 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 ab00e9d295f..d20247b79fc 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 @@ -33,7 +33,7 @@ import com.yahoo.container.QrConfig; import com.yahoo.path.Path; import com.yahoo.searchdefinition.OnnxModel; import com.yahoo.searchdefinition.OnnxModels; -import com.yahoo.searchdefinition.RankExpressionFiles; +import com.yahoo.searchdefinition.LargeRankExpressions; import com.yahoo.searchdefinition.RankProfile; import com.yahoo.searchdefinition.RankProfileRegistry; import com.yahoo.searchdefinition.RankingConstants; @@ -131,7 +131,7 @@ public final class VespaModel extends AbstractConfigProducerRoot implements Seri private final RankingConstants rankingConstants = new RankingConstants(); /** External rank expression files of this */ - private final RankExpressionFiles rankExpressionFiles = new RankExpressionFiles(); + private final LargeRankExpressions largeRankExpressions = new LargeRankExpressions(); /** The validation overrides of this. This is never null. */ private final ValidationOverrides validationOverrides; @@ -187,7 +187,7 @@ public final class VespaModel extends AbstractConfigProducerRoot implements Seri deployState.rankProfileRegistry(), deployState.getQueryProfiles()); rankProfileList = new RankProfileList(null, // null search -> global rankingConstants, - rankExpressionFiles, + largeRankExpressions, AttributeFields.empty, deployState.rankProfileRegistry(), deployState.getQueryProfiles().getRegistry(), @@ -266,7 +266,7 @@ public final class VespaModel extends AbstractConfigProducerRoot implements Seri /** Returns the global ranking constants of this */ public RankingConstants rankingConstants() { return rankingConstants; } - public RankExpressionFiles rankExpressionFiles() { return rankExpressionFiles; } + public LargeRankExpressions rankExpressionFiles() { return largeRankExpressions; } /** Creates a mutable model with no services instantiated */ public static VespaModel createIncomplete(DeployState deployState) throws IOException, SAXException { 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 d87c6596fa4..52dccbe96b5 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 @@ -8,7 +8,7 @@ import com.yahoo.log.InvalidLogFormatException; import com.yahoo.log.LogMessage; import com.yahoo.path.Path; import com.yahoo.searchdefinition.OnnxModel; -import com.yahoo.searchdefinition.RankExpressionFile; +import com.yahoo.searchdefinition.RankExpressionBody; import com.yahoo.vespa.config.search.core.RankingExpressionsConfig; import com.yahoo.vespa.defaults.Defaults; import com.yahoo.yolean.Exceptions; @@ -165,7 +165,7 @@ public class RankSetupValidator extends Validator { config.add(String.format("file[%d].path \"%s\"", config.size() / 2, modelPath)); } - for (RankExpressionFile expr : db.getDerivedConfiguration().getSearch().rankExpressionFiles().asMap().values()) { + for (RankExpressionBody expr : db.getDerivedConfiguration().getSearch().rankExpressionFiles().asMap().values()) { String modelPath = getFileRepositoryPath(expr.getFilePath(), expr.getFileReference()); config.add(String.format("file[%d].ref \"%s\"", config.size() / 2, expr.getFileReference())); config.add(String.format("file[%d].path \"%s\"", config.size() / 2, modelPath)); diff --git a/config-model/src/test/java/com/yahoo/searchdefinition/RankProfileTestCase.java b/config-model/src/test/java/com/yahoo/searchdefinition/RankProfileTestCase.java index 91e8640308a..d5ef3779493 100644 --- a/config-model/src/test/java/com/yahoo/searchdefinition/RankProfileTestCase.java +++ b/config-model/src/test/java/com/yahoo/searchdefinition/RankProfileTestCase.java @@ -102,7 +102,8 @@ public class RankProfileTestCase extends SchemaTestCase { assertEquals(8, rankProfile.getNumThreadsPerSearch()); assertEquals(70, rankProfile.getMinHitsPerThread()); assertEquals(1200, rankProfile.getNumSearchPartitions()); - RawRankProfile rawRankProfile = new RawRankProfile(rankProfile, new QueryProfileRegistry(), new ImportedMlModels(), attributeFields, deployProperties); + RawRankProfile rawRankProfile = new RawRankProfile(rankProfile, new LargeRankExpressions(), new QueryProfileRegistry(), + new ImportedMlModels(), attributeFields, deployProperties); if (expectedTermwiseLimit != null) { assertTrue(findProperty(rawRankProfile.configProperties(), "vespa.matching.termwise_limit").isPresent()); assertEquals(String.valueOf(expectedTermwiseLimit), findProperty(rawRankProfile.configProperties(), "vespa.matching.termwise_limit").get()); diff --git a/config-model/src/test/java/com/yahoo/searchdefinition/processing/RankingExpressionsTestCase.java b/config-model/src/test/java/com/yahoo/searchdefinition/processing/RankingExpressionsTestCase.java index 85ef70132b5..021d2931414 100644 --- a/config-model/src/test/java/com/yahoo/searchdefinition/processing/RankingExpressionsTestCase.java +++ b/config-model/src/test/java/com/yahoo/searchdefinition/processing/RankingExpressionsTestCase.java @@ -7,6 +7,7 @@ import com.yahoo.config.model.api.ModelContext; import com.yahoo.config.model.application.provider.BaseDeployLogger; import com.yahoo.config.model.deploy.TestProperties; import com.yahoo.search.query.profile.QueryProfileRegistry; +import com.yahoo.searchdefinition.LargeRankExpressions; import com.yahoo.searchdefinition.RankProfile; import com.yahoo.searchdefinition.RankProfileRegistry; import com.yahoo.searchdefinition.SchemaTestCase; @@ -49,7 +50,7 @@ public class RankingExpressionsTestCase extends SchemaTestCase { functions.get("artistmatch").function().getBody().getRoot().toString()); assertEquals(0, functions.get("artistmatch").function().arguments().size()); - RawRankProfile rawRankProfile = new RawRankProfile(functionsRankProfile, new QueryProfileRegistry(), + RawRankProfile rawRankProfile = new RawRankProfile(functionsRankProfile, new LargeRankExpressions(), new QueryProfileRegistry(), new ImportedMlModels(), new AttributeFields(search), deployProperties); List<Pair<String, String>> rankProperties = rawRankProfile.configProperties(); assertEquals(6, rankProperties.size()); |