summaryrefslogtreecommitdiffstats
path: root/config-model/src/main/java/com/yahoo
diff options
context:
space:
mode:
Diffstat (limited to 'config-model/src/main/java/com/yahoo')
-rw-r--r--config-model/src/main/java/com/yahoo/searchdefinition/derived/RawRankProfile.java20
-rw-r--r--config-model/src/main/java/com/yahoo/searchdefinition/derived/SummaryClass.java5
-rw-r--r--config-model/src/main/java/com/yahoo/vespa/documentmodel/DocumentSummary.java9
3 files changed, 13 insertions, 21 deletions
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 508d011d18f..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
@@ -417,29 +417,9 @@ public class RawRankProfile implements RankProfilesConfig.Producer {
properties.add(new Pair<>("vespa.type.query." + queryFeatureType.getKey(), queryFeatureType.getValue()));
}
if (properties.size() >= 1000000) throw new RuntimeException("Too many rank properties");
- distributeLargeExpressionsAsFiles(properties, largeRankExpressions);
return properties;
}
- private void distributeLargeExpressionsAsFiles(List<Pair<String, String>> properties, LargeRankExpressions largeRankExpressions) {
- if (!distributeLargeRankExpressions) return;
- for (ListIterator<Pair<String, String>> iter = properties.listIterator(); iter.hasNext();) {
- Pair<String, String> property = iter.next();
- String expression = property.getSecond();
- if (expression.length() > largeRankExpressionLimit) {
- 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))));
- if (useDistributedRankExpressions) {
- iter.set(new Pair<>(RankingExpression.propertyExpressionName(functionName), mangledName));
- }
- }
- }
- }
- }
-
private List<Pair<String, String>> deriveRankingPhaseRankProperties(RankingExpression expression, String phase) {
List<Pair<String, String>> properties = new ArrayList<>();
if (expression == null) return properties;
diff --git a/config-model/src/main/java/com/yahoo/searchdefinition/derived/SummaryClass.java b/config-model/src/main/java/com/yahoo/searchdefinition/derived/SummaryClass.java
index af2168545dc..c173b2c11d9 100644
--- a/config-model/src/main/java/com/yahoo/searchdefinition/derived/SummaryClass.java
+++ b/config-model/src/main/java/com/yahoo/searchdefinition/derived/SummaryClass.java
@@ -28,6 +28,7 @@ public class SummaryClass extends Derived {
/** True if this summary class needs to access summary information on disk */
private boolean accessingDiskSummary = false;
private final boolean rawAsBase64;
+ private final boolean omitSummaryFeatures;
/** The summary fields of this indexed by name */
private Map<String,SummaryClassField> fields = new java.util.LinkedHashMap<>();
@@ -44,6 +45,7 @@ public class SummaryClass extends Derived {
public SummaryClass(Search search, DocumentSummary summary, DeployLogger deployLogger) {
this.deployLogger = deployLogger;
this.rawAsBase64 = search.isRawAsBase64();
+ this.omitSummaryFeatures = summary.omitSummaryFeatures();
deriveName(summary);
deriveFields(search,summary);
deriveImplicitFields(summary);
@@ -128,7 +130,8 @@ public class SummaryClass extends Derived {
}
classBuilder.
id(id).
- name(getName());
+ name(getName()).
+ omitsummaryfeatures(omitSummaryFeatures);
for (SummaryClassField field : fields.values() ) {
classBuilder.fields(new SummaryConfig.Classes.Fields.Builder().
name(field.getName()).
diff --git a/config-model/src/main/java/com/yahoo/vespa/documentmodel/DocumentSummary.java b/config-model/src/main/java/com/yahoo/vespa/documentmodel/DocumentSummary.java
index 3c6aa881af4..454d0f08ff0 100644
--- a/config-model/src/main/java/com/yahoo/vespa/documentmodel/DocumentSummary.java
+++ b/config-model/src/main/java/com/yahoo/vespa/documentmodel/DocumentSummary.java
@@ -14,6 +14,7 @@ import java.util.List;
public class DocumentSummary extends FieldView {
private boolean fromDisk = false;
+ private boolean omitSummaryFeatures = false;
private DocumentSummary inherited;
/**
@@ -30,6 +31,14 @@ public class DocumentSummary extends FieldView {
/** Returns whether the user has noted explicitly that this summary accesses disk */
public boolean isFromDisk() { return fromDisk; }
+ public void setOmitSummaryFeatures(boolean value) {
+ omitSummaryFeatures = value;
+ }
+
+ public boolean omitSummaryFeatures() {
+ return omitSummaryFeatures;
+ }
+
/**
* The model is constrained to ensure that summary fields of the same name
* in different classes have the same summary transform, because this is