diff options
Diffstat (limited to 'config-model')
50 files changed, 284 insertions, 85 deletions
diff --git a/config-model/pom.xml b/config-model/pom.xml index 6dfc2e7740f..18b8432645e 100644 --- a/config-model/pom.xml +++ b/config-model/pom.xml @@ -108,6 +108,10 @@ <exclusions> <!-- Not needed to generate config and saves 1 MB. --> <exclusion> + <groupId>com.yahoo.vespa</groupId> + <artifactId>http-utils</artifactId> + </exclusion> + <exclusion> <groupId>org.apache.httpcomponents</groupId> <artifactId>httpclient</artifactId> </exclusion> diff --git a/config-model/src/main/java/com/yahoo/config/model/deploy/TestProperties.java b/config-model/src/main/java/com/yahoo/config/model/deploy/TestProperties.java index 68f7b0cc4ec..7a09a36c1d7 100644 --- a/config-model/src/main/java/com/yahoo/config/model/deploy/TestProperties.java +++ b/config-model/src/main/java/com/yahoo/config/model/deploy/TestProperties.java @@ -67,6 +67,7 @@ public class TestProperties implements ModelContext.Properties, ModelContext.Fea private double containerShutdownTimeout = 50.0; private int distributorMergeBusyWait = 10; private int docstoreCompressionLevel = 9; + private int maxUnCommittedMemory = 123456; private double diskBloatFactor = 0.2; private boolean distributorEnhancedMaintenanceScheduling = false; @@ -118,6 +119,12 @@ public class TestProperties implements ModelContext.Properties, ModelContext.Fea @Override public double diskBloatFactor() { return diskBloatFactor; } @Override public int docstoreCompressionLevel() { return docstoreCompressionLevel; } @Override public boolean distributorEnhancedMaintenanceScheduling() { return distributorEnhancedMaintenanceScheduling; } + @Override public int maxUnCommittedMemory() { return maxUnCommittedMemory; } + + public TestProperties maxUnCommittedMemory(int maxUnCommittedMemory) { + this.maxUnCommittedMemory = maxUnCommittedMemory; + return this; + } public TestProperties docstoreCompressionLevel(int docstoreCompressionLevel) { this.docstoreCompressionLevel = docstoreCompressionLevel; diff --git a/config-model/src/main/java/com/yahoo/searchdefinition/Schema.java b/config-model/src/main/java/com/yahoo/searchdefinition/Schema.java index b2d4f0592fe..36d4ba9699e 100644 --- a/config-model/src/main/java/com/yahoo/searchdefinition/Schema.java +++ b/config-model/src/main/java/com/yahoo/searchdefinition/Schema.java @@ -609,7 +609,7 @@ public class Schema implements ImmutableSchema { Map<String, SummaryField> summaryFields = inherited.isPresent() ? requireInherited().getSummaryFields(field) : new java.util.LinkedHashMap<>(); for (DocumentSummary documentSummary : summaries.values()) { - for (SummaryField summaryField : documentSummary.getSummaryFields()) { + for (SummaryField summaryField : documentSummary.getSummaryFields().values()) { if (summaryField.hasSource(field.getName())) { summaryFields.put(summaryField.getName(), summaryField); } @@ -628,7 +628,7 @@ public class Schema implements ImmutableSchema { Map<String, SummaryField> summaryFields = inherited.isPresent() ? requireInherited().getUniqueNamedSummaryFields() : new java.util.LinkedHashMap<>(); for (DocumentSummary documentSummary : summaries.values()) { - for (SummaryField summaryField : documentSummary.getSummaryFields()) { + for (SummaryField summaryField : documentSummary.getSummaryFields().values()) { summaryFields.put(summaryField.getName(), summaryField); } } diff --git a/config-model/src/main/java/com/yahoo/searchdefinition/derived/AttributeFields.java b/config-model/src/main/java/com/yahoo/searchdefinition/derived/AttributeFields.java index 67ed37800f9..2890f1cc019 100644 --- a/config-model/src/main/java/com/yahoo/searchdefinition/derived/AttributeFields.java +++ b/config-model/src/main/java/com/yahoo/searchdefinition/derived/AttributeFields.java @@ -190,7 +190,8 @@ public class AttributeFields extends Derived implements AttributesConfig.Produce @Override public void getConfig(AttributesConfig.Builder builder) { - getConfig(builder, FieldSet.ALL); + //TODO This is just to get some exporting tests to work, Should be undone and removed + getConfig(builder, FieldSet.ALL, 77777); } private boolean isAttributeInFieldSet(Attribute attribute, FieldSet fs) { @@ -295,15 +296,19 @@ public class AttributeFields extends Derived implements AttributesConfig.Produce return AttributesConfig.Attribute.Match.UNCASED; } - public void getConfig(AttributesConfig.Builder builder, FieldSet fs) { + public void getConfig(AttributesConfig.Builder builder, FieldSet fs, long maxUnCommittedMemory) { for (Attribute attribute : attributes.values()) { if (isAttributeInFieldSet(attribute, fs)) { - builder.attribute(getConfig(attribute.getName(), attribute, false)); + AttributesConfig.Attribute.Builder attrBuilder = getConfig(attribute.getName(), attribute, false); + attrBuilder.maxuncommittedmemory(maxUnCommittedMemory); + builder.attribute(attrBuilder); } } if (fs == FieldSet.ALL) { for (Map.Entry<String, Attribute> entry : importedAttributes.entrySet()) { - builder.attribute(getConfig(entry.getKey(), entry.getValue(), true)); + AttributesConfig.Attribute.Builder attrBuilder = getConfig(entry.getKey(), entry.getValue(), true); + attrBuilder.maxuncommittedmemory(maxUnCommittedMemory); + builder.attribute(attrBuilder); } } } diff --git a/config-model/src/main/java/com/yahoo/searchdefinition/derived/DerivedConfiguration.java b/config-model/src/main/java/com/yahoo/searchdefinition/derived/DerivedConfiguration.java index 54e9a4ccb61..6165cdd2dc1 100644 --- a/config-model/src/main/java/com/yahoo/searchdefinition/derived/DerivedConfiguration.java +++ b/config-model/src/main/java/com/yahoo/searchdefinition/derived/DerivedConfiguration.java @@ -16,6 +16,7 @@ import com.yahoo.search.query.profile.QueryProfileRegistry; import com.yahoo.searchdefinition.RankProfileRegistry; import com.yahoo.searchdefinition.Schema; import com.yahoo.searchdefinition.derived.validation.Validation; +import com.yahoo.vespa.config.search.AttributesConfig; import com.yahoo.vespa.model.container.search.QueryProfiles; import java.io.IOException; @@ -28,7 +29,7 @@ import java.util.concurrent.ExecutorService; * * @author bratseth */ -public class DerivedConfiguration { +public class DerivedConfiguration implements AttributesConfig.Producer { private final Schema schema; private Summaries summaries; @@ -43,6 +44,7 @@ public class DerivedConfiguration { private IndexSchema indexSchema; private ImportedFields importedFields; private final QueryProfileRegistry queryProfiles; + private final long maxUncommittedMemory; /** * Creates a complete derived configuration from a search definition. @@ -82,6 +84,7 @@ public class DerivedConfiguration { Validator.ensureNotNull("Search definition", schema); this.schema = schema; this.queryProfiles = queryProfiles; + this.maxUncommittedMemory = deployProperties.featureFlags().maxUnCommittedMemory(); if ( ! schema.isDocumentsOnly()) { streamingFields = new VsmFields(schema); streamingSummary = new VsmSummary(schema); @@ -159,6 +162,15 @@ public class DerivedConfiguration { return attributeFields; } + @Override + public void getConfig(AttributesConfig.Builder builder) { + getConfig(builder, AttributeFields.FieldSet.ALL); + } + + public void getConfig(AttributesConfig.Builder builder, AttributeFields.FieldSet fs) { + attributeFields.getConfig(builder, fs, maxUncommittedMemory); + } + public IndexingScript getIndexingScript() { return indexingScript; } 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 5f88ddba5f5..68966d39d7d 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 @@ -63,7 +63,7 @@ public class SummaryClass extends Derived { } private void deriveFields(Schema schema, DocumentSummary summary) { - for (SummaryField summaryField : summary.getSummaryFields()) { + for (SummaryField summaryField : summary.getSummaryFields().values()) { if (!accessingDiskSummary && schema.isAccessingDiskSummary(summaryField)) { accessingDiskSummary = true; } diff --git a/config-model/src/main/java/com/yahoo/searchdefinition/derived/SummaryMap.java b/config-model/src/main/java/com/yahoo/searchdefinition/derived/SummaryMap.java index cf182a1afbc..c65ed7dc762 100644 --- a/config-model/src/main/java/com/yahoo/searchdefinition/derived/SummaryMap.java +++ b/config-model/src/main/java/com/yahoo/searchdefinition/derived/SummaryMap.java @@ -39,7 +39,7 @@ public class SummaryMap extends Derived implements SummarymapConfig.Producer { } private void derive(DocumentSummary documentSummary) { - for (SummaryField summaryField : documentSummary.getSummaryFields()) { + for (SummaryField summaryField : documentSummary.getSummaryFields().values()) { if (summaryField.getTransform()== SummaryTransform.NONE) continue; if (summaryField.getTransform()==SummaryTransform.ATTRIBUTE || diff --git a/config-model/src/main/java/com/yahoo/searchdefinition/derived/VsmSummary.java b/config-model/src/main/java/com/yahoo/searchdefinition/derived/VsmSummary.java index a2c90bc92f5..4ce486e13ba 100644 --- a/config-model/src/main/java/com/yahoo/searchdefinition/derived/VsmSummary.java +++ b/config-model/src/main/java/com/yahoo/searchdefinition/derived/VsmSummary.java @@ -18,7 +18,7 @@ import java.util.*; */ public class VsmSummary extends Derived implements VsmsummaryConfig.Producer { - private Map<SummaryField, List<String>> summaryMap = new java.util.LinkedHashMap<>(1); + private final Map<SummaryField, List<String>> summaryMap = new java.util.LinkedHashMap<>(1); public VsmSummary(Schema schema) { derive(schema); @@ -31,8 +31,8 @@ public class VsmSummary extends Derived implements VsmsummaryConfig.Producer { } private void derive(Schema schema, DocumentSummary documentSummary) { - if (documentSummary==null) return; - for (SummaryField summaryField : documentSummary.getSummaryFields()) { + if (documentSummary == null) return; + for (SummaryField summaryField : documentSummary.getSummaryFields().values()) { List<String> from = toStringList(summaryField.sourceIterator()); if (doMapField(schema, summaryField)) { diff --git a/config-model/src/main/java/com/yahoo/searchdefinition/processing/AddExtraFieldsToDocument.java b/config-model/src/main/java/com/yahoo/searchdefinition/processing/AddExtraFieldsToDocument.java index 9ade1786e37..57d5a9c8e75 100644 --- a/config-model/src/main/java/com/yahoo/searchdefinition/processing/AddExtraFieldsToDocument.java +++ b/config-model/src/main/java/com/yahoo/searchdefinition/processing/AddExtraFieldsToDocument.java @@ -39,7 +39,7 @@ public class AddExtraFieldsToDocument extends Processor { addSdField(schema, document, field, validate); } //TODO Vespa 8 or sooner we should avoid the dirty addition of fields from dirty 'default' summary to document at all - for (SummaryField field : schema.getSummary("default").getSummaryFields()) { + for (SummaryField field : schema.getSummary("default").getSummaryFields().values()) { if (dirtyLegalFieldNameCheck(field.getName())) { addSummaryField(schema, document, field, validate); } diff --git a/config-model/src/main/java/com/yahoo/searchdefinition/processing/AdjustPositionSummaryFields.java b/config-model/src/main/java/com/yahoo/searchdefinition/processing/AdjustPositionSummaryFields.java index 176fcf2130f..983942f87c3 100644 --- a/config-model/src/main/java/com/yahoo/searchdefinition/processing/AdjustPositionSummaryFields.java +++ b/config-model/src/main/java/com/yahoo/searchdefinition/processing/AdjustPositionSummaryFields.java @@ -33,26 +33,26 @@ public class AdjustPositionSummaryFields extends Processor { } private void scanSummary(DocumentSummary summary) { - for (SummaryField summaryField : summary.getSummaryFields()) { - if (isPositionDataType(summaryField.getDataType())) { - String originalSource = summaryField.getSingleSource(); - if (originalSource.indexOf('.') == -1) { // Eliminate summary fields with pos.x or pos.y as source - ImmutableSDField sourceField = schema.getField(originalSource); - if (sourceField != null) { - String zCurve = null; - if (sourceField.getDataType().equals(summaryField.getDataType())) { - zCurve = PositionDataType.getZCurveFieldName(originalSource); - } else if (sourceField.getDataType().equals(makeZCurveDataType(summaryField.getDataType())) && - hasZCurveSuffix(originalSource)) { - zCurve = originalSource; - } - if (zCurve != null) { - if (hasPositionAttribute(zCurve)) { - Source source = new Source(zCurve); - adjustPositionField(summary, summaryField, source); - } else if (sourceField.isImportedField() || !summaryField.getName().equals(originalSource)) { - fail(summaryField, "No position attribute '" + zCurve + "'"); - } + for (SummaryField summaryField : summary.getSummaryFields().values()) { + if ( ! isPositionDataType(summaryField.getDataType())) continue; + + String originalSource = summaryField.getSingleSource(); + if (originalSource.indexOf('.') == -1) { // Eliminate summary fields with pos.x or pos.y as source + ImmutableSDField sourceField = schema.getField(originalSource); + if (sourceField != null) { + String zCurve = null; + if (sourceField.getDataType().equals(summaryField.getDataType())) { + zCurve = PositionDataType.getZCurveFieldName(originalSource); + } else if (sourceField.getDataType().equals(makeZCurveDataType(summaryField.getDataType())) && + hasZCurveSuffix(originalSource)) { + zCurve = originalSource; + } + if (zCurve != null) { + if (hasPositionAttribute(zCurve)) { + Source source = new Source(zCurve); + adjustPositionField(summary, summaryField, source); + } else if (sourceField.isImportedField() || !summaryField.getName().equals(originalSource)) { + fail(summaryField, "No position attribute '" + zCurve + "'"); } } } diff --git a/config-model/src/main/java/com/yahoo/searchdefinition/processing/ImplicitSummaryFields.java b/config-model/src/main/java/com/yahoo/searchdefinition/processing/ImplicitSummaryFields.java index ff0a0d07102..e11f7d370c5 100644 --- a/config-model/src/main/java/com/yahoo/searchdefinition/processing/ImplicitSummaryFields.java +++ b/config-model/src/main/java/com/yahoo/searchdefinition/processing/ImplicitSummaryFields.java @@ -23,7 +23,7 @@ public class ImplicitSummaryFields extends Processor { @Override public void process(boolean validate, boolean documentsOnly) { for (DocumentSummary docsum : schema.getSummariesInThis().values()) { - if (docsum.getInherited() != null) continue; // Implicit fields are added to inheriting summaries through their parent + if (docsum.inherited().isPresent()) continue; // Implicit fields are added to inheriting summaries through their parent addField(docsum, new SummaryField("rankfeatures", DataType.STRING, SummaryTransform.RANKFEATURES), validate); addField(docsum, new SummaryField("summaryfeatures", DataType.STRING, SummaryTransform.SUMMARYFEATURES), validate); } diff --git a/config-model/src/main/java/com/yahoo/searchdefinition/processing/MatchedElementsOnlyResolver.java b/config-model/src/main/java/com/yahoo/searchdefinition/processing/MatchedElementsOnlyResolver.java index 709c79cd79b..c2fe4e875b8 100644 --- a/config-model/src/main/java/com/yahoo/searchdefinition/processing/MatchedElementsOnlyResolver.java +++ b/config-model/src/main/java/com/yahoo/searchdefinition/processing/MatchedElementsOnlyResolver.java @@ -33,8 +33,8 @@ public class MatchedElementsOnlyResolver extends Processor { public void process(boolean validate, boolean documentsOnly) { for (var entry : schema.getSummaries().entrySet()) { var summary = entry.getValue(); - for (var field : summary.getSummaryFields()) { - if (field.getTransform().equals(SummaryTransform.MATCHED_ELEMENTS_FILTER)) { + for (var field : summary.getSummaryFields().values()) { + if (field.getTransform() == SummaryTransform.MATCHED_ELEMENTS_FILTER) { processSummaryField(summary, field, validate); } } diff --git a/config-model/src/main/java/com/yahoo/searchdefinition/processing/ReferenceFieldsProcessor.java b/config-model/src/main/java/com/yahoo/searchdefinition/processing/ReferenceFieldsProcessor.java index ed23b1ca606..19bfb41289d 100644 --- a/config-model/src/main/java/com/yahoo/searchdefinition/processing/ReferenceFieldsProcessor.java +++ b/config-model/src/main/java/com/yahoo/searchdefinition/processing/ReferenceFieldsProcessor.java @@ -35,7 +35,7 @@ public class ReferenceFieldsProcessor extends Processor { private void clearSummaryAttributeAspectForExplicitSummaryFields() { for (DocumentSummary docSum : schema.getSummaries().values()) { - docSum.getSummaryFields().stream() + docSum.getSummaryFields().values().stream() .filter(summaryField -> summaryField.getDataType() instanceof ReferenceDataType) .forEach(summaryField -> summaryField.setTransform(SummaryTransform.NONE)); } diff --git a/config-model/src/main/java/com/yahoo/searchdefinition/processing/SummaryConsistency.java b/config-model/src/main/java/com/yahoo/searchdefinition/processing/SummaryConsistency.java index 80f9a15f1e5..8b86674e4d0 100644 --- a/config-model/src/main/java/com/yahoo/searchdefinition/processing/SummaryConsistency.java +++ b/config-model/src/main/java/com/yahoo/searchdefinition/processing/SummaryConsistency.java @@ -33,7 +33,7 @@ public class SummaryConsistency extends Processor { for (DocumentSummary summary : schema.getSummaries().values()) { if (summary.getName().equals("default")) continue; - for (SummaryField summaryField : summary.getSummaryFields() ) { + for (SummaryField summaryField : summary.getSummaryFields().values()) { assertConsistency(summaryField, schema, validate); makeAttributeTransformIfAppropriate(summaryField, schema); makeAttributeCombinerTransformIfAppropriate(summaryField, schema); diff --git a/config-model/src/main/java/com/yahoo/searchdefinition/processing/SummaryDiskAccessValidator.java b/config-model/src/main/java/com/yahoo/searchdefinition/processing/SummaryDiskAccessValidator.java index 4bc553b1669..6a64202686f 100644 --- a/config-model/src/main/java/com/yahoo/searchdefinition/processing/SummaryDiskAccessValidator.java +++ b/config-model/src/main/java/com/yahoo/searchdefinition/processing/SummaryDiskAccessValidator.java @@ -37,7 +37,7 @@ public class SummaryDiskAccessValidator extends Processor { if (documentsOnly) return; for (DocumentSummary summary : schema.getSummaries().values()) { - for (SummaryField summaryField : summary.getSummaryFields()) { + for (SummaryField summaryField : summary.getSummaryFields().values()) { for (SummaryField.Source source : summaryField.getSources()) { ImmutableSDField field = schema.getField(source.getName()); if (field == null) @@ -47,9 +47,9 @@ public class SummaryDiskAccessValidator extends Processor { source + ", but this field does not exist"); if ( ! isInMemory(field, summaryField) && ! summary.isFromDisk()) { deployLogger.logApplicationPackage(Level.WARNING, summaryField + " in " + summary + " references " + - source + ", which is not an attribute: Using this " + - "summary will cause disk accesses. " + - "Set 'from-disk' on this summary class to silence this warning."); + source + ", which is not an attribute: Using this " + + "summary will cause disk accesses. " + + "Set 'from-disk' on this summary class to silence this warning."); } } } diff --git a/config-model/src/main/java/com/yahoo/searchdefinition/processing/SummaryFieldsMustHaveValidSource.java b/config-model/src/main/java/com/yahoo/searchdefinition/processing/SummaryFieldsMustHaveValidSource.java index 2e2144b819d..c6f5b35aaa8 100644 --- a/config-model/src/main/java/com/yahoo/searchdefinition/processing/SummaryFieldsMustHaveValidSource.java +++ b/config-model/src/main/java/com/yahoo/searchdefinition/processing/SummaryFieldsMustHaveValidSource.java @@ -26,7 +26,7 @@ public class SummaryFieldsMustHaveValidSource extends Processor { if ( ! validate) return; for (DocumentSummary summary : schema.getSummaries().values()) { - for (SummaryField summaryField : summary.getSummaryFields()) { + for (SummaryField summaryField : summary.getSummaryFields().values()) { if (summaryField.getSources().isEmpty()) { if ((summaryField.getTransform() != SummaryTransform.RANKFEATURES) && (summaryField.getTransform() != SummaryTransform.SUMMARYFEATURES)) diff --git a/config-model/src/main/java/com/yahoo/searchdefinition/processing/SummaryNamesFieldCollisions.java b/config-model/src/main/java/com/yahoo/searchdefinition/processing/SummaryNamesFieldCollisions.java index 1c6f8d54ea3..2d0afe88281 100644 --- a/config-model/src/main/java/com/yahoo/searchdefinition/processing/SummaryNamesFieldCollisions.java +++ b/config-model/src/main/java/com/yahoo/searchdefinition/processing/SummaryNamesFieldCollisions.java @@ -32,7 +32,7 @@ public class SummaryNamesFieldCollisions extends Processor { Map<String, Pair<String, String>> fieldToClassAndSource = new HashMap<>(); for (DocumentSummary summary : schema.getSummaries().values()) { if ("default".equals(summary.getName())) continue; - for (SummaryField summaryField : summary.getSummaryFields() ) { + for (SummaryField summaryField : summary.getSummaryFields().values()) { if (summaryField.isImplicit()) continue; Pair<String, String> prevClassAndSource = fieldToClassAndSource.get(summaryField.getName()); for (Source source : summaryField.getSources()) { diff --git a/config-model/src/main/java/com/yahoo/searchdefinition/processing/ValidateFieldTypes.java b/config-model/src/main/java/com/yahoo/searchdefinition/processing/ValidateFieldTypes.java index 0d4bfd09677..68bf2511a4b 100644 --- a/config-model/src/main/java/com/yahoo/searchdefinition/processing/ValidateFieldTypes.java +++ b/config-model/src/main/java/com/yahoo/searchdefinition/processing/ValidateFieldTypes.java @@ -48,7 +48,7 @@ public class ValidateFieldTypes extends Processor { } final protected void verifySummaryFields(String searchName, Map<String, DataType> seenFields) { for (DocumentSummary summary : schema.getSummaries().values()) { - for (SummaryField field : summary.getSummaryFields()) { + for (SummaryField field : summary.getSummaryFields().values()) { checkFieldType(searchName, "summary field", field.getName(), field.getDataType(), seenFields); } } 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 967e662dc6b..3dda498b0be 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 @@ -6,8 +6,12 @@ import com.yahoo.searchdefinition.Schema; import java.util.ArrayList; import java.util.Collection; +import java.util.HashMap; import java.util.Iterator; +import java.util.LinkedHashMap; import java.util.List; +import java.util.Map; +import java.util.Optional; import java.util.logging.Level; /** @@ -19,7 +23,7 @@ public class DocumentSummary extends FieldView { private boolean fromDisk = false; private boolean omitSummaryFeatures = false; - private String inherited; + private Optional<String> inherited = Optional.empty(); private final Schema owner; @@ -57,20 +61,15 @@ public class DocumentSummary extends FieldView { public SummaryField getSummaryField(String name) { var field = (SummaryField)get(name); if (field != null) return field; - if (getInherited() == null) return null; - return getInherited().getSummaryField(name); + if (inherited().isEmpty()) return null; + return inherited().get().getSummaryField(name); } - // TODO: This does not handle overriding in child summaries correctly - public Collection<SummaryField> getSummaryFields() { - var fields = new ArrayList<SummaryField>(getFields().size()); - var parent = getInherited(); - if (parent != null) { - fields.addAll(parent.getSummaryFields()); - } - for (var field : getFields()) { - fields.add((SummaryField) field); - } + public Map<String, SummaryField> getSummaryFields() { + var fields = new LinkedHashMap<String, SummaryField>(getFields().size()); + inherited().ifPresent(inherited -> fields.putAll(inherited.getSummaryFields())); + for (var field : getFields()) + fields.put(field.getName(), (SummaryField) field); return fields; } @@ -83,7 +82,7 @@ public class DocumentSummary extends FieldView { */ public void purgeImplicits() { List<SummaryField> falseImplicits = new ArrayList<>(); - for (SummaryField summaryField : getSummaryFields() ) { + for (SummaryField summaryField : getSummaryFields().values()) { if (summaryField.isImplicit()) continue; for (Iterator<SummaryField.Source> j = summaryField.sourceIterator(); j.hasNext(); ) { String sourceName = j.next().getName(); @@ -101,12 +100,12 @@ public class DocumentSummary extends FieldView { /** Sets the parent of this. Both summaries must be present in the same search definition */ public void setInherited(String inherited) { - this.inherited = inherited; + this.inherited = Optional.of(inherited); } - /** Returns the parent of this, or null if none is inherited */ - public DocumentSummary getInherited() { - return owner.getSummary(inherited); + /** Returns the parent of this, if any */ + public Optional<DocumentSummary> inherited() { + return inherited.map(name -> owner.getSummary(name)); } @Override @@ -115,14 +114,14 @@ public class DocumentSummary extends FieldView { } public void validate(DeployLogger logger) { - if (inherited != null) { - if ( ! owner.getSummaries().containsKey(inherited)) { + if (inherited.isPresent()) { + if ( ! owner.getSummaries().containsKey(inherited.get())) { logger.log(Level.WARNING, - this + " inherits " + inherited + " but this" + " is not present in " + owner); + this + " inherits " + inherited.get() + " but this" + " is not present in " + owner); logger.logApplicationPackage(Level.WARNING, - this + " inherits " + inherited + " but this" + " is not present in " + owner); + this + " inherits " + inherited.get() + " but this" + " is not present in " + owner); // TODO: When safe, replace the above by - // throw new IllegalArgumentException(this + " inherits " + inherited + " but this" + + // throw new IllegalArgumentException(this + " inherits " + inherited.get() + " but this" + // " is not present in " + owner); // ... and update SummaryTestCase.testValidationOfInheritedSummary } diff --git a/config-model/src/main/java/com/yahoo/vespa/model/search/DocumentDatabase.java b/config-model/src/main/java/com/yahoo/vespa/model/search/DocumentDatabase.java index ea445068cb9..cb4cc3e712c 100644 --- a/config-model/src/main/java/com/yahoo/vespa/model/search/DocumentDatabase.java +++ b/config-model/src/main/java/com/yahoo/vespa/model/search/DocumentDatabase.java @@ -1,6 +1,7 @@ // Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.vespa.model.search; +import com.yahoo.config.model.api.ModelContext; import com.yahoo.config.model.producer.AbstractConfigProducer; import com.yahoo.search.config.IndexInfoConfig; import com.yahoo.searchdefinition.derived.DerivedConfiguration; @@ -68,7 +69,7 @@ public class DocumentDatabase extends AbstractConfigProducer<DocumentDatabase> i @Override public void getConfig(AttributesConfig.Builder builder) { - derivedCfg.getAttributeFields().getConfig(builder); + derivedCfg.getConfig(builder); } @Override diff --git a/config-model/src/main/java/com/yahoo/vespa/model/search/SearchCluster.java b/config-model/src/main/java/com/yahoo/vespa/model/search/SearchCluster.java index 321aae5acde..b128f391e72 100644 --- a/config-model/src/main/java/com/yahoo/vespa/model/search/SearchCluster.java +++ b/config-model/src/main/java/com/yahoo/vespa/model/search/SearchCluster.java @@ -55,7 +55,7 @@ public abstract class SearchCluster extends AbstractSearchCluster @Override public void getConfig(AttributesConfig.Builder builder) { - if (getSdConfig()!=null) getSdConfig().getAttributeFields().getConfig(builder); + if (getSdConfig()!=null) getSdConfig().getConfig(builder); } @Override diff --git a/config-model/src/main/java/com/yahoo/vespa/model/search/StreamingSearchCluster.java b/config-model/src/main/java/com/yahoo/vespa/model/search/StreamingSearchCluster.java index a9f9102c11a..7b328acdc98 100644 --- a/config-model/src/main/java/com/yahoo/vespa/model/search/StreamingSearchCluster.java +++ b/config-model/src/main/java/com/yahoo/vespa/model/search/StreamingSearchCluster.java @@ -38,7 +38,7 @@ public class StreamingSearchCluster extends SearchCluster implements @Override public void getConfig(AttributesConfig.Builder builder) { if (getSdConfig() != null) { - getSdConfig().getAttributeFields().getConfig(builder, AttributeFields.FieldSet.FAST_ACCESS); + getSdConfig().getConfig(builder, AttributeFields.FieldSet.FAST_ACCESS); } } } @@ -111,7 +111,7 @@ public class StreamingSearchCluster extends SearchCluster implements @Override public void getConfig(AttributesConfig.Builder builder) { - if (getSdConfig()!=null) getSdConfig().getAttributeFields().getConfig(builder); + if (getSdConfig()!=null) getSdConfig().getConfig(builder); } @Override diff --git a/config-model/src/test/derived/advanced/attributes.cfg b/config-model/src/test/derived/advanced/attributes.cfg index f6dc8415f2b..b241d03cdb2 100644 --- a/config-model/src/test/derived/advanced/attributes.cfg +++ b/config-model/src/test/derived/advanced/attributes.cfg @@ -23,6 +23,7 @@ attribute[].upperbound 9223372036854775807 attribute[].densepostinglistthreshold 0.4 attribute[].tensortype "" attribute[].imported false +attribute[].maxuncommittedmemory 77777 attribute[].distancemetric EUCLIDEAN attribute[].index.hnsw.enabled false attribute[].index.hnsw.maxlinkspernode 16 diff --git a/config-model/src/test/derived/array_of_struct_attribute/attributes.cfg b/config-model/src/test/derived/array_of_struct_attribute/attributes.cfg index 95d7e5e9299..f61dd7069a1 100644 --- a/config-model/src/test/derived/array_of_struct_attribute/attributes.cfg +++ b/config-model/src/test/derived/array_of_struct_attribute/attributes.cfg @@ -23,6 +23,7 @@ attribute[].upperbound 9223372036854775807 attribute[].densepostinglistthreshold 0.4 attribute[].tensortype "" attribute[].imported false +attribute[].maxuncommittedmemory 77777 attribute[].distancemetric EUCLIDEAN attribute[].index.hnsw.enabled false attribute[].index.hnsw.maxlinkspernode 16 @@ -54,6 +55,7 @@ attribute[].upperbound 9223372036854775807 attribute[].densepostinglistthreshold 0.4 attribute[].tensortype "" attribute[].imported false +attribute[].maxuncommittedmemory 77777 attribute[].distancemetric EUCLIDEAN attribute[].index.hnsw.enabled false attribute[].index.hnsw.maxlinkspernode 16 diff --git a/config-model/src/test/derived/attributeprefetch/attributes.cfg b/config-model/src/test/derived/attributeprefetch/attributes.cfg index fecc0d9a7a0..b6f37a216a7 100644 --- a/config-model/src/test/derived/attributeprefetch/attributes.cfg +++ b/config-model/src/test/derived/attributeprefetch/attributes.cfg @@ -23,6 +23,7 @@ attribute[].upperbound 9223372036854775807 attribute[].densepostinglistthreshold 0.4 attribute[].tensortype "" attribute[].imported false +attribute[].maxuncommittedmemory 77777 attribute[].distancemetric EUCLIDEAN attribute[].index.hnsw.enabled false attribute[].index.hnsw.maxlinkspernode 16 @@ -54,6 +55,7 @@ attribute[].upperbound 9223372036854775807 attribute[].densepostinglistthreshold 0.4 attribute[].tensortype "" attribute[].imported false +attribute[].maxuncommittedmemory 77777 attribute[].distancemetric EUCLIDEAN attribute[].index.hnsw.enabled false attribute[].index.hnsw.maxlinkspernode 16 @@ -85,6 +87,7 @@ attribute[].upperbound 9223372036854775807 attribute[].densepostinglistthreshold 0.4 attribute[].tensortype "" attribute[].imported false +attribute[].maxuncommittedmemory 77777 attribute[].distancemetric EUCLIDEAN attribute[].index.hnsw.enabled false attribute[].index.hnsw.maxlinkspernode 16 @@ -116,6 +119,7 @@ attribute[].upperbound 9223372036854775807 attribute[].densepostinglistthreshold 0.4 attribute[].tensortype "" attribute[].imported false +attribute[].maxuncommittedmemory 77777 attribute[].distancemetric EUCLIDEAN attribute[].index.hnsw.enabled false attribute[].index.hnsw.maxlinkspernode 16 @@ -147,6 +151,7 @@ attribute[].upperbound 9223372036854775807 attribute[].densepostinglistthreshold 0.4 attribute[].tensortype "" attribute[].imported false +attribute[].maxuncommittedmemory 77777 attribute[].distancemetric EUCLIDEAN attribute[].index.hnsw.enabled false attribute[].index.hnsw.maxlinkspernode 16 @@ -178,6 +183,7 @@ attribute[].upperbound 9223372036854775807 attribute[].densepostinglistthreshold 0.4 attribute[].tensortype "" attribute[].imported false +attribute[].maxuncommittedmemory 77777 attribute[].distancemetric EUCLIDEAN attribute[].index.hnsw.enabled false attribute[].index.hnsw.maxlinkspernode 16 @@ -209,6 +215,7 @@ attribute[].upperbound 9223372036854775807 attribute[].densepostinglistthreshold 0.4 attribute[].tensortype "" attribute[].imported false +attribute[].maxuncommittedmemory 77777 attribute[].distancemetric EUCLIDEAN attribute[].index.hnsw.enabled false attribute[].index.hnsw.maxlinkspernode 16 @@ -240,6 +247,7 @@ attribute[].upperbound 9223372036854775807 attribute[].densepostinglistthreshold 0.4 attribute[].tensortype "" attribute[].imported false +attribute[].maxuncommittedmemory 77777 attribute[].distancemetric EUCLIDEAN attribute[].index.hnsw.enabled false attribute[].index.hnsw.maxlinkspernode 16 @@ -271,6 +279,7 @@ attribute[].upperbound 9223372036854775807 attribute[].densepostinglistthreshold 0.4 attribute[].tensortype "" attribute[].imported false +attribute[].maxuncommittedmemory 77777 attribute[].distancemetric EUCLIDEAN attribute[].index.hnsw.enabled false attribute[].index.hnsw.maxlinkspernode 16 @@ -302,6 +311,7 @@ attribute[].upperbound 9223372036854775807 attribute[].densepostinglistthreshold 0.4 attribute[].tensortype "" attribute[].imported false +attribute[].maxuncommittedmemory 77777 attribute[].distancemetric EUCLIDEAN attribute[].index.hnsw.enabled false attribute[].index.hnsw.maxlinkspernode 16 @@ -333,6 +343,7 @@ attribute[].upperbound 9223372036854775807 attribute[].densepostinglistthreshold 0.4 attribute[].tensortype "" attribute[].imported false +attribute[].maxuncommittedmemory 77777 attribute[].distancemetric EUCLIDEAN attribute[].index.hnsw.enabled false attribute[].index.hnsw.maxlinkspernode 16 @@ -364,6 +375,7 @@ attribute[].upperbound 9223372036854775807 attribute[].densepostinglistthreshold 0.4 attribute[].tensortype "" attribute[].imported false +attribute[].maxuncommittedmemory 77777 attribute[].distancemetric EUCLIDEAN attribute[].index.hnsw.enabled false attribute[].index.hnsw.maxlinkspernode 16 @@ -395,6 +407,7 @@ attribute[].upperbound 9223372036854775807 attribute[].densepostinglistthreshold 0.4 attribute[].tensortype "" attribute[].imported false +attribute[].maxuncommittedmemory 77777 attribute[].distancemetric EUCLIDEAN attribute[].index.hnsw.enabled false attribute[].index.hnsw.maxlinkspernode 16 @@ -426,6 +439,7 @@ attribute[].upperbound 9223372036854775807 attribute[].densepostinglistthreshold 0.4 attribute[].tensortype "" attribute[].imported false +attribute[].maxuncommittedmemory 77777 attribute[].distancemetric EUCLIDEAN attribute[].index.hnsw.enabled false attribute[].index.hnsw.maxlinkspernode 16 @@ -457,6 +471,7 @@ attribute[].upperbound 9223372036854775807 attribute[].densepostinglistthreshold 0.4 attribute[].tensortype "" attribute[].imported false +attribute[].maxuncommittedmemory 77777 attribute[].distancemetric EUCLIDEAN attribute[].index.hnsw.enabled false attribute[].index.hnsw.maxlinkspernode 16 @@ -488,6 +503,7 @@ attribute[].upperbound 9223372036854775807 attribute[].densepostinglistthreshold 0.4 attribute[].tensortype "" attribute[].imported false +attribute[].maxuncommittedmemory 77777 attribute[].distancemetric EUCLIDEAN attribute[].index.hnsw.enabled false attribute[].index.hnsw.maxlinkspernode 16 @@ -519,6 +535,7 @@ attribute[].upperbound 9223372036854775807 attribute[].densepostinglistthreshold 0.4 attribute[].tensortype "" attribute[].imported false +attribute[].maxuncommittedmemory 77777 attribute[].distancemetric EUCLIDEAN attribute[].index.hnsw.enabled false attribute[].index.hnsw.maxlinkspernode 16 @@ -550,6 +567,7 @@ attribute[].upperbound 9223372036854775807 attribute[].densepostinglistthreshold 0.4 attribute[].tensortype "" attribute[].imported false +attribute[].maxuncommittedmemory 77777 attribute[].distancemetric EUCLIDEAN attribute[].index.hnsw.enabled false attribute[].index.hnsw.maxlinkspernode 16 diff --git a/config-model/src/test/derived/attributes/attributes.cfg b/config-model/src/test/derived/attributes/attributes.cfg index 051b8a11248..b29f0494fec 100644 --- a/config-model/src/test/derived/attributes/attributes.cfg +++ b/config-model/src/test/derived/attributes/attributes.cfg @@ -23,6 +23,7 @@ attribute[].upperbound 9223372036854775807 attribute[].densepostinglistthreshold 0.4 attribute[].tensortype "" attribute[].imported false +attribute[].maxuncommittedmemory 77777 attribute[].distancemetric EUCLIDEAN attribute[].index.hnsw.enabled false attribute[].index.hnsw.maxlinkspernode 16 @@ -54,6 +55,7 @@ attribute[].upperbound 9223372036854775807 attribute[].densepostinglistthreshold 0.4 attribute[].tensortype "" attribute[].imported false +attribute[].maxuncommittedmemory 77777 attribute[].distancemetric EUCLIDEAN attribute[].index.hnsw.enabled false attribute[].index.hnsw.maxlinkspernode 16 @@ -85,6 +87,7 @@ attribute[].upperbound 9223372036854775807 attribute[].densepostinglistthreshold 0.4 attribute[].tensortype "" attribute[].imported false +attribute[].maxuncommittedmemory 77777 attribute[].distancemetric EUCLIDEAN attribute[].index.hnsw.enabled false attribute[].index.hnsw.maxlinkspernode 16 @@ -116,6 +119,7 @@ attribute[].upperbound 9223372036854775807 attribute[].densepostinglistthreshold 0.4 attribute[].tensortype "" attribute[].imported false +attribute[].maxuncommittedmemory 77777 attribute[].distancemetric EUCLIDEAN attribute[].index.hnsw.enabled false attribute[].index.hnsw.maxlinkspernode 16 @@ -147,6 +151,7 @@ attribute[].upperbound 9223372036854775807 attribute[].densepostinglistthreshold 0.4 attribute[].tensortype "" attribute[].imported false +attribute[].maxuncommittedmemory 77777 attribute[].distancemetric EUCLIDEAN attribute[].index.hnsw.enabled false attribute[].index.hnsw.maxlinkspernode 16 @@ -178,6 +183,7 @@ attribute[].upperbound 9223372036854775807 attribute[].densepostinglistthreshold 0.4 attribute[].tensortype "" attribute[].imported false +attribute[].maxuncommittedmemory 77777 attribute[].distancemetric EUCLIDEAN attribute[].index.hnsw.enabled false attribute[].index.hnsw.maxlinkspernode 16 @@ -209,6 +215,7 @@ attribute[].upperbound 9223372036854775807 attribute[].densepostinglistthreshold 0.4 attribute[].tensortype "" attribute[].imported false +attribute[].maxuncommittedmemory 77777 attribute[].distancemetric EUCLIDEAN attribute[].index.hnsw.enabled false attribute[].index.hnsw.maxlinkspernode 16 @@ -240,6 +247,7 @@ attribute[].upperbound 9223372036854775807 attribute[].densepostinglistthreshold 0.4 attribute[].tensortype "" attribute[].imported false +attribute[].maxuncommittedmemory 77777 attribute[].distancemetric EUCLIDEAN attribute[].index.hnsw.enabled false attribute[].index.hnsw.maxlinkspernode 16 @@ -271,6 +279,7 @@ attribute[].upperbound 9223372036854775807 attribute[].densepostinglistthreshold 0.4 attribute[].tensortype "" attribute[].imported false +attribute[].maxuncommittedmemory 77777 attribute[].distancemetric EUCLIDEAN attribute[].index.hnsw.enabled false attribute[].index.hnsw.maxlinkspernode 16 @@ -302,6 +311,7 @@ attribute[].upperbound 9223372036854775807 attribute[].densepostinglistthreshold 0.4 attribute[].tensortype "" attribute[].imported false +attribute[].maxuncommittedmemory 77777 attribute[].distancemetric EUCLIDEAN attribute[].index.hnsw.enabled false attribute[].index.hnsw.maxlinkspernode 16 @@ -333,6 +343,7 @@ attribute[].upperbound 9223372036854775807 attribute[].densepostinglistthreshold 0.4 attribute[].tensortype "" attribute[].imported false +attribute[].maxuncommittedmemory 77777 attribute[].distancemetric EUCLIDEAN attribute[].index.hnsw.enabled false attribute[].index.hnsw.maxlinkspernode 16 @@ -364,6 +375,7 @@ attribute[].upperbound 9223372036854775807 attribute[].densepostinglistthreshold 0.4 attribute[].tensortype "" attribute[].imported false +attribute[].maxuncommittedmemory 77777 attribute[].distancemetric EUCLIDEAN attribute[].index.hnsw.enabled false attribute[].index.hnsw.maxlinkspernode 16 @@ -395,6 +407,7 @@ attribute[].upperbound 9223372036854775807 attribute[].densepostinglistthreshold 0.4 attribute[].tensortype "" attribute[].imported false +attribute[].maxuncommittedmemory 77777 attribute[].distancemetric EUCLIDEAN attribute[].index.hnsw.enabled false attribute[].index.hnsw.maxlinkspernode 16 @@ -426,6 +439,7 @@ attribute[].upperbound 9223372036854775807 attribute[].densepostinglistthreshold 0.4 attribute[].tensortype "" attribute[].imported false +attribute[].maxuncommittedmemory 77777 attribute[].distancemetric EUCLIDEAN attribute[].index.hnsw.enabled false attribute[].index.hnsw.maxlinkspernode 16 @@ -457,6 +471,7 @@ attribute[].upperbound 9223372036854775807 attribute[].densepostinglistthreshold 0.4 attribute[].tensortype "" attribute[].imported false +attribute[].maxuncommittedmemory 77777 attribute[].distancemetric EUCLIDEAN attribute[].index.hnsw.enabled false attribute[].index.hnsw.maxlinkspernode 16 @@ -488,6 +503,7 @@ attribute[].upperbound 9223372036854775807 attribute[].densepostinglistthreshold 0.4 attribute[].tensortype "" attribute[].imported false +attribute[].maxuncommittedmemory 77777 attribute[].distancemetric EUCLIDEAN attribute[].index.hnsw.enabled false attribute[].index.hnsw.maxlinkspernode 16 @@ -519,6 +535,7 @@ attribute[].upperbound 9223372036854775807 attribute[].densepostinglistthreshold 0.4 attribute[].tensortype "" attribute[].imported false +attribute[].maxuncommittedmemory 77777 attribute[].distancemetric EUCLIDEAN attribute[].index.hnsw.enabled false attribute[].index.hnsw.maxlinkspernode 16 @@ -550,6 +567,7 @@ attribute[].upperbound 9223372036854775807 attribute[].densepostinglistthreshold 0.4 attribute[].tensortype "" attribute[].imported false +attribute[].maxuncommittedmemory 77777 attribute[].distancemetric EUCLIDEAN attribute[].index.hnsw.enabled false attribute[].index.hnsw.maxlinkspernode 16 diff --git a/config-model/src/test/derived/complex/attributes.cfg b/config-model/src/test/derived/complex/attributes.cfg index dc71d841d25..86b6b9ebc13 100644 --- a/config-model/src/test/derived/complex/attributes.cfg +++ b/config-model/src/test/derived/complex/attributes.cfg @@ -23,6 +23,7 @@ attribute[].upperbound 9223372036854775807 attribute[].densepostinglistthreshold 0.4 attribute[].tensortype "" attribute[].imported false +attribute[].maxuncommittedmemory 77777 attribute[].distancemetric EUCLIDEAN attribute[].index.hnsw.enabled false attribute[].index.hnsw.maxlinkspernode 16 @@ -54,6 +55,7 @@ attribute[].upperbound 9223372036854775807 attribute[].densepostinglistthreshold 0.4 attribute[].tensortype "" attribute[].imported false +attribute[].maxuncommittedmemory 77777 attribute[].distancemetric EUCLIDEAN attribute[].index.hnsw.enabled false attribute[].index.hnsw.maxlinkspernode 16 @@ -85,6 +87,7 @@ attribute[].upperbound 9223372036854775807 attribute[].densepostinglistthreshold 0.4 attribute[].tensortype "" attribute[].imported false +attribute[].maxuncommittedmemory 77777 attribute[].distancemetric EUCLIDEAN attribute[].index.hnsw.enabled false attribute[].index.hnsw.maxlinkspernode 16 @@ -116,6 +119,7 @@ attribute[].upperbound 9223372036854775807 attribute[].densepostinglistthreshold 0.4 attribute[].tensortype "" attribute[].imported false +attribute[].maxuncommittedmemory 77777 attribute[].distancemetric EUCLIDEAN attribute[].index.hnsw.enabled false attribute[].index.hnsw.maxlinkspernode 16 @@ -147,6 +151,7 @@ attribute[].upperbound 9223372036854775807 attribute[].densepostinglistthreshold 0.4 attribute[].tensortype "" attribute[].imported false +attribute[].maxuncommittedmemory 77777 attribute[].distancemetric EUCLIDEAN attribute[].index.hnsw.enabled false attribute[].index.hnsw.maxlinkspernode 16 @@ -178,6 +183,7 @@ attribute[].upperbound 9223372036854775807 attribute[].densepostinglistthreshold 0.4 attribute[].tensortype "" attribute[].imported false +attribute[].maxuncommittedmemory 77777 attribute[].distancemetric EUCLIDEAN attribute[].index.hnsw.enabled false attribute[].index.hnsw.maxlinkspernode 16 @@ -209,6 +215,7 @@ attribute[].upperbound 9223372036854775807 attribute[].densepostinglistthreshold 0.4 attribute[].tensortype "" attribute[].imported false +attribute[].maxuncommittedmemory 77777 attribute[].distancemetric EUCLIDEAN attribute[].index.hnsw.enabled false attribute[].index.hnsw.maxlinkspernode 16 @@ -240,6 +247,7 @@ attribute[].upperbound 9223372036854775807 attribute[].densepostinglistthreshold 0.4 attribute[].tensortype "" attribute[].imported false +attribute[].maxuncommittedmemory 77777 attribute[].distancemetric EUCLIDEAN attribute[].index.hnsw.enabled false attribute[].index.hnsw.maxlinkspernode 16 @@ -271,6 +279,7 @@ attribute[].upperbound 9223372036854775807 attribute[].densepostinglistthreshold 0.4 attribute[].tensortype "" attribute[].imported false +attribute[].maxuncommittedmemory 77777 attribute[].distancemetric EUCLIDEAN attribute[].index.hnsw.enabled false attribute[].index.hnsw.maxlinkspernode 16 diff --git a/config-model/src/test/derived/hnsw_index/attributes.cfg b/config-model/src/test/derived/hnsw_index/attributes.cfg index b25f30d0462..403f78be2f7 100644 --- a/config-model/src/test/derived/hnsw_index/attributes.cfg +++ b/config-model/src/test/derived/hnsw_index/attributes.cfg @@ -23,6 +23,7 @@ attribute[].upperbound 9223372036854775807 attribute[].densepostinglistthreshold 0.4 attribute[].tensortype "tensor(x[128])" attribute[].imported false +attribute[].maxuncommittedmemory 77777 attribute[].distancemetric ANGULAR attribute[].index.hnsw.enabled true attribute[].index.hnsw.maxlinkspernode 32 @@ -54,6 +55,7 @@ attribute[].upperbound 9223372036854775807 attribute[].densepostinglistthreshold 0.4 attribute[].tensortype "tensor(x[2])" attribute[].imported false +attribute[].maxuncommittedmemory 77777 attribute[].distancemetric GEODEGREES attribute[].index.hnsw.enabled false attribute[].index.hnsw.maxlinkspernode 16 diff --git a/config-model/src/test/derived/imported_fields_inherited_reference/attributes.cfg b/config-model/src/test/derived/imported_fields_inherited_reference/attributes.cfg index c74b850eeac..bcf1b101caf 100644 --- a/config-model/src/test/derived/imported_fields_inherited_reference/attributes.cfg +++ b/config-model/src/test/derived/imported_fields_inherited_reference/attributes.cfg @@ -23,6 +23,7 @@ attribute[].upperbound 9223372036854775807 attribute[].densepostinglistthreshold 0.4 attribute[].tensortype "" attribute[].imported false +attribute[].maxuncommittedmemory 77777 attribute[].distancemetric EUCLIDEAN attribute[].index.hnsw.enabled false attribute[].index.hnsw.maxlinkspernode 16 @@ -54,6 +55,7 @@ attribute[].upperbound 9223372036854775807 attribute[].densepostinglistthreshold 0.4 attribute[].tensortype "" attribute[].imported false +attribute[].maxuncommittedmemory 77777 attribute[].distancemetric EUCLIDEAN attribute[].index.hnsw.enabled false attribute[].index.hnsw.maxlinkspernode 16 @@ -85,6 +87,7 @@ attribute[].upperbound 9223372036854775807 attribute[].densepostinglistthreshold 0.4 attribute[].tensortype "" attribute[].imported true +attribute[].maxuncommittedmemory 77777 attribute[].distancemetric EUCLIDEAN attribute[].index.hnsw.enabled false attribute[].index.hnsw.maxlinkspernode 16 @@ -116,6 +119,7 @@ attribute[].upperbound 9223372036854775807 attribute[].densepostinglistthreshold 0.4 attribute[].tensortype "" attribute[].imported true +attribute[].maxuncommittedmemory 77777 attribute[].distancemetric EUCLIDEAN attribute[].index.hnsw.enabled false attribute[].index.hnsw.maxlinkspernode 16 diff --git a/config-model/src/test/derived/imported_position_field/attributes.cfg b/config-model/src/test/derived/imported_position_field/attributes.cfg index b82d4828793..34219243d14 100644 --- a/config-model/src/test/derived/imported_position_field/attributes.cfg +++ b/config-model/src/test/derived/imported_position_field/attributes.cfg @@ -23,6 +23,7 @@ attribute[].upperbound 9223372036854775807 attribute[].densepostinglistthreshold 0.4 attribute[].tensortype "" attribute[].imported false +attribute[].maxuncommittedmemory 77777 attribute[].distancemetric EUCLIDEAN attribute[].index.hnsw.enabled false attribute[].index.hnsw.maxlinkspernode 16 @@ -54,6 +55,7 @@ attribute[].upperbound 9223372036854775807 attribute[].densepostinglistthreshold 0.4 attribute[].tensortype "" attribute[].imported true +attribute[].maxuncommittedmemory 77777 attribute[].distancemetric EUCLIDEAN attribute[].index.hnsw.enabled false attribute[].index.hnsw.maxlinkspernode 16 diff --git a/config-model/src/test/derived/imported_struct_fields/attributes.cfg b/config-model/src/test/derived/imported_struct_fields/attributes.cfg index 6cc4b807566..c974b46a904 100644 --- a/config-model/src/test/derived/imported_struct_fields/attributes.cfg +++ b/config-model/src/test/derived/imported_struct_fields/attributes.cfg @@ -23,6 +23,7 @@ attribute[].upperbound 9223372036854775807 attribute[].densepostinglistthreshold 0.4 attribute[].tensortype "" attribute[].imported false +attribute[].maxuncommittedmemory 77777 attribute[].distancemetric EUCLIDEAN attribute[].index.hnsw.enabled false attribute[].index.hnsw.maxlinkspernode 16 @@ -54,6 +55,7 @@ attribute[].upperbound 9223372036854775807 attribute[].densepostinglistthreshold 0.4 attribute[].tensortype "" attribute[].imported true +attribute[].maxuncommittedmemory 77777 attribute[].distancemetric EUCLIDEAN attribute[].index.hnsw.enabled false attribute[].index.hnsw.maxlinkspernode 16 @@ -85,6 +87,7 @@ attribute[].upperbound 9223372036854775807 attribute[].densepostinglistthreshold 0.4 attribute[].tensortype "" attribute[].imported true +attribute[].maxuncommittedmemory 77777 attribute[].distancemetric EUCLIDEAN attribute[].index.hnsw.enabled false attribute[].index.hnsw.maxlinkspernode 16 @@ -116,6 +119,7 @@ attribute[].upperbound 9223372036854775807 attribute[].densepostinglistthreshold 0.4 attribute[].tensortype "" attribute[].imported true +attribute[].maxuncommittedmemory 77777 attribute[].distancemetric EUCLIDEAN attribute[].index.hnsw.enabled false attribute[].index.hnsw.maxlinkspernode 16 @@ -147,6 +151,7 @@ attribute[].upperbound 9223372036854775807 attribute[].densepostinglistthreshold 0.4 attribute[].tensortype "" attribute[].imported true +attribute[].maxuncommittedmemory 77777 attribute[].distancemetric EUCLIDEAN attribute[].index.hnsw.enabled false attribute[].index.hnsw.maxlinkspernode 16 @@ -178,6 +183,7 @@ attribute[].upperbound 9223372036854775807 attribute[].densepostinglistthreshold 0.4 attribute[].tensortype "" attribute[].imported true +attribute[].maxuncommittedmemory 77777 attribute[].distancemetric EUCLIDEAN attribute[].index.hnsw.enabled false attribute[].index.hnsw.maxlinkspernode 16 @@ -209,6 +215,7 @@ attribute[].upperbound 9223372036854775807 attribute[].densepostinglistthreshold 0.4 attribute[].tensortype "" attribute[].imported true +attribute[].maxuncommittedmemory 77777 attribute[].distancemetric EUCLIDEAN attribute[].index.hnsw.enabled false attribute[].index.hnsw.maxlinkspernode 16 @@ -240,6 +247,7 @@ attribute[].upperbound 9223372036854775807 attribute[].densepostinglistthreshold 0.4 attribute[].tensortype "" attribute[].imported true +attribute[].maxuncommittedmemory 77777 attribute[].distancemetric EUCLIDEAN attribute[].index.hnsw.enabled false attribute[].index.hnsw.maxlinkspernode 16 diff --git a/config-model/src/test/derived/importedfields/attributes.cfg b/config-model/src/test/derived/importedfields/attributes.cfg index b70481a3c10..12970887510 100644 --- a/config-model/src/test/derived/importedfields/attributes.cfg +++ b/config-model/src/test/derived/importedfields/attributes.cfg @@ -23,6 +23,7 @@ attribute[].upperbound 9223372036854775807 attribute[].densepostinglistthreshold 0.4 attribute[].tensortype "" attribute[].imported false +attribute[].maxuncommittedmemory 77777 attribute[].distancemetric EUCLIDEAN attribute[].index.hnsw.enabled false attribute[].index.hnsw.maxlinkspernode 16 @@ -54,6 +55,7 @@ attribute[].upperbound 9223372036854775807 attribute[].densepostinglistthreshold 0.4 attribute[].tensortype "" attribute[].imported false +attribute[].maxuncommittedmemory 77777 attribute[].distancemetric EUCLIDEAN attribute[].index.hnsw.enabled false attribute[].index.hnsw.maxlinkspernode 16 @@ -85,6 +87,7 @@ attribute[].upperbound 9223372036854775807 attribute[].densepostinglistthreshold 0.4 attribute[].tensortype "" attribute[].imported false +attribute[].maxuncommittedmemory 77777 attribute[].distancemetric EUCLIDEAN attribute[].index.hnsw.enabled false attribute[].index.hnsw.maxlinkspernode 16 @@ -116,6 +119,7 @@ attribute[].upperbound 9223372036854775807 attribute[].densepostinglistthreshold 0.4 attribute[].tensortype "" attribute[].imported true +attribute[].maxuncommittedmemory 77777 attribute[].distancemetric EUCLIDEAN attribute[].index.hnsw.enabled false attribute[].index.hnsw.maxlinkspernode 16 @@ -147,6 +151,7 @@ attribute[].upperbound 9223372036854775807 attribute[].densepostinglistthreshold 0.4 attribute[].tensortype "" attribute[].imported true +attribute[].maxuncommittedmemory 77777 attribute[].distancemetric EUCLIDEAN attribute[].index.hnsw.enabled false attribute[].index.hnsw.maxlinkspernode 16 @@ -178,6 +183,7 @@ attribute[].upperbound 9223372036854775807 attribute[].densepostinglistthreshold 0.4 attribute[].tensortype "" attribute[].imported true +attribute[].maxuncommittedmemory 77777 attribute[].distancemetric EUCLIDEAN attribute[].index.hnsw.enabled false attribute[].index.hnsw.maxlinkspernode 16 @@ -209,6 +215,7 @@ attribute[].upperbound 9223372036854775807 attribute[].densepostinglistthreshold 0.4 attribute[].tensortype "" attribute[].imported true +attribute[].maxuncommittedmemory 77777 attribute[].distancemetric EUCLIDEAN attribute[].index.hnsw.enabled false attribute[].index.hnsw.maxlinkspernode 16 @@ -240,6 +247,7 @@ attribute[].upperbound 9223372036854775807 attribute[].densepostinglistthreshold 0.4 attribute[].tensortype "" attribute[].imported true +attribute[].maxuncommittedmemory 77777 attribute[].distancemetric EUCLIDEAN attribute[].index.hnsw.enabled false attribute[].index.hnsw.maxlinkspernode 16 diff --git a/config-model/src/test/derived/inheritance/attributes.cfg b/config-model/src/test/derived/inheritance/attributes.cfg index 09663615a3d..65514adf543 100644 --- a/config-model/src/test/derived/inheritance/attributes.cfg +++ b/config-model/src/test/derived/inheritance/attributes.cfg @@ -23,6 +23,7 @@ attribute[].upperbound 9223372036854775807 attribute[].densepostinglistthreshold 0.4 attribute[].tensortype "" attribute[].imported false +attribute[].maxuncommittedmemory 77777 attribute[].distancemetric EUCLIDEAN attribute[].index.hnsw.enabled false attribute[].index.hnsw.maxlinkspernode 16 @@ -54,6 +55,7 @@ attribute[].upperbound 9223372036854775807 attribute[].densepostinglistthreshold 0.4 attribute[].tensortype "" attribute[].imported false +attribute[].maxuncommittedmemory 77777 attribute[].distancemetric EUCLIDEAN attribute[].index.hnsw.enabled false attribute[].index.hnsw.maxlinkspernode 16 @@ -85,6 +87,7 @@ attribute[].upperbound 9223372036854775807 attribute[].densepostinglistthreshold 0.4 attribute[].tensortype "" attribute[].imported false +attribute[].maxuncommittedmemory 77777 attribute[].distancemetric EUCLIDEAN attribute[].index.hnsw.enabled false attribute[].index.hnsw.maxlinkspernode 16 diff --git a/config-model/src/test/derived/inheritfromparent/attributes.cfg b/config-model/src/test/derived/inheritfromparent/attributes.cfg index 7ce3940897f..59e90691421 100644 --- a/config-model/src/test/derived/inheritfromparent/attributes.cfg +++ b/config-model/src/test/derived/inheritfromparent/attributes.cfg @@ -23,6 +23,7 @@ attribute[].upperbound 9223372036854775807 attribute[].densepostinglistthreshold 0.4 attribute[].tensortype "" attribute[].imported false +attribute[].maxuncommittedmemory 77777 attribute[].distancemetric EUCLIDEAN attribute[].index.hnsw.enabled false attribute[].index.hnsw.maxlinkspernode 16 diff --git a/config-model/src/test/derived/map_attribute/attributes.cfg b/config-model/src/test/derived/map_attribute/attributes.cfg index 5db23544775..4f982ba9ec2 100644 --- a/config-model/src/test/derived/map_attribute/attributes.cfg +++ b/config-model/src/test/derived/map_attribute/attributes.cfg @@ -23,6 +23,7 @@ attribute[].upperbound 9223372036854775807 attribute[].densepostinglistthreshold 0.4 attribute[].tensortype "" attribute[].imported false +attribute[].maxuncommittedmemory 77777 attribute[].distancemetric EUCLIDEAN attribute[].index.hnsw.enabled false attribute[].index.hnsw.maxlinkspernode 16 @@ -54,6 +55,7 @@ attribute[].upperbound 9223372036854775807 attribute[].densepostinglistthreshold 0.4 attribute[].tensortype "" attribute[].imported false +attribute[].maxuncommittedmemory 77777 attribute[].distancemetric EUCLIDEAN attribute[].index.hnsw.enabled false attribute[].index.hnsw.maxlinkspernode 16 @@ -85,6 +87,7 @@ attribute[].upperbound 9223372036854775807 attribute[].densepostinglistthreshold 0.4 attribute[].tensortype "" attribute[].imported false +attribute[].maxuncommittedmemory 77777 attribute[].distancemetric EUCLIDEAN attribute[].index.hnsw.enabled false attribute[].index.hnsw.maxlinkspernode 16 diff --git a/config-model/src/test/derived/map_of_struct_attribute/attributes.cfg b/config-model/src/test/derived/map_of_struct_attribute/attributes.cfg index 2f4a1c2975e..27c3794271a 100644 --- a/config-model/src/test/derived/map_of_struct_attribute/attributes.cfg +++ b/config-model/src/test/derived/map_of_struct_attribute/attributes.cfg @@ -23,6 +23,7 @@ attribute[].upperbound 9223372036854775807 attribute[].densepostinglistthreshold 0.4 attribute[].tensortype "" attribute[].imported false +attribute[].maxuncommittedmemory 77777 attribute[].distancemetric EUCLIDEAN attribute[].index.hnsw.enabled false attribute[].index.hnsw.maxlinkspernode 16 @@ -54,6 +55,7 @@ attribute[].upperbound 9223372036854775807 attribute[].densepostinglistthreshold 0.4 attribute[].tensortype "" attribute[].imported false +attribute[].maxuncommittedmemory 77777 attribute[].distancemetric EUCLIDEAN attribute[].index.hnsw.enabled false attribute[].index.hnsw.maxlinkspernode 16 @@ -85,6 +87,7 @@ attribute[].upperbound 9223372036854775807 attribute[].densepostinglistthreshold 0.4 attribute[].tensortype "" attribute[].imported false +attribute[].maxuncommittedmemory 77777 attribute[].distancemetric EUCLIDEAN attribute[].index.hnsw.enabled false attribute[].index.hnsw.maxlinkspernode 16 @@ -116,6 +119,7 @@ attribute[].upperbound 9223372036854775807 attribute[].densepostinglistthreshold 0.4 attribute[].tensortype "" attribute[].imported false +attribute[].maxuncommittedmemory 77777 attribute[].distancemetric EUCLIDEAN attribute[].index.hnsw.enabled false attribute[].index.hnsw.maxlinkspernode 16 @@ -147,6 +151,7 @@ attribute[].upperbound 9223372036854775807 attribute[].densepostinglistthreshold 0.4 attribute[].tensortype "" attribute[].imported false +attribute[].maxuncommittedmemory 77777 attribute[].distancemetric EUCLIDEAN attribute[].index.hnsw.enabled false attribute[].index.hnsw.maxlinkspernode 16 diff --git a/config-model/src/test/derived/music/attributes.cfg b/config-model/src/test/derived/music/attributes.cfg index ce3509b2519..5dea7831ec4 100644 --- a/config-model/src/test/derived/music/attributes.cfg +++ b/config-model/src/test/derived/music/attributes.cfg @@ -23,6 +23,7 @@ attribute[].upperbound 9223372036854775807 attribute[].densepostinglistthreshold 0.4 attribute[].tensortype "" attribute[].imported false +attribute[].maxuncommittedmemory 77777 attribute[].distancemetric EUCLIDEAN attribute[].index.hnsw.enabled false attribute[].index.hnsw.maxlinkspernode 16 @@ -54,6 +55,7 @@ attribute[].upperbound 9223372036854775807 attribute[].densepostinglistthreshold 0.4 attribute[].tensortype "" attribute[].imported false +attribute[].maxuncommittedmemory 77777 attribute[].distancemetric EUCLIDEAN attribute[].index.hnsw.enabled false attribute[].index.hnsw.maxlinkspernode 16 @@ -85,6 +87,7 @@ attribute[].upperbound 9223372036854775807 attribute[].densepostinglistthreshold 0.4 attribute[].tensortype "" attribute[].imported false +attribute[].maxuncommittedmemory 77777 attribute[].distancemetric EUCLIDEAN attribute[].index.hnsw.enabled false attribute[].index.hnsw.maxlinkspernode 16 @@ -116,6 +119,7 @@ attribute[].upperbound 9223372036854775807 attribute[].densepostinglistthreshold 0.4 attribute[].tensortype "" attribute[].imported false +attribute[].maxuncommittedmemory 77777 attribute[].distancemetric EUCLIDEAN attribute[].index.hnsw.enabled false attribute[].index.hnsw.maxlinkspernode 16 @@ -147,6 +151,7 @@ attribute[].upperbound 9223372036854775807 attribute[].densepostinglistthreshold 0.4 attribute[].tensortype "" attribute[].imported false +attribute[].maxuncommittedmemory 77777 attribute[].distancemetric EUCLIDEAN attribute[].index.hnsw.enabled false attribute[].index.hnsw.maxlinkspernode 16 @@ -178,6 +183,7 @@ attribute[].upperbound 9223372036854775807 attribute[].densepostinglistthreshold 0.4 attribute[].tensortype "" attribute[].imported false +attribute[].maxuncommittedmemory 77777 attribute[].distancemetric EUCLIDEAN attribute[].index.hnsw.enabled false attribute[].index.hnsw.maxlinkspernode 16 @@ -209,6 +215,7 @@ attribute[].upperbound 9223372036854775807 attribute[].densepostinglistthreshold 0.4 attribute[].tensortype "" attribute[].imported false +attribute[].maxuncommittedmemory 77777 attribute[].distancemetric EUCLIDEAN attribute[].index.hnsw.enabled false attribute[].index.hnsw.maxlinkspernode 16 @@ -240,6 +247,7 @@ attribute[].upperbound 9223372036854775807 attribute[].densepostinglistthreshold 0.4 attribute[].tensortype "" attribute[].imported false +attribute[].maxuncommittedmemory 77777 attribute[].distancemetric EUCLIDEAN attribute[].index.hnsw.enabled false attribute[].index.hnsw.maxlinkspernode 16 @@ -271,6 +279,7 @@ attribute[].upperbound 9223372036854775807 attribute[].densepostinglistthreshold 0.4 attribute[].tensortype "" attribute[].imported false +attribute[].maxuncommittedmemory 77777 attribute[].distancemetric EUCLIDEAN attribute[].index.hnsw.enabled false attribute[].index.hnsw.maxlinkspernode 16 @@ -302,6 +311,7 @@ attribute[].upperbound 9223372036854775807 attribute[].densepostinglistthreshold 0.4 attribute[].tensortype "" attribute[].imported false +attribute[].maxuncommittedmemory 77777 attribute[].distancemetric EUCLIDEAN attribute[].index.hnsw.enabled false attribute[].index.hnsw.maxlinkspernode 16 @@ -333,6 +343,7 @@ attribute[].upperbound 9223372036854775807 attribute[].densepostinglistthreshold 0.4 attribute[].tensortype "" attribute[].imported false +attribute[].maxuncommittedmemory 77777 attribute[].distancemetric EUCLIDEAN attribute[].index.hnsw.enabled false attribute[].index.hnsw.maxlinkspernode 16 diff --git a/config-model/src/test/derived/newrank/attributes.cfg b/config-model/src/test/derived/newrank/attributes.cfg index dc445cde09f..5ba58f3081b 100644 --- a/config-model/src/test/derived/newrank/attributes.cfg +++ b/config-model/src/test/derived/newrank/attributes.cfg @@ -23,6 +23,7 @@ attribute[].upperbound 9223372036854775807 attribute[].densepostinglistthreshold 0.4 attribute[].tensortype "" attribute[].imported false +attribute[].maxuncommittedmemory 77777 attribute[].distancemetric EUCLIDEAN attribute[].index.hnsw.enabled false attribute[].index.hnsw.maxlinkspernode 16 @@ -54,6 +55,7 @@ attribute[].upperbound 9223372036854775807 attribute[].densepostinglistthreshold 0.4 attribute[].tensortype "" attribute[].imported false +attribute[].maxuncommittedmemory 77777 attribute[].distancemetric EUCLIDEAN attribute[].index.hnsw.enabled false attribute[].index.hnsw.maxlinkspernode 16 @@ -85,6 +87,7 @@ attribute[].upperbound 9223372036854775807 attribute[].densepostinglistthreshold 0.4 attribute[].tensortype "" attribute[].imported false +attribute[].maxuncommittedmemory 77777 attribute[].distancemetric EUCLIDEAN attribute[].index.hnsw.enabled false attribute[].index.hnsw.maxlinkspernode 16 @@ -116,6 +119,7 @@ attribute[].upperbound 9223372036854775807 attribute[].densepostinglistthreshold 0.4 attribute[].tensortype "" attribute[].imported false +attribute[].maxuncommittedmemory 77777 attribute[].distancemetric EUCLIDEAN attribute[].index.hnsw.enabled false attribute[].index.hnsw.maxlinkspernode 16 @@ -147,6 +151,7 @@ attribute[].upperbound 9223372036854775807 attribute[].densepostinglistthreshold 0.4 attribute[].tensortype "" attribute[].imported false +attribute[].maxuncommittedmemory 77777 attribute[].distancemetric EUCLIDEAN attribute[].index.hnsw.enabled false attribute[].index.hnsw.maxlinkspernode 16 @@ -178,6 +183,7 @@ attribute[].upperbound 9223372036854775807 attribute[].densepostinglistthreshold 0.4 attribute[].tensortype "" attribute[].imported false +attribute[].maxuncommittedmemory 77777 attribute[].distancemetric EUCLIDEAN attribute[].index.hnsw.enabled false attribute[].index.hnsw.maxlinkspernode 16 @@ -209,6 +215,7 @@ attribute[].upperbound 9223372036854775807 attribute[].densepostinglistthreshold 0.4 attribute[].tensortype "" attribute[].imported false +attribute[].maxuncommittedmemory 77777 attribute[].distancemetric EUCLIDEAN attribute[].index.hnsw.enabled false attribute[].index.hnsw.maxlinkspernode 16 @@ -240,6 +247,7 @@ attribute[].upperbound 9223372036854775807 attribute[].densepostinglistthreshold 0.4 attribute[].tensortype "" attribute[].imported false +attribute[].maxuncommittedmemory 77777 attribute[].distancemetric EUCLIDEAN attribute[].index.hnsw.enabled false attribute[].index.hnsw.maxlinkspernode 16 @@ -271,6 +279,7 @@ attribute[].upperbound 9223372036854775807 attribute[].densepostinglistthreshold 0.4 attribute[].tensortype "" attribute[].imported false +attribute[].maxuncommittedmemory 77777 attribute[].distancemetric EUCLIDEAN attribute[].index.hnsw.enabled false attribute[].index.hnsw.maxlinkspernode 16 @@ -302,6 +311,7 @@ attribute[].upperbound 9223372036854775807 attribute[].densepostinglistthreshold 0.4 attribute[].tensortype "" attribute[].imported false +attribute[].maxuncommittedmemory 77777 attribute[].distancemetric EUCLIDEAN attribute[].index.hnsw.enabled false attribute[].index.hnsw.maxlinkspernode 16 diff --git a/config-model/src/test/derived/predicate_attribute/attributes.cfg b/config-model/src/test/derived/predicate_attribute/attributes.cfg index 0d84a1e102e..513f4320f58 100644 --- a/config-model/src/test/derived/predicate_attribute/attributes.cfg +++ b/config-model/src/test/derived/predicate_attribute/attributes.cfg @@ -23,6 +23,7 @@ attribute[].upperbound 200 attribute[].densepostinglistthreshold 0.2 attribute[].tensortype "" attribute[].imported false +attribute[].maxuncommittedmemory 77777 attribute[].distancemetric EUCLIDEAN attribute[].index.hnsw.enabled false attribute[].index.hnsw.maxlinkspernode 16 diff --git a/config-model/src/test/derived/prefixexactattribute/attributes.cfg b/config-model/src/test/derived/prefixexactattribute/attributes.cfg index 35671069fda..7051a228ba3 100644 --- a/config-model/src/test/derived/prefixexactattribute/attributes.cfg +++ b/config-model/src/test/derived/prefixexactattribute/attributes.cfg @@ -23,6 +23,7 @@ attribute[].upperbound 9223372036854775807 attribute[].densepostinglistthreshold 0.4 attribute[].tensortype "" attribute[].imported false +attribute[].maxuncommittedmemory 77777 attribute[].distancemetric EUCLIDEAN attribute[].index.hnsw.enabled false attribute[].index.hnsw.maxlinkspernode 16 @@ -54,6 +55,7 @@ attribute[].upperbound 9223372036854775807 attribute[].densepostinglistthreshold 0.4 attribute[].tensortype "" attribute[].imported false +attribute[].maxuncommittedmemory 77777 attribute[].distancemetric EUCLIDEAN attribute[].index.hnsw.enabled false attribute[].index.hnsw.maxlinkspernode 16 diff --git a/config-model/src/test/derived/reference_fields/attributes.cfg b/config-model/src/test/derived/reference_fields/attributes.cfg index 8fa0da9aace..e1868700198 100644 --- a/config-model/src/test/derived/reference_fields/attributes.cfg +++ b/config-model/src/test/derived/reference_fields/attributes.cfg @@ -23,6 +23,7 @@ attribute[].upperbound 9223372036854775807 attribute[].densepostinglistthreshold 0.4 attribute[].tensortype "" attribute[].imported false +attribute[].maxuncommittedmemory 77777 attribute[].distancemetric EUCLIDEAN attribute[].index.hnsw.enabled false attribute[].index.hnsw.maxlinkspernode 16 @@ -54,6 +55,7 @@ attribute[].upperbound 9223372036854775807 attribute[].densepostinglistthreshold 0.4 attribute[].tensortype "" attribute[].imported false +attribute[].maxuncommittedmemory 77777 attribute[].distancemetric EUCLIDEAN attribute[].index.hnsw.enabled false attribute[].index.hnsw.maxlinkspernode 16 @@ -85,6 +87,7 @@ attribute[].upperbound 9223372036854775807 attribute[].densepostinglistthreshold 0.4 attribute[].tensortype "" attribute[].imported false +attribute[].maxuncommittedmemory 77777 attribute[].distancemetric EUCLIDEAN attribute[].index.hnsw.enabled false attribute[].index.hnsw.maxlinkspernode 16 diff --git a/config-model/src/test/derived/schemainheritance/attributes.cfg b/config-model/src/test/derived/schemainheritance/attributes.cfg index ad48742a20f..26bd10a262c 100644 --- a/config-model/src/test/derived/schemainheritance/attributes.cfg +++ b/config-model/src/test/derived/schemainheritance/attributes.cfg @@ -23,6 +23,7 @@ attribute[].upperbound 9223372036854775807 attribute[].densepostinglistthreshold 0.4 attribute[].tensortype "" attribute[].imported false +attribute[].maxuncommittedmemory 77777 attribute[].distancemetric EUCLIDEAN attribute[].index.hnsw.enabled false attribute[].index.hnsw.maxlinkspernode 16 @@ -54,6 +55,7 @@ attribute[].upperbound 9223372036854775807 attribute[].densepostinglistthreshold 0.4 attribute[].tensortype "" attribute[].imported false +attribute[].maxuncommittedmemory 77777 attribute[].distancemetric EUCLIDEAN attribute[].index.hnsw.enabled false attribute[].index.hnsw.maxlinkspernode 16 @@ -85,6 +87,7 @@ attribute[].upperbound 9223372036854775807 attribute[].densepostinglistthreshold 0.4 attribute[].tensortype "" attribute[].imported false +attribute[].maxuncommittedmemory 77777 attribute[].distancemetric EUCLIDEAN attribute[].index.hnsw.enabled false attribute[].index.hnsw.maxlinkspernode 16 @@ -116,6 +119,7 @@ attribute[].upperbound 9223372036854775807 attribute[].densepostinglistthreshold 0.4 attribute[].tensortype "" attribute[].imported true +attribute[].maxuncommittedmemory 77777 attribute[].distancemetric EUCLIDEAN attribute[].index.hnsw.enabled false attribute[].index.hnsw.maxlinkspernode 16 @@ -147,6 +151,7 @@ attribute[].upperbound 9223372036854775807 attribute[].densepostinglistthreshold 0.4 attribute[].tensortype "" attribute[].imported true +attribute[].maxuncommittedmemory 77777 attribute[].distancemetric EUCLIDEAN attribute[].index.hnsw.enabled false attribute[].index.hnsw.maxlinkspernode 16 diff --git a/config-model/src/test/derived/sorting/attributes.cfg b/config-model/src/test/derived/sorting/attributes.cfg index da23c247a28..5d44943535f 100644 --- a/config-model/src/test/derived/sorting/attributes.cfg +++ b/config-model/src/test/derived/sorting/attributes.cfg @@ -23,6 +23,7 @@ attribute[].upperbound 9223372036854775807 attribute[].densepostinglistthreshold 0.4 attribute[].tensortype "" attribute[].imported false +attribute[].maxuncommittedmemory 77777 attribute[].distancemetric EUCLIDEAN attribute[].index.hnsw.enabled false attribute[].index.hnsw.maxlinkspernode 16 @@ -54,6 +55,7 @@ attribute[].upperbound 9223372036854775807 attribute[].densepostinglistthreshold 0.4 attribute[].tensortype "" attribute[].imported false +attribute[].maxuncommittedmemory 77777 attribute[].distancemetric EUCLIDEAN attribute[].index.hnsw.enabled false attribute[].index.hnsw.maxlinkspernode 16 @@ -85,6 +87,7 @@ attribute[].upperbound 9223372036854775807 attribute[].densepostinglistthreshold 0.4 attribute[].tensortype "" attribute[].imported false +attribute[].maxuncommittedmemory 77777 attribute[].distancemetric EUCLIDEAN attribute[].index.hnsw.enabled false attribute[].index.hnsw.maxlinkspernode 16 diff --git a/config-model/src/test/derived/tensor/attributes.cfg b/config-model/src/test/derived/tensor/attributes.cfg index 5acc99aa640..8e28044a724 100644 --- a/config-model/src/test/derived/tensor/attributes.cfg +++ b/config-model/src/test/derived/tensor/attributes.cfg @@ -23,6 +23,7 @@ attribute[].upperbound 9223372036854775807 attribute[].densepostinglistthreshold 0.4 attribute[].tensortype "tensor<float>(x[2],y[1])" attribute[].imported false +attribute[].maxuncommittedmemory 77777 attribute[].distancemetric EUCLIDEAN attribute[].index.hnsw.enabled false attribute[].index.hnsw.maxlinkspernode 16 @@ -54,6 +55,7 @@ attribute[].upperbound 9223372036854775807 attribute[].densepostinglistthreshold 0.4 attribute[].tensortype "tensor(x{})" attribute[].imported false +attribute[].maxuncommittedmemory 77777 attribute[].distancemetric EUCLIDEAN attribute[].index.hnsw.enabled false attribute[].index.hnsw.maxlinkspernode 16 @@ -85,6 +87,7 @@ attribute[].upperbound 9223372036854775807 attribute[].densepostinglistthreshold 0.4 attribute[].tensortype "tensor(x[10],y[10])" attribute[].imported false +attribute[].maxuncommittedmemory 77777 attribute[].distancemetric EUCLIDEAN attribute[].index.hnsw.enabled false attribute[].index.hnsw.maxlinkspernode 16 @@ -116,6 +119,7 @@ attribute[].upperbound 9223372036854775807 attribute[].densepostinglistthreshold 0.4 attribute[].tensortype "tensor<float>(x[10])" attribute[].imported false +attribute[].maxuncommittedmemory 77777 attribute[].distancemetric EUCLIDEAN attribute[].index.hnsw.enabled false attribute[].index.hnsw.maxlinkspernode 16 @@ -147,6 +151,7 @@ attribute[].upperbound 9223372036854775807 attribute[].densepostinglistthreshold 0.4 attribute[].tensortype "" attribute[].imported false +attribute[].maxuncommittedmemory 77777 attribute[].distancemetric EUCLIDEAN attribute[].index.hnsw.enabled false attribute[].index.hnsw.maxlinkspernode 16 diff --git a/config-model/src/test/derived/types/attributes.cfg b/config-model/src/test/derived/types/attributes.cfg index ed23b285b3b..37b56481506 100644 --- a/config-model/src/test/derived/types/attributes.cfg +++ b/config-model/src/test/derived/types/attributes.cfg @@ -23,6 +23,7 @@ attribute[].upperbound 9223372036854775807 attribute[].densepostinglistthreshold 0.4 attribute[].tensortype "" attribute[].imported false +attribute[].maxuncommittedmemory 77777 attribute[].distancemetric EUCLIDEAN attribute[].index.hnsw.enabled false attribute[].index.hnsw.maxlinkspernode 16 @@ -54,6 +55,7 @@ attribute[].upperbound 9223372036854775807 attribute[].densepostinglistthreshold 0.4 attribute[].tensortype "" attribute[].imported false +attribute[].maxuncommittedmemory 77777 attribute[].distancemetric EUCLIDEAN attribute[].index.hnsw.enabled false attribute[].index.hnsw.maxlinkspernode 16 @@ -85,6 +87,7 @@ attribute[].upperbound 9223372036854775807 attribute[].densepostinglistthreshold 0.4 attribute[].tensortype "" attribute[].imported false +attribute[].maxuncommittedmemory 77777 attribute[].distancemetric EUCLIDEAN attribute[].index.hnsw.enabled false attribute[].index.hnsw.maxlinkspernode 16 @@ -116,6 +119,7 @@ attribute[].upperbound 9223372036854775807 attribute[].densepostinglistthreshold 0.4 attribute[].tensortype "" attribute[].imported false +attribute[].maxuncommittedmemory 77777 attribute[].distancemetric EUCLIDEAN attribute[].index.hnsw.enabled false attribute[].index.hnsw.maxlinkspernode 16 @@ -147,6 +151,7 @@ attribute[].upperbound 9223372036854775807 attribute[].densepostinglistthreshold 0.4 attribute[].tensortype "" attribute[].imported false +attribute[].maxuncommittedmemory 77777 attribute[].distancemetric EUCLIDEAN attribute[].index.hnsw.enabled false attribute[].index.hnsw.maxlinkspernode 16 @@ -178,6 +183,7 @@ attribute[].upperbound 9223372036854775807 attribute[].densepostinglistthreshold 0.4 attribute[].tensortype "" attribute[].imported false +attribute[].maxuncommittedmemory 77777 attribute[].distancemetric EUCLIDEAN attribute[].index.hnsw.enabled false attribute[].index.hnsw.maxlinkspernode 16 @@ -209,6 +215,7 @@ attribute[].upperbound 9223372036854775807 attribute[].densepostinglistthreshold 0.4 attribute[].tensortype "" attribute[].imported false +attribute[].maxuncommittedmemory 77777 attribute[].distancemetric EUCLIDEAN attribute[].index.hnsw.enabled false attribute[].index.hnsw.maxlinkspernode 16 @@ -240,6 +247,7 @@ attribute[].upperbound 9223372036854775807 attribute[].densepostinglistthreshold 0.4 attribute[].tensortype "" attribute[].imported false +attribute[].maxuncommittedmemory 77777 attribute[].distancemetric EUCLIDEAN attribute[].index.hnsw.enabled false attribute[].index.hnsw.maxlinkspernode 16 @@ -271,6 +279,7 @@ attribute[].upperbound 9223372036854775807 attribute[].densepostinglistthreshold 0.4 attribute[].tensortype "" attribute[].imported false +attribute[].maxuncommittedmemory 77777 attribute[].distancemetric EUCLIDEAN attribute[].index.hnsw.enabled false attribute[].index.hnsw.maxlinkspernode 16 @@ -302,6 +311,7 @@ attribute[].upperbound 9223372036854775807 attribute[].densepostinglistthreshold 0.4 attribute[].tensortype "" attribute[].imported false +attribute[].maxuncommittedmemory 77777 attribute[].distancemetric EUCLIDEAN attribute[].index.hnsw.enabled false attribute[].index.hnsw.maxlinkspernode 16 @@ -333,6 +343,7 @@ attribute[].upperbound 9223372036854775807 attribute[].densepostinglistthreshold 0.4 attribute[].tensortype "" attribute[].imported false +attribute[].maxuncommittedmemory 77777 attribute[].distancemetric EUCLIDEAN attribute[].index.hnsw.enabled false attribute[].index.hnsw.maxlinkspernode 16 @@ -364,6 +375,7 @@ attribute[].upperbound 9223372036854775807 attribute[].densepostinglistthreshold 0.4 attribute[].tensortype "" attribute[].imported false +attribute[].maxuncommittedmemory 77777 attribute[].distancemetric EUCLIDEAN attribute[].index.hnsw.enabled false attribute[].index.hnsw.maxlinkspernode 16 @@ -395,6 +407,7 @@ attribute[].upperbound 9223372036854775807 attribute[].densepostinglistthreshold 0.4 attribute[].tensortype "" attribute[].imported false +attribute[].maxuncommittedmemory 77777 attribute[].distancemetric EUCLIDEAN attribute[].index.hnsw.enabled false attribute[].index.hnsw.maxlinkspernode 16 diff --git a/config-model/src/test/java/com/yahoo/searchdefinition/AttributeSettingsTestCase.java b/config-model/src/test/java/com/yahoo/searchdefinition/AttributeSettingsTestCase.java index 22ae06d929a..b891fc97924 100644 --- a/config-model/src/test/java/com/yahoo/searchdefinition/AttributeSettingsTestCase.java +++ b/config-model/src/test/java/com/yahoo/searchdefinition/AttributeSettingsTestCase.java @@ -206,7 +206,7 @@ public class AttributeSettingsTestCase extends AbstractSchemaTestCase { AttributeFields attributes = new AttributeFields(getSearchWithMutables()); AttributesConfig.Builder builder = new AttributesConfig.Builder(); - attributes.getConfig(builder); + attributes.getConfig(builder, AttributeFields.FieldSet.ALL, 13333); AttributesConfig cfg = builder.build(); assertEquals("a", cfg.attribute().get(0).name()); assertFalse(cfg.attribute().get(0).ismutable()); @@ -216,7 +216,23 @@ public class AttributeSettingsTestCase extends AbstractSchemaTestCase { assertEquals("m", cfg.attribute().get(2).name()); assertTrue(cfg.attribute().get(2).ismutable()); + } + + @Test + public void requireMaxUnCommittedMemoryIsProperlyPropagated() throws ParseException { + AttributeFields attributes = new AttributeFields(getSearchWithMutables()); + AttributesConfig.Builder builder = new AttributesConfig.Builder(); + attributes.getConfig(builder, AttributeFields.FieldSet.ALL, 13333); + AttributesConfig cfg = builder.build(); + assertEquals("a", cfg.attribute().get(0).name()); + assertEquals(13333, cfg.attribute().get(0).maxuncommittedmemory()); + + assertEquals("f", cfg.attribute().get(1).name()); + assertEquals(13333, cfg.attribute().get(1).maxuncommittedmemory()); + + assertEquals("m", cfg.attribute().get(2).name()); + assertEquals(13333, cfg.attribute().get(2).maxuncommittedmemory()); } @Test diff --git a/config-model/src/test/java/com/yahoo/searchdefinition/SchemaTestCase.java b/config-model/src/test/java/com/yahoo/searchdefinition/SchemaTestCase.java index 329d27472c2..8b96779f695 100644 --- a/config-model/src/test/java/com/yahoo/searchdefinition/SchemaTestCase.java +++ b/config-model/src/test/java/com/yahoo/searchdefinition/SchemaTestCase.java @@ -166,7 +166,7 @@ public class SchemaTestCase { assertTrue(child.onnxModels().asMap().containsKey("child_model")); assertNotNull(child.getSummary("parent_summary")); assertNotNull(child.getSummary("child_summary")); - assertEquals("parent_summary", child.getSummary("child_summary").getInherited().getName()); + assertEquals("parent_summary", child.getSummary("child_summary").inherited().get().getName()); assertTrue(child.getSummaries().containsKey("parent_summary")); assertTrue(child.getSummaries().containsKey("child_summary")); assertNotNull(child.getSummaryField("pf1")); diff --git a/config-model/src/test/java/com/yahoo/searchdefinition/SummaryTestCase.java b/config-model/src/test/java/com/yahoo/searchdefinition/SummaryTestCase.java index e57dcf38fed..dee63f04ad5 100644 --- a/config-model/src/test/java/com/yahoo/searchdefinition/SummaryTestCase.java +++ b/config-model/src/test/java/com/yahoo/searchdefinition/SummaryTestCase.java @@ -10,6 +10,7 @@ import static com.yahoo.config.model.test.TestUtil.joinLines; import java.util.Collection; import java.util.List; +import java.util.Optional; import java.util.logging.Level; import java.util.stream.Collectors; @@ -172,12 +173,12 @@ public class SummaryTestCase { new TestValue(everythingSummary, titleArtistSummary, List.of(List.of(titleField), implicitFields, List.of(artistField, albumField))) ); tests.forEach(testValue -> { - var actualFields = testValue.summary.getSummaryFields().stream() + var actualFields = testValue.summary.getSummaryFields().values().stream() .map(FieldBase::getName) .collect(Collectors.toList()); assertEquals(testValue.summary.getName() + (testValue.parent == null ? " does not inherit anything" : " inherits " + testValue.parent.getName()), - testValue.parent, - testValue.summary.getInherited()); + Optional.ofNullable(testValue.parent), + testValue.summary.inherited()); assertEquals("Summary " + testValue.summary.getName() + " has expected fields", testValue.fields, actualFields); }); } diff --git a/config-model/src/test/java/com/yahoo/searchdefinition/processing/DictionaryTestCase.java b/config-model/src/test/java/com/yahoo/searchdefinition/processing/DictionaryTestCase.java index 20ff10cb48e..806b9b3358d 100644 --- a/config-model/src/test/java/com/yahoo/searchdefinition/processing/DictionaryTestCase.java +++ b/config-model/src/test/java/com/yahoo/searchdefinition/processing/DictionaryTestCase.java @@ -26,7 +26,7 @@ public class DictionaryTestCase { private static AttributesConfig getConfig(Schema schema) { AttributeFields attributes = new AttributeFields(schema); AttributesConfig.Builder builder = new AttributesConfig.Builder(); - attributes.getConfig(builder); + attributes.getConfig(builder, AttributeFields.FieldSet.ALL, 130000); return builder.build(); } private Schema createSearch(String def) throws ParseException { diff --git a/config-model/src/test/java/com/yahoo/vespa/model/search/test/DocumentDatabaseTestCase.java b/config-model/src/test/java/com/yahoo/vespa/model/search/test/DocumentDatabaseTestCase.java index abd9e7fb8b3..8651e68bd9a 100644 --- a/config-model/src/test/java/com/yahoo/vespa/model/search/test/DocumentDatabaseTestCase.java +++ b/config-model/src/test/java/com/yahoo/vespa/model/search/test/DocumentDatabaseTestCase.java @@ -2,7 +2,6 @@ package com.yahoo.vespa.model.search.test; import com.google.common.collect.ImmutableMap; -import com.yahoo.config.model.api.ModelContext; import com.yahoo.config.model.deploy.DeployState; import com.yahoo.config.model.deploy.TestProperties; import com.yahoo.vespa.config.search.IndexschemaConfig; @@ -35,7 +34,7 @@ public class DocumentDatabaseTestCase { private static final double SMALL = 0.00000000000001; - private String vespaHosts = "<?xml version='1.0' encoding='utf-8' ?>" + + private static final String vespaHosts = "<?xml version='1.0' encoding='utf-8' ?>" + "<hosts> " + " <host name='foo'>" + " <alias>node0</alias>" + @@ -194,7 +193,7 @@ public class DocumentDatabaseTestCase { assertEquals("c", proton.documentdb(2).inputdoctypename()); } - private void verifyInitialDocumentCount(List<DocType> nameAndModes, String xmlTuning, long global, List<Long> local) { + private void verifyInitialDocumentCount(List<DocType> nameAndModes, String xmlTuning, List<Long> local) { assertEquals(nameAndModes.size(), local.size()); VespaModel model = createModel(nameAndModes, xmlTuning); ContentSearchCluster contentSearchCluster = model.getContentClusters().get("test").getSearch(); @@ -209,7 +208,7 @@ public class DocumentDatabaseTestCase { public void requireThatMixedModeInitialDocumentCountIsReflectedCorrectlyForDefault() { final long DEFAULT = 1024L; verifyInitialDocumentCount(Arrays.asList(DocType.create("a", "index"), DocType.create("b", "streaming")), - "", DEFAULT, Arrays.asList(DEFAULT, DEFAULT)); + "", Arrays.asList(DEFAULT, DEFAULT)); } @Test public void requireThatMixedModeInitialDocumentCountIsReflected() { @@ -218,7 +217,7 @@ public class DocumentDatabaseTestCase { " <initialdocumentcount>1000000000</initialdocumentcount>" + "</resizing>\n"; verifyInitialDocumentCount(Arrays.asList(DocType.create("a", "index"), DocType.create("b", "streaming")), - feedTuning, INITIAL, Arrays.asList(INITIAL, INITIAL)); + feedTuning, Arrays.asList(INITIAL, INITIAL)); } private void assertDocTypeConfig(VespaModel model, String configId, String indexField, String attributeField) { @@ -361,12 +360,20 @@ public class DocumentDatabaseTestCase { assertDocumentDBConfigAvailableForStreaming("streaming"); } + private void assertAttributesConfigIndependentOfMode(String mode, List<String> sds, + List<String> documentDBConfigIds, + Map<String, List<String>> expectedAttributesMap) + { + assertAttributesConfigIndependentOfMode(mode, sds, documentDBConfigIds, expectedAttributesMap, new DeployState.Builder(), 123456); + } private void assertAttributesConfigIndependentOfMode(String mode, List<String> sds, List<String> documentDBConfigIds, - Map<String, List<String>> expectedAttributesMap) { + Map<String, List<String>> expectedAttributesMap, + DeployState.Builder builder, + long expectedMaxUnCommittedMemory) { VespaModel model = new VespaModelCreatorWithMockPkg(vespaHosts, createVespaServices(sds, mode), - ApplicationPackageUtils.generateSchemas(sds)).create(); + ApplicationPackageUtils.generateSchemas(sds)).create(builder); ContentSearchCluster contentSearchCluster = model.getContentClusters().get("test").getSearch(); ProtonConfig proton = getProtonCfg(contentSearchCluster); @@ -380,17 +387,27 @@ public class DocumentDatabaseTestCase { assertEquals(expectedAttributes.size(), rac1.attribute().size()); for (int j = 0; j < expectedAttributes.size(); j++) { assertEquals(expectedAttributes.get(j), rac1.attribute(j).name()); + assertEquals(expectedMaxUnCommittedMemory, rac1.attribute(j).maxuncommittedmemory()); } } } } @Test + public void testThatAttributesMaxUnCommittedMemoryIsControlledByFeatureFlag() { + assertAttributesConfigIndependentOfMode("index", Arrays.asList("type1"), + Arrays.asList("test/search/cluster.test/type1"), + ImmutableMap.of("type1", Arrays.asList("f2", "f2_nfa")), + new DeployState.Builder().properties(new TestProperties().maxUnCommittedMemory(193452)), 193452); + } + + @Test public void testThatAttributesConfigIsProducedForIndexed() { assertAttributesConfigIndependentOfMode("index", Arrays.asList("type1"), Arrays.asList("test/search/cluster.test/type1"), ImmutableMap.of("type1", Arrays.asList("f2", "f2_nfa"))); } + @Test public void testThatAttributesConfigIsProducedForStreamingForFastAccessFields() { assertAttributesConfigIndependentOfMode("streaming", Arrays.asList("type1"), |