aboutsummaryrefslogtreecommitdiffstats
path: root/config-model/src/main/java/com/yahoo/schema
diff options
context:
space:
mode:
Diffstat (limited to 'config-model/src/main/java/com/yahoo/schema')
-rw-r--r--config-model/src/main/java/com/yahoo/schema/Application.java2
-rw-r--r--config-model/src/main/java/com/yahoo/schema/ApplicationBuilder.java2
-rw-r--r--config-model/src/main/java/com/yahoo/schema/DefaultRankProfile.java2
-rw-r--r--config-model/src/main/java/com/yahoo/schema/DistributableResource.java2
-rw-r--r--config-model/src/main/java/com/yahoo/schema/DocumentGraphValidator.java2
-rw-r--r--config-model/src/main/java/com/yahoo/schema/DocumentModelBuilder.java2
-rw-r--r--config-model/src/main/java/com/yahoo/schema/DocumentOnlySchema.java2
-rw-r--r--config-model/src/main/java/com/yahoo/schema/DocumentReference.java2
-rw-r--r--config-model/src/main/java/com/yahoo/schema/DocumentReferenceResolver.java2
-rw-r--r--config-model/src/main/java/com/yahoo/schema/DocumentReferences.java2
-rw-r--r--config-model/src/main/java/com/yahoo/schema/DocumentsOnlyRankProfile.java2
-rw-r--r--config-model/src/main/java/com/yahoo/schema/FeatureNames.java2
-rw-r--r--config-model/src/main/java/com/yahoo/schema/FieldSets.java2
-rw-r--r--config-model/src/main/java/com/yahoo/schema/ImmutableSchema.java2
-rw-r--r--config-model/src/main/java/com/yahoo/schema/ImportedFieldsEnumerator.java2
-rw-r--r--config-model/src/main/java/com/yahoo/schema/Index.java2
-rw-r--r--config-model/src/main/java/com/yahoo/schema/LargeRankingExpressions.java2
-rw-r--r--config-model/src/main/java/com/yahoo/schema/MapEvaluationTypeContext.java2
-rw-r--r--config-model/src/main/java/com/yahoo/schema/OnnxModel.java2
-rw-r--r--config-model/src/main/java/com/yahoo/schema/RankProfile.java120
-rw-r--r--config-model/src/main/java/com/yahoo/schema/RankProfileRegistry.java2
-rw-r--r--config-model/src/main/java/com/yahoo/schema/RankingExpressionBody.java2
-rw-r--r--config-model/src/main/java/com/yahoo/schema/Schema.java2
-rw-r--r--config-model/src/main/java/com/yahoo/schema/UnrankedRankProfile.java2
-rw-r--r--config-model/src/main/java/com/yahoo/schema/derived/AttributeFields.java2
-rw-r--r--config-model/src/main/java/com/yahoo/schema/derived/Derived.java2
-rw-r--r--config-model/src/main/java/com/yahoo/schema/derived/DerivedConfiguration.java2
-rw-r--r--config-model/src/main/java/com/yahoo/schema/derived/Deriver.java2
-rw-r--r--config-model/src/main/java/com/yahoo/schema/derived/Exportable.java2
-rw-r--r--config-model/src/main/java/com/yahoo/schema/derived/FieldRankSettings.java2
-rw-r--r--config-model/src/main/java/com/yahoo/schema/derived/FieldResultTransform.java2
-rw-r--r--config-model/src/main/java/com/yahoo/schema/derived/FileDistributedConstants.java2
-rw-r--r--config-model/src/main/java/com/yahoo/schema/derived/FileDistributedOnnxModels.java2
-rw-r--r--config-model/src/main/java/com/yahoo/schema/derived/ImportedFields.java2
-rw-r--r--config-model/src/main/java/com/yahoo/schema/derived/Index.java2
-rw-r--r--config-model/src/main/java/com/yahoo/schema/derived/IndexInfo.java2
-rw-r--r--config-model/src/main/java/com/yahoo/schema/derived/IndexSchema.java2
-rw-r--r--config-model/src/main/java/com/yahoo/schema/derived/IndexingScript.java2
-rw-r--r--config-model/src/main/java/com/yahoo/schema/derived/Juniperrc.java2
-rw-r--r--config-model/src/main/java/com/yahoo/schema/derived/NativeRankTypeDefinition.java2
-rw-r--r--config-model/src/main/java/com/yahoo/schema/derived/NativeRankTypeDefinitionSet.java2
-rw-r--r--config-model/src/main/java/com/yahoo/schema/derived/NativeTable.java2
-rw-r--r--config-model/src/main/java/com/yahoo/schema/derived/RankProfileList.java2
-rw-r--r--config-model/src/main/java/com/yahoo/schema/derived/RawRankProfile.java23
-rw-r--r--config-model/src/main/java/com/yahoo/schema/derived/SchemaInfo.java2
-rw-r--r--config-model/src/main/java/com/yahoo/schema/derived/SearchOrderer.java2
-rw-r--r--config-model/src/main/java/com/yahoo/schema/derived/Summaries.java2
-rw-r--r--config-model/src/main/java/com/yahoo/schema/derived/SummaryClass.java5
-rw-r--r--config-model/src/main/java/com/yahoo/schema/derived/SummaryClassField.java4
-rw-r--r--config-model/src/main/java/com/yahoo/schema/derived/VsmFields.java2
-rw-r--r--config-model/src/main/java/com/yahoo/schema/derived/VsmSummary.java2
-rw-r--r--config-model/src/main/java/com/yahoo/schema/derived/package-info.java2
-rw-r--r--config-model/src/main/java/com/yahoo/schema/derived/validation/IndexStructureValidator.java2
-rw-r--r--config-model/src/main/java/com/yahoo/schema/derived/validation/Validation.java2
-rw-r--r--config-model/src/main/java/com/yahoo/schema/derived/validation/Validator.java2
-rw-r--r--config-model/src/main/java/com/yahoo/schema/document/Attribute.java2
-rw-r--r--config-model/src/main/java/com/yahoo/schema/document/BooleanIndexDefinition.java2
-rw-r--r--config-model/src/main/java/com/yahoo/schema/document/Case.java2
-rw-r--r--config-model/src/main/java/com/yahoo/schema/document/ComplexAttributeFieldUtils.java2
-rw-r--r--config-model/src/main/java/com/yahoo/schema/document/Dictionary.java2
-rw-r--r--config-model/src/main/java/com/yahoo/schema/document/FieldSet.java2
-rw-r--r--config-model/src/main/java/com/yahoo/schema/document/GeoPos.java2
-rw-r--r--config-model/src/main/java/com/yahoo/schema/document/HnswIndexParams.java2
-rw-r--r--config-model/src/main/java/com/yahoo/schema/document/ImmutableImportedComplexSDField.java2
-rw-r--r--config-model/src/main/java/com/yahoo/schema/document/ImmutableImportedSDField.java2
-rw-r--r--config-model/src/main/java/com/yahoo/schema/document/ImmutableSDField.java2
-rw-r--r--config-model/src/main/java/com/yahoo/schema/document/ImportedComplexField.java2
-rw-r--r--config-model/src/main/java/com/yahoo/schema/document/ImportedField.java2
-rw-r--r--config-model/src/main/java/com/yahoo/schema/document/ImportedFields.java2
-rw-r--r--config-model/src/main/java/com/yahoo/schema/document/ImportedSimpleField.java2
-rw-r--r--config-model/src/main/java/com/yahoo/schema/document/MatchAlgorithm.java2
-rw-r--r--config-model/src/main/java/com/yahoo/schema/document/MatchType.java2
-rw-r--r--config-model/src/main/java/com/yahoo/schema/document/Matching.java2
-rw-r--r--config-model/src/main/java/com/yahoo/schema/document/NormalizeLevel.java2
-rw-r--r--config-model/src/main/java/com/yahoo/schema/document/RankType.java2
-rw-r--r--config-model/src/main/java/com/yahoo/schema/document/Ranking.java5
-rw-r--r--config-model/src/main/java/com/yahoo/schema/document/SDDocumentType.java2
-rw-r--r--config-model/src/main/java/com/yahoo/schema/document/SDField.java2
-rw-r--r--config-model/src/main/java/com/yahoo/schema/document/Sorting.java2
-rw-r--r--config-model/src/main/java/com/yahoo/schema/document/Stemming.java2
-rw-r--r--config-model/src/main/java/com/yahoo/schema/document/TemporaryImportedField.java2
-rw-r--r--config-model/src/main/java/com/yahoo/schema/document/TemporaryImportedFields.java2
-rw-r--r--config-model/src/main/java/com/yahoo/schema/document/TemporarySDField.java2
-rw-r--r--config-model/src/main/java/com/yahoo/schema/document/TypedKey.java2
-rw-r--r--config-model/src/main/java/com/yahoo/schema/document/annotation/SDAnnotationType.java2
-rw-r--r--config-model/src/main/java/com/yahoo/schema/document/annotation/TemporaryAnnotationReferenceDataType.java2
-rw-r--r--config-model/src/main/java/com/yahoo/schema/expressiontransforms/BooleanExpressionTransformer.java2
-rw-r--r--config-model/src/main/java/com/yahoo/schema/expressiontransforms/ConstantTensorTransformer.java2
-rw-r--r--config-model/src/main/java/com/yahoo/schema/expressiontransforms/ExpressionTransforms.java5
-rw-r--r--config-model/src/main/java/com/yahoo/schema/expressiontransforms/FunctionInliner.java2
-rw-r--r--config-model/src/main/java/com/yahoo/schema/expressiontransforms/FunctionShadower.java2
-rw-r--r--config-model/src/main/java/com/yahoo/schema/expressiontransforms/InputRecorder.java39
-rw-r--r--config-model/src/main/java/com/yahoo/schema/expressiontransforms/InputRecorderContext.java2
-rw-r--r--config-model/src/main/java/com/yahoo/schema/expressiontransforms/LightGBMFeatureConverter.java2
-rw-r--r--config-model/src/main/java/com/yahoo/schema/expressiontransforms/NormalizerFunctionExpander.java134
-rw-r--r--config-model/src/main/java/com/yahoo/schema/expressiontransforms/OnnxFeatureConverter.java2
-rw-r--r--config-model/src/main/java/com/yahoo/schema/expressiontransforms/OnnxModelTransformer.java2
-rw-r--r--config-model/src/main/java/com/yahoo/schema/expressiontransforms/RankProfileTransformContext.java2
-rw-r--r--config-model/src/main/java/com/yahoo/schema/expressiontransforms/TensorFlowFeatureConverter.java2
-rw-r--r--config-model/src/main/java/com/yahoo/schema/expressiontransforms/TokenTransformer.java2
-rw-r--r--config-model/src/main/java/com/yahoo/schema/expressiontransforms/XgboostFeatureConverter.java2
-rw-r--r--config-model/src/main/java/com/yahoo/schema/fieldoperation/FieldOperation.java2
-rw-r--r--config-model/src/main/java/com/yahoo/schema/fieldoperation/IndexingOperation.java2
-rw-r--r--config-model/src/main/java/com/yahoo/schema/parser/ConvertParsedFields.java26
-rw-r--r--config-model/src/main/java/com/yahoo/schema/parser/ConvertParsedRanking.java2
-rw-r--r--config-model/src/main/java/com/yahoo/schema/parser/ConvertParsedSchemas.java121
-rw-r--r--config-model/src/main/java/com/yahoo/schema/parser/ConvertParsedTypes.java2
-rw-r--r--config-model/src/main/java/com/yahoo/schema/parser/ConvertSchemaCollection.java2
-rw-r--r--config-model/src/main/java/com/yahoo/schema/parser/DictionaryOption.java1
-rw-r--r--config-model/src/main/java/com/yahoo/schema/parser/InheritanceResolver.java2
-rw-r--r--config-model/src/main/java/com/yahoo/schema/parser/IntermediateCollection.java2
-rw-r--r--config-model/src/main/java/com/yahoo/schema/parser/ParsedAnnotation.java1
-rw-r--r--config-model/src/main/java/com/yahoo/schema/parser/ParsedAttribute.java2
-rw-r--r--config-model/src/main/java/com/yahoo/schema/parser/ParsedBlock.java2
-rw-r--r--config-model/src/main/java/com/yahoo/schema/parser/ParsedDocument.java2
-rw-r--r--config-model/src/main/java/com/yahoo/schema/parser/ParsedDocumentSummary.java5
-rw-r--r--config-model/src/main/java/com/yahoo/schema/parser/ParsedField.java2
-rw-r--r--config-model/src/main/java/com/yahoo/schema/parser/ParsedFieldSet.java1
-rw-r--r--config-model/src/main/java/com/yahoo/schema/parser/ParsedIndex.java2
-rw-r--r--config-model/src/main/java/com/yahoo/schema/parser/ParsedIndexingOp.java2
-rw-r--r--config-model/src/main/java/com/yahoo/schema/parser/ParsedMatchSettings.java1
-rw-r--r--config-model/src/main/java/com/yahoo/schema/parser/ParsedRankFunction.java2
-rw-r--r--config-model/src/main/java/com/yahoo/schema/parser/ParsedRankProfile.java2
-rw-r--r--config-model/src/main/java/com/yahoo/schema/parser/ParsedSchema.java2
-rw-r--r--config-model/src/main/java/com/yahoo/schema/parser/ParsedSorting.java1
-rw-r--r--config-model/src/main/java/com/yahoo/schema/parser/ParsedStruct.java2
-rw-r--r--config-model/src/main/java/com/yahoo/schema/parser/ParsedSummaryField.java8
-rw-r--r--config-model/src/main/java/com/yahoo/schema/parser/ParsedType.java2
-rw-r--r--config-model/src/main/java/com/yahoo/schema/parser/SimpleCharStream.java2
-rw-r--r--config-model/src/main/java/com/yahoo/schema/parser/Utils.java2
-rw-r--r--config-model/src/main/java/com/yahoo/schema/processing/AddDataTypeAndTransformToSummaryOfImportedFields.java (renamed from config-model/src/main/java/com/yahoo/schema/processing/AddAttributeTransformToSummaryOfImportedFields.java)34
-rw-r--r--config-model/src/main/java/com/yahoo/schema/processing/AddExtraFieldsToDocument.java2
-rw-r--r--config-model/src/main/java/com/yahoo/schema/processing/AdjustPositionSummaryFields.java2
-rw-r--r--config-model/src/main/java/com/yahoo/schema/processing/AttributeProperties.java2
-rw-r--r--config-model/src/main/java/com/yahoo/schema/processing/AttributesImplicitWord.java2
-rw-r--r--config-model/src/main/java/com/yahoo/schema/processing/Bolding.java2
-rw-r--r--config-model/src/main/java/com/yahoo/schema/processing/BuiltInFieldSets.java2
-rw-r--r--config-model/src/main/java/com/yahoo/schema/processing/CreatePositionZCurve.java2
-rw-r--r--config-model/src/main/java/com/yahoo/schema/processing/DictionaryProcessor.java2
-rw-r--r--config-model/src/main/java/com/yahoo/schema/processing/DisallowComplexMapAndWsetKeyTypes.java2
-rw-r--r--config-model/src/main/java/com/yahoo/schema/processing/DiversitySettingsValidator.java2
-rw-r--r--config-model/src/main/java/com/yahoo/schema/processing/DynamicSummaryTransformUtils.java1
-rw-r--r--config-model/src/main/java/com/yahoo/schema/processing/ExactMatch.java2
-rw-r--r--config-model/src/main/java/com/yahoo/schema/processing/FastAccessValidator.java2
-rw-r--r--config-model/src/main/java/com/yahoo/schema/processing/FieldSetSettings.java2
-rw-r--r--config-model/src/main/java/com/yahoo/schema/processing/FilterFieldNames.java2
-rw-r--r--config-model/src/main/java/com/yahoo/schema/processing/ImplicitSummaries.java2
-rw-r--r--config-model/src/main/java/com/yahoo/schema/processing/ImplicitSummaryFields.java4
-rw-r--r--config-model/src/main/java/com/yahoo/schema/processing/ImportedFieldsResolver.java2
-rw-r--r--config-model/src/main/java/com/yahoo/schema/processing/IndexFieldNames.java2
-rw-r--r--config-model/src/main/java/com/yahoo/schema/processing/IndexingInputs.java2
-rw-r--r--config-model/src/main/java/com/yahoo/schema/processing/IndexingOutputs.java5
-rw-r--r--config-model/src/main/java/com/yahoo/schema/processing/IndexingValidation.java2
-rw-r--r--config-model/src/main/java/com/yahoo/schema/processing/IndexingValues.java2
-rw-r--r--config-model/src/main/java/com/yahoo/schema/processing/IntegerIndex2Attribute.java2
-rw-r--r--config-model/src/main/java/com/yahoo/schema/processing/LiteralBoost.java2
-rw-r--r--config-model/src/main/java/com/yahoo/schema/processing/MakeAliases.java2
-rw-r--r--config-model/src/main/java/com/yahoo/schema/processing/MakeDefaultSummaryTheSuperSet.java3
-rw-r--r--config-model/src/main/java/com/yahoo/schema/processing/MatchConsistency.java2
-rw-r--r--config-model/src/main/java/com/yahoo/schema/processing/MatchPhaseSettingsValidator.java2
-rw-r--r--config-model/src/main/java/com/yahoo/schema/processing/MatchedElementsOnlyResolver.java2
-rw-r--r--config-model/src/main/java/com/yahoo/schema/processing/MultifieldIndexHarmonizer.java2
-rw-r--r--config-model/src/main/java/com/yahoo/schema/processing/MutableAttributes.java2
-rw-r--r--config-model/src/main/java/com/yahoo/schema/processing/NGramMatch.java2
-rw-r--r--config-model/src/main/java/com/yahoo/schema/processing/OnnxModelConfigGenerator.java2
-rw-r--r--config-model/src/main/java/com/yahoo/schema/processing/OnnxModelTypeResolver.java2
-rw-r--r--config-model/src/main/java/com/yahoo/schema/processing/OptimizeIlscript.java2
-rw-r--r--config-model/src/main/java/com/yahoo/schema/processing/PagedAttributeValidator.java2
-rw-r--r--config-model/src/main/java/com/yahoo/schema/processing/PredicateProcessor.java2
-rw-r--r--config-model/src/main/java/com/yahoo/schema/processing/Processing.java4
-rw-r--r--config-model/src/main/java/com/yahoo/schema/processing/Processor.java2
-rw-r--r--config-model/src/main/java/com/yahoo/schema/processing/RankingExpressionTypeResolver.java2
-rw-r--r--config-model/src/main/java/com/yahoo/schema/processing/ReferenceFieldsProcessor.java2
-rw-r--r--config-model/src/main/java/com/yahoo/schema/processing/ReservedDocumentNames.java2
-rw-r--r--config-model/src/main/java/com/yahoo/schema/processing/ReservedFunctionNames.java2
-rw-r--r--config-model/src/main/java/com/yahoo/schema/processing/SearchMustHaveDocument.java2
-rw-r--r--config-model/src/main/java/com/yahoo/schema/processing/SetRankTypeEmptyOnFilters.java2
-rw-r--r--config-model/src/main/java/com/yahoo/schema/processing/SingleValueOnlyAttributeValidator.java2
-rw-r--r--config-model/src/main/java/com/yahoo/schema/processing/SortingSettings.java2
-rw-r--r--config-model/src/main/java/com/yahoo/schema/processing/StringSettingsOnNonStringFields.java2
-rw-r--r--config-model/src/main/java/com/yahoo/schema/processing/SummaryConsistency.java2
-rw-r--r--config-model/src/main/java/com/yahoo/schema/processing/SummaryDiskAccessValidator.java2
-rw-r--r--config-model/src/main/java/com/yahoo/schema/processing/SummaryDynamicStructsArrays.java2
-rw-r--r--config-model/src/main/java/com/yahoo/schema/processing/SummaryFieldsMustHaveValidSource.java2
-rw-r--r--config-model/src/main/java/com/yahoo/schema/processing/SummaryNamesFieldCollisions.java2
-rw-r--r--config-model/src/main/java/com/yahoo/schema/processing/SummaryTransformForDocumentId.java2
-rw-r--r--config-model/src/main/java/com/yahoo/schema/processing/TagType.java2
-rw-r--r--config-model/src/main/java/com/yahoo/schema/processing/TensorFieldProcessor.java2
-rw-r--r--config-model/src/main/java/com/yahoo/schema/processing/TextMatch.java2
-rw-r--r--config-model/src/main/java/com/yahoo/schema/processing/TypedTransformProvider.java2
-rw-r--r--config-model/src/main/java/com/yahoo/schema/processing/UriHack.java2
-rw-r--r--config-model/src/main/java/com/yahoo/schema/processing/UrlFieldValidator.java2
-rw-r--r--config-model/src/main/java/com/yahoo/schema/processing/ValidateFieldTypes.java6
-rw-r--r--config-model/src/main/java/com/yahoo/schema/processing/ValidateFieldTypesDocumentsOnly.java2
-rw-r--r--config-model/src/main/java/com/yahoo/schema/processing/ValidateFieldWithIndexSettingsCreatesIndex.java2
-rw-r--r--config-model/src/main/java/com/yahoo/schema/processing/ValidateStructTypeInheritance.java2
-rw-r--r--config-model/src/main/java/com/yahoo/schema/processing/WordMatch.java2
-rw-r--r--config-model/src/main/java/com/yahoo/schema/processing/multifieldresolver/IndexCommandResolver.java2
-rw-r--r--config-model/src/main/java/com/yahoo/schema/processing/multifieldresolver/MultiFieldResolver.java2
-rw-r--r--config-model/src/main/java/com/yahoo/schema/processing/multifieldresolver/RankProfileTypeSettingsProcessor.java2
-rw-r--r--config-model/src/main/java/com/yahoo/schema/processing/multifieldresolver/RankTypeResolver.java2
-rw-r--r--config-model/src/main/java/com/yahoo/schema/processing/multifieldresolver/StemmingResolver.java2
-rw-r--r--config-model/src/main/java/com/yahoo/schema/processing/package-info.java2
203 files changed, 657 insertions, 258 deletions
diff --git a/config-model/src/main/java/com/yahoo/schema/Application.java b/config-model/src/main/java/com/yahoo/schema/Application.java
index 71c0e563c77..dbc21743d96 100644
--- a/config-model/src/main/java/com/yahoo/schema/Application.java
+++ b/config-model/src/main/java/com/yahoo/schema/Application.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema;
import com.yahoo.config.application.api.ApplicationPackage;
diff --git a/config-model/src/main/java/com/yahoo/schema/ApplicationBuilder.java b/config-model/src/main/java/com/yahoo/schema/ApplicationBuilder.java
index 046b2aa8491..2e964ac3624 100644
--- a/config-model/src/main/java/com/yahoo/schema/ApplicationBuilder.java
+++ b/config-model/src/main/java/com/yahoo/schema/ApplicationBuilder.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema;
import com.yahoo.config.application.api.ApplicationPackage;
diff --git a/config-model/src/main/java/com/yahoo/schema/DefaultRankProfile.java b/config-model/src/main/java/com/yahoo/schema/DefaultRankProfile.java
index 9ab03b8c4a1..ba419b30d34 100644
--- a/config-model/src/main/java/com/yahoo/schema/DefaultRankProfile.java
+++ b/config-model/src/main/java/com/yahoo/schema/DefaultRankProfile.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema;
import com.yahoo.schema.document.ImmutableSDField;
diff --git a/config-model/src/main/java/com/yahoo/schema/DistributableResource.java b/config-model/src/main/java/com/yahoo/schema/DistributableResource.java
index 8594b40a367..0bdbf7c0e6e 100644
--- a/config-model/src/main/java/com/yahoo/schema/DistributableResource.java
+++ b/config-model/src/main/java/com/yahoo/schema/DistributableResource.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema;
import com.yahoo.config.FileReference;
diff --git a/config-model/src/main/java/com/yahoo/schema/DocumentGraphValidator.java b/config-model/src/main/java/com/yahoo/schema/DocumentGraphValidator.java
index 648cdf18c5b..27e24b9916e 100644
--- a/config-model/src/main/java/com/yahoo/schema/DocumentGraphValidator.java
+++ b/config-model/src/main/java/com/yahoo/schema/DocumentGraphValidator.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema;
import com.yahoo.schema.document.SDDocumentType;
diff --git a/config-model/src/main/java/com/yahoo/schema/DocumentModelBuilder.java b/config-model/src/main/java/com/yahoo/schema/DocumentModelBuilder.java
index be3788a36c3..f35a05411d9 100644
--- a/config-model/src/main/java/com/yahoo/schema/DocumentModelBuilder.java
+++ b/config-model/src/main/java/com/yahoo/schema/DocumentModelBuilder.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema;
import com.yahoo.document.ArrayDataType;
diff --git a/config-model/src/main/java/com/yahoo/schema/DocumentOnlySchema.java b/config-model/src/main/java/com/yahoo/schema/DocumentOnlySchema.java
index f9005c7b775..02cdaf40685 100644
--- a/config-model/src/main/java/com/yahoo/schema/DocumentOnlySchema.java
+++ b/config-model/src/main/java/com/yahoo/schema/DocumentOnlySchema.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema;
import com.yahoo.config.application.api.ApplicationPackage;
diff --git a/config-model/src/main/java/com/yahoo/schema/DocumentReference.java b/config-model/src/main/java/com/yahoo/schema/DocumentReference.java
index 048035ffef8..6c059cca7e8 100644
--- a/config-model/src/main/java/com/yahoo/schema/DocumentReference.java
+++ b/config-model/src/main/java/com/yahoo/schema/DocumentReference.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema;
import com.yahoo.document.Field;
diff --git a/config-model/src/main/java/com/yahoo/schema/DocumentReferenceResolver.java b/config-model/src/main/java/com/yahoo/schema/DocumentReferenceResolver.java
index b3e06fd5e02..360b26fd7da 100644
--- a/config-model/src/main/java/com/yahoo/schema/DocumentReferenceResolver.java
+++ b/config-model/src/main/java/com/yahoo/schema/DocumentReferenceResolver.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema;
import com.yahoo.document.Field;
diff --git a/config-model/src/main/java/com/yahoo/schema/DocumentReferences.java b/config-model/src/main/java/com/yahoo/schema/DocumentReferences.java
index 3583a5134e0..a39df8636d6 100644
--- a/config-model/src/main/java/com/yahoo/schema/DocumentReferences.java
+++ b/config-model/src/main/java/com/yahoo/schema/DocumentReferences.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema;
import java.util.Collections;
diff --git a/config-model/src/main/java/com/yahoo/schema/DocumentsOnlyRankProfile.java b/config-model/src/main/java/com/yahoo/schema/DocumentsOnlyRankProfile.java
index ffd517cf241..bc25701b465 100644
--- a/config-model/src/main/java/com/yahoo/schema/DocumentsOnlyRankProfile.java
+++ b/config-model/src/main/java/com/yahoo/schema/DocumentsOnlyRankProfile.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema;
import java.util.List;
diff --git a/config-model/src/main/java/com/yahoo/schema/FeatureNames.java b/config-model/src/main/java/com/yahoo/schema/FeatureNames.java
index 0671903194f..ab2e63aa469 100644
--- a/config-model/src/main/java/com/yahoo/schema/FeatureNames.java
+++ b/config-model/src/main/java/com/yahoo/schema/FeatureNames.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema;
import com.yahoo.searchlib.rankingexpression.Reference;
diff --git a/config-model/src/main/java/com/yahoo/schema/FieldSets.java b/config-model/src/main/java/com/yahoo/schema/FieldSets.java
index 0594056150c..1dbf496992b 100644
--- a/config-model/src/main/java/com/yahoo/schema/FieldSets.java
+++ b/config-model/src/main/java/com/yahoo/schema/FieldSets.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema;
import java.util.Collections;
diff --git a/config-model/src/main/java/com/yahoo/schema/ImmutableSchema.java b/config-model/src/main/java/com/yahoo/schema/ImmutableSchema.java
index 82583addb9b..645f2849c7f 100644
--- a/config-model/src/main/java/com/yahoo/schema/ImmutableSchema.java
+++ b/config-model/src/main/java/com/yahoo/schema/ImmutableSchema.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema;
import com.yahoo.config.application.api.ApplicationPackage;
diff --git a/config-model/src/main/java/com/yahoo/schema/ImportedFieldsEnumerator.java b/config-model/src/main/java/com/yahoo/schema/ImportedFieldsEnumerator.java
index 0df79b30298..174edbe93e1 100644
--- a/config-model/src/main/java/com/yahoo/schema/ImportedFieldsEnumerator.java
+++ b/config-model/src/main/java/com/yahoo/schema/ImportedFieldsEnumerator.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema;
import com.yahoo.schema.document.SDDocumentType;
diff --git a/config-model/src/main/java/com/yahoo/schema/Index.java b/config-model/src/main/java/com/yahoo/schema/Index.java
index aa1d226d12e..286c1108135 100644
--- a/config-model/src/main/java/com/yahoo/schema/Index.java
+++ b/config-model/src/main/java/com/yahoo/schema/Index.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema;
import com.yahoo.schema.document.BooleanIndexDefinition;
diff --git a/config-model/src/main/java/com/yahoo/schema/LargeRankingExpressions.java b/config-model/src/main/java/com/yahoo/schema/LargeRankingExpressions.java
index 319b1ac343a..f8d9d1cbed2 100644
--- a/config-model/src/main/java/com/yahoo/schema/LargeRankingExpressions.java
+++ b/config-model/src/main/java/com/yahoo/schema/LargeRankingExpressions.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema;
import com.yahoo.config.application.api.FileRegistry;
diff --git a/config-model/src/main/java/com/yahoo/schema/MapEvaluationTypeContext.java b/config-model/src/main/java/com/yahoo/schema/MapEvaluationTypeContext.java
index cbf120e1ee0..f75bdec111e 100644
--- a/config-model/src/main/java/com/yahoo/schema/MapEvaluationTypeContext.java
+++ b/config-model/src/main/java/com/yahoo/schema/MapEvaluationTypeContext.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema;
import com.google.common.collect.ImmutableMap;
diff --git a/config-model/src/main/java/com/yahoo/schema/OnnxModel.java b/config-model/src/main/java/com/yahoo/schema/OnnxModel.java
index 3295b2e93aa..f3f09150c1d 100644
--- a/config-model/src/main/java/com/yahoo/schema/OnnxModel.java
+++ b/config-model/src/main/java/com/yahoo/schema/OnnxModel.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema;
import com.yahoo.searchlib.rankingexpression.Reference;
diff --git a/config-model/src/main/java/com/yahoo/schema/RankProfile.java b/config-model/src/main/java/com/yahoo/schema/RankProfile.java
index dafe0b48698..0cfcddc6c57 100644
--- a/config-model/src/main/java/com/yahoo/schema/RankProfile.java
+++ b/config-model/src/main/java/com/yahoo/schema/RankProfile.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema;
import ai.vespa.rankingexpression.importer.configmodelview.ImportedMlModels;
@@ -22,6 +22,7 @@ import com.yahoo.searchlib.rankingexpression.FeatureList;
import com.yahoo.searchlib.rankingexpression.RankingExpression;
import com.yahoo.searchlib.rankingexpression.Reference;
import com.yahoo.searchlib.rankingexpression.rule.Arguments;
+import com.yahoo.searchlib.rankingexpression.rule.ExpressionNode;
import com.yahoo.searchlib.rankingexpression.rule.ReferenceNode;
import com.yahoo.tensor.Tensor;
import com.yahoo.tensor.TensorType;
@@ -30,6 +31,7 @@ import java.io.IOException;
import java.io.Reader;
import java.io.StringReader;
import java.util.ArrayList;
+import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
@@ -626,8 +628,10 @@ public class RankProfile implements Cloneable {
}
private void addImplicitMatchFeatures(List<FeatureList> list) {
- if (matchFeatures == null)
- matchFeatures = new LinkedHashSet<>();
+ if (matchFeatures == null) {
+ var inherited = getMatchFeatures();
+ matchFeatures = new LinkedHashSet<>(inherited);
+ }
if (hiddenMatchFeatures == null)
hiddenMatchFeatures = new LinkedHashSet<>();
for (var features : list) {
@@ -1058,21 +1062,45 @@ public class RankProfile implements Cloneable {
functions = compileFunctions(this::getFunctions, queryProfiles, featureTypes, importedModels, inlineFunctions, expressionTransforms);
allFunctionsCached = null;
+ var context = new RankProfileTransformContext(this,
+ queryProfiles,
+ featureTypes,
+ importedModels,
+ constants(),
+ inlineFunctions);
+ var allNormalizers = getFeatureNormalizers();
+ verifyNoNormalizers("first-phase expression", firstPhaseRanking, allNormalizers, context);
+ verifyNoNormalizers("second-phase expression", secondPhaseRanking, allNormalizers, context);
+ for (ReferenceNode mf : getMatchFeatures()) {
+ verifyNoNormalizers("match-feature " + mf, mf, allNormalizers, context);
+ }
+ for (ReferenceNode sf : getSummaryFeatures()) {
+ verifyNoNormalizers("summary-feature " + sf, sf, allNormalizers, context);
+ }
if (globalPhaseRanking != null) {
- var context = new RankProfileTransformContext(this,
- queryProfiles,
- featureTypes,
- importedModels,
- constants(),
- inlineFunctions);
var needInputs = new HashSet<String>();
+ Set<String> userDeclaredMatchFeatures = new HashSet<>();
+ for (ReferenceNode mf : getMatchFeatures()) {
+ userDeclaredMatchFeatures.add(mf.toString());
+ }
var recorder = new InputRecorder(needInputs);
- if (matchFeatures != null) {
- for (ReferenceNode mf : matchFeatures) {
- recorder.alreadyHandled(mf.toString());
+ recorder.alreadyMatchFeatures(userDeclaredMatchFeatures);
+ recorder.addKnownNormalizers(allNormalizers.keySet());
+ recorder.process(globalPhaseRanking.function().getBody(), context);
+ for (var normalizerName : recorder.normalizersUsed()) {
+ var normalizer = allNormalizers.get(normalizerName);
+ var func = functions.get(normalizer.input());
+ if (func != null) {
+ verifyNoNormalizers("normalizer input " + normalizer.input(), func, allNormalizers, context);
+ if (! userDeclaredMatchFeatures.contains(normalizer.input())) {
+ var subRecorder = new InputRecorder(needInputs);
+ subRecorder.alreadyMatchFeatures(userDeclaredMatchFeatures);
+ subRecorder.process(func.function().getBody(), context);
+ }
+ } else {
+ needInputs.add(normalizer.input());
}
}
- recorder.process(globalPhaseRanking.function().getBody(), context);
List<FeatureList> addIfMissing = new ArrayList<>();
for (String input : needInputs) {
if (input.startsWith("constant(") || input.startsWith("query(")) {
@@ -1630,4 +1658,70 @@ public class RankProfile implements Cloneable {
}
+ public static record RankFeatureNormalizer(Reference original, String name, String input, String algo, double kparam) {
+ @Override
+ public String toString() {
+ return "normalizer{name=" + name + ",input=" + input + ",algo=" + algo + ",k=" + kparam + "}";
+ }
+ private static long hash(String s) {
+ int bob = com.yahoo.collections.BobHash.hash(s);
+ return bob + 0x100000000L;
+ }
+ public static RankFeatureNormalizer linear(Reference original, Reference inputRef) {
+ long h = hash(original.toString());
+ String name = "normalize@" + h + "@linear";
+ return new RankFeatureNormalizer(original, name, inputRef.toString(), "LINEAR", 0.0);
+ }
+ public static RankFeatureNormalizer rrank(Reference original, Reference inputRef, double k) {
+ long h = hash(original.toString());
+ String name = "normalize@" + h + "@rrank";
+ return new RankFeatureNormalizer(original, name, inputRef.toString(), "RRANK", k);
+ }
+ }
+
+ private List<RankFeatureNormalizer> featureNormalizers = new ArrayList<>();
+
+ public Map<String, RankFeatureNormalizer> getFeatureNormalizers() {
+ Map<String, RankFeatureNormalizer> all = new LinkedHashMap<>();
+ for (var inheritedProfile : inherited()) {
+ all.putAll(inheritedProfile.getFeatureNormalizers());
+ }
+ for (var n : featureNormalizers) {
+ all.put(n.name(), n);
+ }
+ return all;
+ }
+
+ public void addFeatureNormalizer(RankFeatureNormalizer n) {
+ if (functions.get(n.name()) != null) {
+ throw new IllegalArgumentException("cannot use name '" + name + "' for both function and normalizer");
+ }
+ featureNormalizers.add(n);
+ }
+
+ private void verifyNoNormalizers(String where, RankingExpressionFunction f, Map<String, RankFeatureNormalizer> allNormalizers, RankProfileTransformContext context) {
+ if (f == null) return;
+ verifyNoNormalizers(where, f.function(), allNormalizers, context);
+ }
+
+ private void verifyNoNormalizers(String where, ExpressionFunction func, Map<String, RankFeatureNormalizer> allNormalizers, RankProfileTransformContext context) {
+ if (func == null) return;
+ var body = func.getBody();
+ if (body == null) return;
+ verifyNoNormalizers(where, body.getRoot(), allNormalizers, context);
+ }
+
+ private void verifyNoNormalizers(String where, ExpressionNode node, Map<String, RankFeatureNormalizer> allNormalizers, RankProfileTransformContext context) {
+ var needInputs = new HashSet<String>();
+ var recorder = new InputRecorder(needInputs);
+ recorder.process(node, context);
+ for (var input : needInputs) {
+ var normalizer = allNormalizers.get(input);
+ if (normalizer != null) {
+ throw new IllegalArgumentException("Cannot use " + normalizer.original() + " from " + where + ", only valid in global-phase expression");
+ }
+ }
+ }
+
+
}
diff --git a/config-model/src/main/java/com/yahoo/schema/RankProfileRegistry.java b/config-model/src/main/java/com/yahoo/schema/RankProfileRegistry.java
index 06ffc934b2d..0fddcbd4cc7 100644
--- a/config-model/src/main/java/com/yahoo/schema/RankProfileRegistry.java
+++ b/config-model/src/main/java/com/yahoo/schema/RankProfileRegistry.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema;
import com.yahoo.schema.document.SDDocumentType;
diff --git a/config-model/src/main/java/com/yahoo/schema/RankingExpressionBody.java b/config-model/src/main/java/com/yahoo/schema/RankingExpressionBody.java
index 89fad690ca2..da1255aaa7a 100644
--- a/config-model/src/main/java/com/yahoo/schema/RankingExpressionBody.java
+++ b/config-model/src/main/java/com/yahoo/schema/RankingExpressionBody.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema;
import com.yahoo.config.application.api.FileRegistry;
diff --git a/config-model/src/main/java/com/yahoo/schema/Schema.java b/config-model/src/main/java/com/yahoo/schema/Schema.java
index 36730a502ea..6548907000a 100644
--- a/config-model/src/main/java/com/yahoo/schema/Schema.java
+++ b/config-model/src/main/java/com/yahoo/schema/Schema.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema;
import com.yahoo.config.application.api.ApplicationPackage;
diff --git a/config-model/src/main/java/com/yahoo/schema/UnrankedRankProfile.java b/config-model/src/main/java/com/yahoo/schema/UnrankedRankProfile.java
index 6c1f5fc8731..d49264eaac4 100644
--- a/config-model/src/main/java/com/yahoo/schema/UnrankedRankProfile.java
+++ b/config-model/src/main/java/com/yahoo/schema/UnrankedRankProfile.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema;
import com.yahoo.searchlib.rankingexpression.RankingExpression;
diff --git a/config-model/src/main/java/com/yahoo/schema/derived/AttributeFields.java b/config-model/src/main/java/com/yahoo/schema/derived/AttributeFields.java
index c3531d03d3f..57e5097556a 100644
--- a/config-model/src/main/java/com/yahoo/schema/derived/AttributeFields.java
+++ b/config-model/src/main/java/com/yahoo/schema/derived/AttributeFields.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema.derived;
import com.yahoo.schema.Schema;
diff --git a/config-model/src/main/java/com/yahoo/schema/derived/Derived.java b/config-model/src/main/java/com/yahoo/schema/derived/Derived.java
index e8b12f22b20..3ed9807b8f1 100644
--- a/config-model/src/main/java/com/yahoo/schema/derived/Derived.java
+++ b/config-model/src/main/java/com/yahoo/schema/derived/Derived.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema.derived;
import com.yahoo.config.ConfigInstance;
diff --git a/config-model/src/main/java/com/yahoo/schema/derived/DerivedConfiguration.java b/config-model/src/main/java/com/yahoo/schema/derived/DerivedConfiguration.java
index e64f625bdf4..1c3c088e1fc 100644
--- a/config-model/src/main/java/com/yahoo/schema/derived/DerivedConfiguration.java
+++ b/config-model/src/main/java/com/yahoo/schema/derived/DerivedConfiguration.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema.derived;
import com.yahoo.config.ConfigInstance;
diff --git a/config-model/src/main/java/com/yahoo/schema/derived/Deriver.java b/config-model/src/main/java/com/yahoo/schema/derived/Deriver.java
index 44bea43a8e3..9774868db9c 100644
--- a/config-model/src/main/java/com/yahoo/schema/derived/Deriver.java
+++ b/config-model/src/main/java/com/yahoo/schema/derived/Deriver.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema.derived;
import com.yahoo.document.config.DocumenttypesConfig;
import com.yahoo.document.config.DocumentmanagerConfig;
diff --git a/config-model/src/main/java/com/yahoo/schema/derived/Exportable.java b/config-model/src/main/java/com/yahoo/schema/derived/Exportable.java
index 4fccfb5d9f8..983be8bf13a 100644
--- a/config-model/src/main/java/com/yahoo/schema/derived/Exportable.java
+++ b/config-model/src/main/java/com/yahoo/schema/derived/Exportable.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema.derived;
/**
diff --git a/config-model/src/main/java/com/yahoo/schema/derived/FieldRankSettings.java b/config-model/src/main/java/com/yahoo/schema/derived/FieldRankSettings.java
index ccb25df031c..4fe82751248 100644
--- a/config-model/src/main/java/com/yahoo/schema/derived/FieldRankSettings.java
+++ b/config-model/src/main/java/com/yahoo/schema/derived/FieldRankSettings.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema.derived;
import com.yahoo.collections.Pair;
diff --git a/config-model/src/main/java/com/yahoo/schema/derived/FieldResultTransform.java b/config-model/src/main/java/com/yahoo/schema/derived/FieldResultTransform.java
index 99b2925d714..f6b5790fed5 100644
--- a/config-model/src/main/java/com/yahoo/schema/derived/FieldResultTransform.java
+++ b/config-model/src/main/java/com/yahoo/schema/derived/FieldResultTransform.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema.derived;
import com.yahoo.vespa.documentmodel.SummaryTransform;
diff --git a/config-model/src/main/java/com/yahoo/schema/derived/FileDistributedConstants.java b/config-model/src/main/java/com/yahoo/schema/derived/FileDistributedConstants.java
index 05f6be2f6f1..91ab1ad9172 100644
--- a/config-model/src/main/java/com/yahoo/schema/derived/FileDistributedConstants.java
+++ b/config-model/src/main/java/com/yahoo/schema/derived/FileDistributedConstants.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema.derived;
import com.yahoo.config.application.api.FileRegistry;
diff --git a/config-model/src/main/java/com/yahoo/schema/derived/FileDistributedOnnxModels.java b/config-model/src/main/java/com/yahoo/schema/derived/FileDistributedOnnxModels.java
index c3fa6aedf31..1cc33cc4180 100644
--- a/config-model/src/main/java/com/yahoo/schema/derived/FileDistributedOnnxModels.java
+++ b/config-model/src/main/java/com/yahoo/schema/derived/FileDistributedOnnxModels.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema.derived;
import com.yahoo.config.application.api.FileRegistry;
diff --git a/config-model/src/main/java/com/yahoo/schema/derived/ImportedFields.java b/config-model/src/main/java/com/yahoo/schema/derived/ImportedFields.java
index fa3f49f06d5..765ad858535 100644
--- a/config-model/src/main/java/com/yahoo/schema/derived/ImportedFields.java
+++ b/config-model/src/main/java/com/yahoo/schema/derived/ImportedFields.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema.derived;
import com.yahoo.schema.Schema;
diff --git a/config-model/src/main/java/com/yahoo/schema/derived/Index.java b/config-model/src/main/java/com/yahoo/schema/derived/Index.java
index 2f5b674abee..2c30ff3a731 100644
--- a/config-model/src/main/java/com/yahoo/schema/derived/Index.java
+++ b/config-model/src/main/java/com/yahoo/schema/derived/Index.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema.derived;
import com.yahoo.document.CollectionDataType;
diff --git a/config-model/src/main/java/com/yahoo/schema/derived/IndexInfo.java b/config-model/src/main/java/com/yahoo/schema/derived/IndexInfo.java
index f6a022e9930..a1a358e96cd 100644
--- a/config-model/src/main/java/com/yahoo/schema/derived/IndexInfo.java
+++ b/config-model/src/main/java/com/yahoo/schema/derived/IndexInfo.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema.derived;
import com.yahoo.document.CollectionDataType;
diff --git a/config-model/src/main/java/com/yahoo/schema/derived/IndexSchema.java b/config-model/src/main/java/com/yahoo/schema/derived/IndexSchema.java
index 0e58b4cdb3b..d25ada26c6c 100644
--- a/config-model/src/main/java/com/yahoo/schema/derived/IndexSchema.java
+++ b/config-model/src/main/java/com/yahoo/schema/derived/IndexSchema.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema.derived;
import com.yahoo.document.ArrayDataType;
diff --git a/config-model/src/main/java/com/yahoo/schema/derived/IndexingScript.java b/config-model/src/main/java/com/yahoo/schema/derived/IndexingScript.java
index 32add37a546..73f3507ab00 100644
--- a/config-model/src/main/java/com/yahoo/schema/derived/IndexingScript.java
+++ b/config-model/src/main/java/com/yahoo/schema/derived/IndexingScript.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema.derived;
import com.yahoo.schema.Schema;
diff --git a/config-model/src/main/java/com/yahoo/schema/derived/Juniperrc.java b/config-model/src/main/java/com/yahoo/schema/derived/Juniperrc.java
index eb336e1fc72..ab1bd256ef9 100644
--- a/config-model/src/main/java/com/yahoo/schema/derived/Juniperrc.java
+++ b/config-model/src/main/java/com/yahoo/schema/derived/Juniperrc.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema.derived;
import com.yahoo.schema.Schema;
diff --git a/config-model/src/main/java/com/yahoo/schema/derived/NativeRankTypeDefinition.java b/config-model/src/main/java/com/yahoo/schema/derived/NativeRankTypeDefinition.java
index 7d558ea51cc..409ddc1d95b 100644
--- a/config-model/src/main/java/com/yahoo/schema/derived/NativeRankTypeDefinition.java
+++ b/config-model/src/main/java/com/yahoo/schema/derived/NativeRankTypeDefinition.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema.derived;
import com.yahoo.schema.document.RankType;
diff --git a/config-model/src/main/java/com/yahoo/schema/derived/NativeRankTypeDefinitionSet.java b/config-model/src/main/java/com/yahoo/schema/derived/NativeRankTypeDefinitionSet.java
index 65e68181b5b..6ac03160b8c 100644
--- a/config-model/src/main/java/com/yahoo/schema/derived/NativeRankTypeDefinitionSet.java
+++ b/config-model/src/main/java/com/yahoo/schema/derived/NativeRankTypeDefinitionSet.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema.derived;
import com.yahoo.schema.document.RankType;
diff --git a/config-model/src/main/java/com/yahoo/schema/derived/NativeTable.java b/config-model/src/main/java/com/yahoo/schema/derived/NativeTable.java
index 6eff2487bca..0fc99afef83 100644
--- a/config-model/src/main/java/com/yahoo/schema/derived/NativeTable.java
+++ b/config-model/src/main/java/com/yahoo/schema/derived/NativeTable.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema.derived;
/**
diff --git a/config-model/src/main/java/com/yahoo/schema/derived/RankProfileList.java b/config-model/src/main/java/com/yahoo/schema/derived/RankProfileList.java
index ac7495d09c7..0a419768aaf 100644
--- a/config-model/src/main/java/com/yahoo/schema/derived/RankProfileList.java
+++ b/config-model/src/main/java/com/yahoo/schema/derived/RankProfileList.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema.derived;
import ai.vespa.rankingexpression.importer.configmodelview.ImportedMlModels;
diff --git a/config-model/src/main/java/com/yahoo/schema/derived/RawRankProfile.java b/config-model/src/main/java/com/yahoo/schema/derived/RawRankProfile.java
index 5f1cd16c68e..eb9f7d44c91 100644
--- a/config-model/src/main/java/com/yahoo/schema/derived/RawRankProfile.java
+++ b/config-model/src/main/java/com/yahoo/schema/derived/RawRankProfile.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema.derived;
import ai.vespa.rankingexpression.importer.configmodelview.ImportedMlModels;
@@ -54,6 +54,7 @@ public class RawRankProfile implements RankProfilesConfig.Producer {
private final String name;
private final Compressor.Compression compressedProperties;
+ private final Map<String, RankProfile.RankFeatureNormalizer> featureNormalizers;
/** The compiled profile this is created from. */
private final Collection<RankProfile.Constant> constants;
@@ -66,13 +67,14 @@ public class RawRankProfile implements RankProfilesConfig.Producer {
this.name = rankProfile.name();
/*
* Forget the RankProfiles as soon as possible. They can become very large and memory hungry
- * Especially do not refer then through any member variables due to the RawRankProfile living forever.
+ * Especially do not refer them through any member variables due to the RawRankProfile living forever.
*/
RankProfile compiled = rankProfile.compile(queryProfiles, importedModels);
constants = compiled.constants().values();
onnxModels = compiled.onnxModels().values();
- compressedProperties = compress(new Deriver(compiled, attributeFields, deployProperties, queryProfiles)
- .derive(largeExpressions));
+ var deriver = new Deriver(compiled, attributeFields, deployProperties, queryProfiles);
+ compressedProperties = compress(deriver.derive(largeExpressions));
+ this.featureNormalizers = compiled.getFeatureNormalizers();
}
public Collection<RankProfile.Constant> constants() { return constants; }
@@ -111,6 +113,18 @@ public class RawRankProfile implements RankProfilesConfig.Producer {
b.fef(fefB);
}
+ private void buildNormalizers(RankProfilesConfig.Rankprofile.Builder b) {
+ for (var normalizer : featureNormalizers.values()) {
+ var nBuilder = new RankProfilesConfig.Rankprofile.Normalizer.Builder();
+ nBuilder.name(normalizer.name());
+ nBuilder.input(normalizer.input());
+ var algo = RankProfilesConfig.Rankprofile.Normalizer.Algo.Enum.valueOf(normalizer.algo());
+ nBuilder.algo(algo);
+ nBuilder.kparam(normalizer.kparam());
+ b.normalizer(nBuilder);
+ }
+ }
+
/**
* Returns the properties of this as an unmodifiable list.
* Note: This method is expensive.
@@ -121,6 +135,7 @@ public class RawRankProfile implements RankProfilesConfig.Producer {
public void getConfig(RankProfilesConfig.Builder builder) {
RankProfilesConfig.Rankprofile.Builder b = new RankProfilesConfig.Rankprofile.Builder().name(getName());
getRankProperties(b);
+ buildNormalizers(b);
builder.rankprofile(b);
}
diff --git a/config-model/src/main/java/com/yahoo/schema/derived/SchemaInfo.java b/config-model/src/main/java/com/yahoo/schema/derived/SchemaInfo.java
index 291c67cae02..d51526a4ed4 100644
--- a/config-model/src/main/java/com/yahoo/schema/derived/SchemaInfo.java
+++ b/config-model/src/main/java/com/yahoo/schema/derived/SchemaInfo.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema.derived;
import com.yahoo.document.ArrayDataType;
diff --git a/config-model/src/main/java/com/yahoo/schema/derived/SearchOrderer.java b/config-model/src/main/java/com/yahoo/schema/derived/SearchOrderer.java
index d08cc472f82..ba5e397e4f6 100644
--- a/config-model/src/main/java/com/yahoo/schema/derived/SearchOrderer.java
+++ b/config-model/src/main/java/com/yahoo/schema/derived/SearchOrderer.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema.derived;
import com.yahoo.document.DataTypeName;
diff --git a/config-model/src/main/java/com/yahoo/schema/derived/Summaries.java b/config-model/src/main/java/com/yahoo/schema/derived/Summaries.java
index 2b41fbb3b1a..7b96f5ab654 100644
--- a/config-model/src/main/java/com/yahoo/schema/derived/Summaries.java
+++ b/config-model/src/main/java/com/yahoo/schema/derived/Summaries.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema.derived;
import com.yahoo.config.application.api.DeployLogger;
diff --git a/config-model/src/main/java/com/yahoo/schema/derived/SummaryClass.java b/config-model/src/main/java/com/yahoo/schema/derived/SummaryClass.java
index ca5931fd9e8..300a55e521a 100644
--- a/config-model/src/main/java/com/yahoo/schema/derived/SummaryClass.java
+++ b/config-model/src/main/java/com/yahoo/schema/derived/SummaryClass.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema.derived;
import com.yahoo.config.application.api.DeployLogger;
@@ -155,7 +155,8 @@ public class SummaryClass extends Derived {
summaryField.getTransform() == SummaryTransform.GEOPOS ||
summaryField.getTransform() == SummaryTransform.POSITIONS ||
summaryField.getTransform() == SummaryTransform.MATCHED_ELEMENTS_FILTER ||
- summaryField.getTransform() == SummaryTransform.MATCHED_ATTRIBUTE_ELEMENTS_FILTER)
+ summaryField.getTransform() == SummaryTransform.MATCHED_ATTRIBUTE_ELEMENTS_FILTER ||
+ summaryField.getTransform() == SummaryTransform.TOKENS)
{
return summaryField.getSingleSource();
} else if (summaryField.getTransform().isDynamic()) {
diff --git a/config-model/src/main/java/com/yahoo/schema/derived/SummaryClassField.java b/config-model/src/main/java/com/yahoo/schema/derived/SummaryClassField.java
index ec7869857cd..2f60cd8eb06 100644
--- a/config-model/src/main/java/com/yahoo/schema/derived/SummaryClassField.java
+++ b/config-model/src/main/java/com/yahoo/schema/derived/SummaryClassField.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema.derived;
import com.yahoo.document.CollectionDataType;
@@ -92,6 +92,8 @@ public class SummaryClassField {
return Type.FEATUREDATA;
} else if (transform != null && transform.equals(SummaryTransform.SUMMARYFEATURES)) {
return Type.FEATUREDATA;
+ } else if (transform != null && transform.equals(SummaryTransform.TOKENS)) {
+ return Type.JSONSTRING;
} else {
return Type.LONGSTRING;
}
diff --git a/config-model/src/main/java/com/yahoo/schema/derived/VsmFields.java b/config-model/src/main/java/com/yahoo/schema/derived/VsmFields.java
index c032a7155b2..cb806d8596e 100644
--- a/config-model/src/main/java/com/yahoo/schema/derived/VsmFields.java
+++ b/config-model/src/main/java/com/yahoo/schema/derived/VsmFields.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema.derived;
import com.yahoo.document.CollectionDataType;
diff --git a/config-model/src/main/java/com/yahoo/schema/derived/VsmSummary.java b/config-model/src/main/java/com/yahoo/schema/derived/VsmSummary.java
index 30ae9c97268..a2c220b6cbc 100644
--- a/config-model/src/main/java/com/yahoo/schema/derived/VsmSummary.java
+++ b/config-model/src/main/java/com/yahoo/schema/derived/VsmSummary.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema.derived;
import com.yahoo.schema.Schema;
diff --git a/config-model/src/main/java/com/yahoo/schema/derived/package-info.java b/config-model/src/main/java/com/yahoo/schema/derived/package-info.java
index 370617ac6cc..81031c17dda 100644
--- a/config-model/src/main/java/com/yahoo/schema/derived/package-info.java
+++ b/config-model/src/main/java/com/yahoo/schema/derived/package-info.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
@ExportPackage
package com.yahoo.schema.derived;
diff --git a/config-model/src/main/java/com/yahoo/schema/derived/validation/IndexStructureValidator.java b/config-model/src/main/java/com/yahoo/schema/derived/validation/IndexStructureValidator.java
index 512d9f742bf..df052a18f36 100644
--- a/config-model/src/main/java/com/yahoo/schema/derived/validation/IndexStructureValidator.java
+++ b/config-model/src/main/java/com/yahoo/schema/derived/validation/IndexStructureValidator.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema.derived.validation;
import com.yahoo.schema.document.SDDocumentType;
diff --git a/config-model/src/main/java/com/yahoo/schema/derived/validation/Validation.java b/config-model/src/main/java/com/yahoo/schema/derived/validation/Validation.java
index dba4dce49f0..38f34786570 100644
--- a/config-model/src/main/java/com/yahoo/schema/derived/validation/Validation.java
+++ b/config-model/src/main/java/com/yahoo/schema/derived/validation/Validation.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema.derived.validation;
import com.yahoo.schema.Schema;
diff --git a/config-model/src/main/java/com/yahoo/schema/derived/validation/Validator.java b/config-model/src/main/java/com/yahoo/schema/derived/validation/Validator.java
index bf0f007841c..1a3339b9d0a 100644
--- a/config-model/src/main/java/com/yahoo/schema/derived/validation/Validator.java
+++ b/config-model/src/main/java/com/yahoo/schema/derived/validation/Validator.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema.derived.validation;
import com.yahoo.schema.Schema;
diff --git a/config-model/src/main/java/com/yahoo/schema/document/Attribute.java b/config-model/src/main/java/com/yahoo/schema/document/Attribute.java
index 7b798e66567..999d040b48c 100644
--- a/config-model/src/main/java/com/yahoo/schema/document/Attribute.java
+++ b/config-model/src/main/java/com/yahoo/schema/document/Attribute.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema.document;
import com.yahoo.document.ArrayDataType;
diff --git a/config-model/src/main/java/com/yahoo/schema/document/BooleanIndexDefinition.java b/config-model/src/main/java/com/yahoo/schema/document/BooleanIndexDefinition.java
index 8563d414c40..3836752e6b5 100644
--- a/config-model/src/main/java/com/yahoo/schema/document/BooleanIndexDefinition.java
+++ b/config-model/src/main/java/com/yahoo/schema/document/BooleanIndexDefinition.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema.document;
import java.util.Optional;
diff --git a/config-model/src/main/java/com/yahoo/schema/document/Case.java b/config-model/src/main/java/com/yahoo/schema/document/Case.java
index cc0e47471db..42340417dcb 100644
--- a/config-model/src/main/java/com/yahoo/schema/document/Case.java
+++ b/config-model/src/main/java/com/yahoo/schema/document/Case.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema.document;
/**
diff --git a/config-model/src/main/java/com/yahoo/schema/document/ComplexAttributeFieldUtils.java b/config-model/src/main/java/com/yahoo/schema/document/ComplexAttributeFieldUtils.java
index ebafd8f1d24..70b2423eb8f 100644
--- a/config-model/src/main/java/com/yahoo/schema/document/ComplexAttributeFieldUtils.java
+++ b/config-model/src/main/java/com/yahoo/schema/document/ComplexAttributeFieldUtils.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema.document;
import com.yahoo.document.ArrayDataType;
diff --git a/config-model/src/main/java/com/yahoo/schema/document/Dictionary.java b/config-model/src/main/java/com/yahoo/schema/document/Dictionary.java
index 11a94c1d899..97dcc36a627 100644
--- a/config-model/src/main/java/com/yahoo/schema/document/Dictionary.java
+++ b/config-model/src/main/java/com/yahoo/schema/document/Dictionary.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema.document;
diff --git a/config-model/src/main/java/com/yahoo/schema/document/FieldSet.java b/config-model/src/main/java/com/yahoo/schema/document/FieldSet.java
index e62e784d7b3..84efc92f8e8 100644
--- a/config-model/src/main/java/com/yahoo/schema/document/FieldSet.java
+++ b/config-model/src/main/java/com/yahoo/schema/document/FieldSet.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema.document;
import java.util.LinkedHashSet;
diff --git a/config-model/src/main/java/com/yahoo/schema/document/GeoPos.java b/config-model/src/main/java/com/yahoo/schema/document/GeoPos.java
index 829555d88c6..fe971e88270 100644
--- a/config-model/src/main/java/com/yahoo/schema/document/GeoPos.java
+++ b/config-model/src/main/java/com/yahoo/schema/document/GeoPos.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema.document;
import com.yahoo.document.DataType;
diff --git a/config-model/src/main/java/com/yahoo/schema/document/HnswIndexParams.java b/config-model/src/main/java/com/yahoo/schema/document/HnswIndexParams.java
index cc427356c78..4998a53a938 100644
--- a/config-model/src/main/java/com/yahoo/schema/document/HnswIndexParams.java
+++ b/config-model/src/main/java/com/yahoo/schema/document/HnswIndexParams.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema.document;
import java.util.Optional;
diff --git a/config-model/src/main/java/com/yahoo/schema/document/ImmutableImportedComplexSDField.java b/config-model/src/main/java/com/yahoo/schema/document/ImmutableImportedComplexSDField.java
index 35b5d06067f..8e93719adb9 100644
--- a/config-model/src/main/java/com/yahoo/schema/document/ImmutableImportedComplexSDField.java
+++ b/config-model/src/main/java/com/yahoo/schema/document/ImmutableImportedComplexSDField.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema.document;
import java.util.Collection;
diff --git a/config-model/src/main/java/com/yahoo/schema/document/ImmutableImportedSDField.java b/config-model/src/main/java/com/yahoo/schema/document/ImmutableImportedSDField.java
index 4f0b684a9c0..cb98cb79e01 100644
--- a/config-model/src/main/java/com/yahoo/schema/document/ImmutableImportedSDField.java
+++ b/config-model/src/main/java/com/yahoo/schema/document/ImmutableImportedSDField.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema.document;
import com.yahoo.document.DataType;
diff --git a/config-model/src/main/java/com/yahoo/schema/document/ImmutableSDField.java b/config-model/src/main/java/com/yahoo/schema/document/ImmutableSDField.java
index 4c7e7eb28f4..3085fe0351b 100644
--- a/config-model/src/main/java/com/yahoo/schema/document/ImmutableSDField.java
+++ b/config-model/src/main/java/com/yahoo/schema/document/ImmutableSDField.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema.document;
import com.yahoo.document.DataType;
diff --git a/config-model/src/main/java/com/yahoo/schema/document/ImportedComplexField.java b/config-model/src/main/java/com/yahoo/schema/document/ImportedComplexField.java
index 10c400bc4d6..14d50ba8038 100644
--- a/config-model/src/main/java/com/yahoo/schema/document/ImportedComplexField.java
+++ b/config-model/src/main/java/com/yahoo/schema/document/ImportedComplexField.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema.document;
import com.yahoo.schema.DocumentReference;
diff --git a/config-model/src/main/java/com/yahoo/schema/document/ImportedField.java b/config-model/src/main/java/com/yahoo/schema/document/ImportedField.java
index 50f8591bbce..b9c3199b842 100644
--- a/config-model/src/main/java/com/yahoo/schema/document/ImportedField.java
+++ b/config-model/src/main/java/com/yahoo/schema/document/ImportedField.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema.document;
import com.yahoo.schema.DocumentReference;
diff --git a/config-model/src/main/java/com/yahoo/schema/document/ImportedFields.java b/config-model/src/main/java/com/yahoo/schema/document/ImportedFields.java
index f6654896fae..0b2e16ba292 100644
--- a/config-model/src/main/java/com/yahoo/schema/document/ImportedFields.java
+++ b/config-model/src/main/java/com/yahoo/schema/document/ImportedFields.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema.document;
import java.util.Collections;
diff --git a/config-model/src/main/java/com/yahoo/schema/document/ImportedSimpleField.java b/config-model/src/main/java/com/yahoo/schema/document/ImportedSimpleField.java
index 244135ecc10..9c984fedb2d 100644
--- a/config-model/src/main/java/com/yahoo/schema/document/ImportedSimpleField.java
+++ b/config-model/src/main/java/com/yahoo/schema/document/ImportedSimpleField.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema.document;
import com.yahoo.schema.DocumentReference;
diff --git a/config-model/src/main/java/com/yahoo/schema/document/MatchAlgorithm.java b/config-model/src/main/java/com/yahoo/schema/document/MatchAlgorithm.java
index f4ef5893279..4b21d3c7a03 100644
--- a/config-model/src/main/java/com/yahoo/schema/document/MatchAlgorithm.java
+++ b/config-model/src/main/java/com/yahoo/schema/document/MatchAlgorithm.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema.document;
/** Which match algorithm is used by this matching setup */
diff --git a/config-model/src/main/java/com/yahoo/schema/document/MatchType.java b/config-model/src/main/java/com/yahoo/schema/document/MatchType.java
index eb12b788a65..c1198412046 100644
--- a/config-model/src/main/java/com/yahoo/schema/document/MatchType.java
+++ b/config-model/src/main/java/com/yahoo/schema/document/MatchType.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema.document;
public enum MatchType {
diff --git a/config-model/src/main/java/com/yahoo/schema/document/Matching.java b/config-model/src/main/java/com/yahoo/schema/document/Matching.java
index e3f49cb834d..922643b03df 100644
--- a/config-model/src/main/java/com/yahoo/schema/document/Matching.java
+++ b/config-model/src/main/java/com/yahoo/schema/document/Matching.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema.document;
import com.yahoo.schema.processing.NGramMatch;
diff --git a/config-model/src/main/java/com/yahoo/schema/document/NormalizeLevel.java b/config-model/src/main/java/com/yahoo/schema/document/NormalizeLevel.java
index 12880d0e1c8..bc8e4ac41f2 100644
--- a/config-model/src/main/java/com/yahoo/schema/document/NormalizeLevel.java
+++ b/config-model/src/main/java/com/yahoo/schema/document/NormalizeLevel.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema.document;
/**
diff --git a/config-model/src/main/java/com/yahoo/schema/document/RankType.java b/config-model/src/main/java/com/yahoo/schema/document/RankType.java
index 067c1e7f266..4940589f760 100644
--- a/config-model/src/main/java/com/yahoo/schema/document/RankType.java
+++ b/config-model/src/main/java/com/yahoo/schema/document/RankType.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema.document;
/**
diff --git a/config-model/src/main/java/com/yahoo/schema/document/Ranking.java b/config-model/src/main/java/com/yahoo/schema/document/Ranking.java
index 31fd9747e2d..2a2b1431057 100644
--- a/config-model/src/main/java/com/yahoo/schema/document/Ranking.java
+++ b/config-model/src/main/java/com/yahoo/schema/document/Ranking.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema.document;
import java.io.Serializable;
@@ -44,9 +44,8 @@ public class Ranking implements Cloneable, Serializable {
/** Returns true if the given rank settings are the same */
@Override
public boolean equals(Object o) {
- if ( ! (o instanceof Ranking)) return false;
+ if ( ! (o instanceof Ranking other)) return false;
- Ranking other=(Ranking)o;
if (this.filter != other.filter) return false;
if (this.literal != other.literal) return false;
if (this.normal != other.normal) return false;
diff --git a/config-model/src/main/java/com/yahoo/schema/document/SDDocumentType.java b/config-model/src/main/java/com/yahoo/schema/document/SDDocumentType.java
index 5ffe4ec533c..a6a37ba3a93 100644
--- a/config-model/src/main/java/com/yahoo/schema/document/SDDocumentType.java
+++ b/config-model/src/main/java/com/yahoo/schema/document/SDDocumentType.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema.document;
import com.yahoo.document.DataType;
diff --git a/config-model/src/main/java/com/yahoo/schema/document/SDField.java b/config-model/src/main/java/com/yahoo/schema/document/SDField.java
index 6cbdb38b9bc..972d3a57040 100644
--- a/config-model/src/main/java/com/yahoo/schema/document/SDField.java
+++ b/config-model/src/main/java/com/yahoo/schema/document/SDField.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema.document;
import com.yahoo.document.CollectionDataType;
diff --git a/config-model/src/main/java/com/yahoo/schema/document/Sorting.java b/config-model/src/main/java/com/yahoo/schema/document/Sorting.java
index 2d0c9a5d27b..cb89609a941 100644
--- a/config-model/src/main/java/com/yahoo/schema/document/Sorting.java
+++ b/config-model/src/main/java/com/yahoo/schema/document/Sorting.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema.document;
import java.io.Serializable;
diff --git a/config-model/src/main/java/com/yahoo/schema/document/Stemming.java b/config-model/src/main/java/com/yahoo/schema/document/Stemming.java
index 5ec844e2540..5e58254a998 100644
--- a/config-model/src/main/java/com/yahoo/schema/document/Stemming.java
+++ b/config-model/src/main/java/com/yahoo/schema/document/Stemming.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema.document;
import com.yahoo.language.process.StemMode;
diff --git a/config-model/src/main/java/com/yahoo/schema/document/TemporaryImportedField.java b/config-model/src/main/java/com/yahoo/schema/document/TemporaryImportedField.java
index efc0674586d..001f489dbde 100644
--- a/config-model/src/main/java/com/yahoo/schema/document/TemporaryImportedField.java
+++ b/config-model/src/main/java/com/yahoo/schema/document/TemporaryImportedField.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema.document;
/**
diff --git a/config-model/src/main/java/com/yahoo/schema/document/TemporaryImportedFields.java b/config-model/src/main/java/com/yahoo/schema/document/TemporaryImportedFields.java
index 7ad4feb6d32..fc8ba3886a6 100644
--- a/config-model/src/main/java/com/yahoo/schema/document/TemporaryImportedFields.java
+++ b/config-model/src/main/java/com/yahoo/schema/document/TemporaryImportedFields.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema.document;
import com.yahoo.schema.Schema;
diff --git a/config-model/src/main/java/com/yahoo/schema/document/TemporarySDField.java b/config-model/src/main/java/com/yahoo/schema/document/TemporarySDField.java
index e455fa78455..d855a002467 100644
--- a/config-model/src/main/java/com/yahoo/schema/document/TemporarySDField.java
+++ b/config-model/src/main/java/com/yahoo/schema/document/TemporarySDField.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema.document;
import com.yahoo.document.DataType;
diff --git a/config-model/src/main/java/com/yahoo/schema/document/TypedKey.java b/config-model/src/main/java/com/yahoo/schema/document/TypedKey.java
index 8de8c7b64fd..652d21d7f7d 100644
--- a/config-model/src/main/java/com/yahoo/schema/document/TypedKey.java
+++ b/config-model/src/main/java/com/yahoo/schema/document/TypedKey.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema.document;
import com.yahoo.document.DataType;
diff --git a/config-model/src/main/java/com/yahoo/schema/document/annotation/SDAnnotationType.java b/config-model/src/main/java/com/yahoo/schema/document/annotation/SDAnnotationType.java
index 3dc46a91c1b..7bf6a05dd1b 100644
--- a/config-model/src/main/java/com/yahoo/schema/document/annotation/SDAnnotationType.java
+++ b/config-model/src/main/java/com/yahoo/schema/document/annotation/SDAnnotationType.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema.document.annotation;
import com.yahoo.schema.document.SDDocumentType;
diff --git a/config-model/src/main/java/com/yahoo/schema/document/annotation/TemporaryAnnotationReferenceDataType.java b/config-model/src/main/java/com/yahoo/schema/document/annotation/TemporaryAnnotationReferenceDataType.java
index de9bd977823..1019280c540 100644
--- a/config-model/src/main/java/com/yahoo/schema/document/annotation/TemporaryAnnotationReferenceDataType.java
+++ b/config-model/src/main/java/com/yahoo/schema/document/annotation/TemporaryAnnotationReferenceDataType.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema.document.annotation;
import com.yahoo.document.annotation.AnnotationReferenceDataType;
diff --git a/config-model/src/main/java/com/yahoo/schema/expressiontransforms/BooleanExpressionTransformer.java b/config-model/src/main/java/com/yahoo/schema/expressiontransforms/BooleanExpressionTransformer.java
index 3d5d29fb3c7..9aaa8e38b80 100644
--- a/config-model/src/main/java/com/yahoo/schema/expressiontransforms/BooleanExpressionTransformer.java
+++ b/config-model/src/main/java/com/yahoo/schema/expressiontransforms/BooleanExpressionTransformer.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema.expressiontransforms;
import com.yahoo.searchlib.rankingexpression.evaluation.BooleanValue;
diff --git a/config-model/src/main/java/com/yahoo/schema/expressiontransforms/ConstantTensorTransformer.java b/config-model/src/main/java/com/yahoo/schema/expressiontransforms/ConstantTensorTransformer.java
index a9eea3d2ead..1c7843113b3 100644
--- a/config-model/src/main/java/com/yahoo/schema/expressiontransforms/ConstantTensorTransformer.java
+++ b/config-model/src/main/java/com/yahoo/schema/expressiontransforms/ConstantTensorTransformer.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema.expressiontransforms;
import com.yahoo.schema.FeatureNames;
diff --git a/config-model/src/main/java/com/yahoo/schema/expressiontransforms/ExpressionTransforms.java b/config-model/src/main/java/com/yahoo/schema/expressiontransforms/ExpressionTransforms.java
index 42e99f6aa45..42c8147b3dc 100644
--- a/config-model/src/main/java/com/yahoo/schema/expressiontransforms/ExpressionTransforms.java
+++ b/config-model/src/main/java/com/yahoo/schema/expressiontransforms/ExpressionTransforms.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema.expressiontransforms;
import com.yahoo.searchlib.rankingexpression.RankingExpression;
@@ -35,7 +35,8 @@ public class ExpressionTransforms {
new FunctionShadower(),
new TensorMaxMinTransformer(),
new Simplifier(),
- new BooleanExpressionTransformer());
+ new BooleanExpressionTransformer(),
+ new NormalizerFunctionExpander());
}
public RankingExpression transform(RankingExpression expression, RankProfileTransformContext context) {
diff --git a/config-model/src/main/java/com/yahoo/schema/expressiontransforms/FunctionInliner.java b/config-model/src/main/java/com/yahoo/schema/expressiontransforms/FunctionInliner.java
index 382d51747bb..2d64073a46c 100644
--- a/config-model/src/main/java/com/yahoo/schema/expressiontransforms/FunctionInliner.java
+++ b/config-model/src/main/java/com/yahoo/schema/expressiontransforms/FunctionInliner.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema.expressiontransforms;
import com.yahoo.schema.RankProfile;
diff --git a/config-model/src/main/java/com/yahoo/schema/expressiontransforms/FunctionShadower.java b/config-model/src/main/java/com/yahoo/schema/expressiontransforms/FunctionShadower.java
index 702e4ea220e..f3bfdf4cf04 100644
--- a/config-model/src/main/java/com/yahoo/schema/expressiontransforms/FunctionShadower.java
+++ b/config-model/src/main/java/com/yahoo/schema/expressiontransforms/FunctionShadower.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema.expressiontransforms;
import com.yahoo.schema.RankProfile;
diff --git a/config-model/src/main/java/com/yahoo/schema/expressiontransforms/InputRecorder.java b/config-model/src/main/java/com/yahoo/schema/expressiontransforms/InputRecorder.java
index b30873fabee..ab18f9c83db 100644
--- a/config-model/src/main/java/com/yahoo/schema/expressiontransforms/InputRecorder.java
+++ b/config-model/src/main/java/com/yahoo/schema/expressiontransforms/InputRecorder.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema.expressiontransforms;
import com.yahoo.schema.FeatureNames;
@@ -14,6 +14,7 @@ import com.yahoo.searchlib.rankingexpression.transform.ExpressionTransformer;
import com.yahoo.tensor.functions.Generate;
import java.io.StringReader;
+import java.util.Collection;
import java.util.HashSet;
import java.util.Set;
import java.util.logging.Logger;
@@ -29,19 +30,35 @@ public class InputRecorder extends ExpressionTransformer<InputRecorderContext> {
private final Set<String> neededInputs;
private final Set<String> handled = new HashSet<>();
+ private final Set<String> availableNormalizers = new HashSet<>();
+ private final Set<String> usedNormalizers = new HashSet<>();
public InputRecorder(Set<String> target) {
this.neededInputs = target;
}
public void process(RankingExpression expression, RankProfileTransformContext context) {
- transform(expression.getRoot(), new InputRecorderContext(context));
+ process(expression.getRoot(), context);
}
- public void alreadyHandled(String name) {
- handled.add(name);
+ public void process(ExpressionNode node, RankProfileTransformContext context) {
+ transform(node, new InputRecorderContext(context));
}
+ public void alreadyMatchFeatures(Collection<String> matchFeatures) {
+ for (String mf : matchFeatures) {
+ handled.add(mf);
+ }
+ }
+
+ public void addKnownNormalizers(Collection<String> names) {
+ for (String name : names) {
+ availableNormalizers.add(name);
+ }
+ }
+
+ public Set<String> normalizersUsed() { return this.usedNormalizers; }
+
@Override
public ExpressionNode transform(ExpressionNode node, InputRecorderContext context) {
if (node instanceof ReferenceNode r) {
@@ -77,6 +94,10 @@ public class InputRecorder extends ExpressionTransformer<InputRecorderContext> {
if (simpleFunctionOrIdentifier && context.localVariables().contains(name)) {
return;
}
+ if (simpleFunctionOrIdentifier && availableNormalizers.contains(name)) {
+ usedNormalizers.add(name);
+ return;
+ }
if (ref.isSimpleRankingExpressionWrapper()) {
name = ref.simpleArgument().get();
simpleFunctionOrIdentifier = true;
@@ -113,13 +134,21 @@ public class InputRecorder extends ExpressionTransformer<InputRecorderContext> {
}
}
if ("onnx".equals(name)) {
- if (args.size() != 1) {
+ if (args.size() < 1) {
throw new IllegalArgumentException("expected name of ONNX model as argument: " + feature);
}
var arg = args.expressions().get(0);
var models = context.rankProfile().onnxModels();
var model = models.get(arg.toString());
if (model == null) {
+ var tmp = OnnxModelTransformer.transformFeature(feature, context.rankProfile());
+ if (tmp instanceof ReferenceNode newRefNode) {
+ args = newRefNode.getArguments();
+ arg = args.expressions().get(0);
+ model = models.get(arg.toString());
+ }
+ }
+ if (model == null) {
throw new IllegalArgumentException("missing onnx model: " + arg);
}
model.getInputMap().forEach((__, onnxInput) -> {
diff --git a/config-model/src/main/java/com/yahoo/schema/expressiontransforms/InputRecorderContext.java b/config-model/src/main/java/com/yahoo/schema/expressiontransforms/InputRecorderContext.java
index 54617374b67..5fc51f76669 100644
--- a/config-model/src/main/java/com/yahoo/schema/expressiontransforms/InputRecorderContext.java
+++ b/config-model/src/main/java/com/yahoo/schema/expressiontransforms/InputRecorderContext.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema.expressiontransforms;
import com.yahoo.schema.RankProfile;
diff --git a/config-model/src/main/java/com/yahoo/schema/expressiontransforms/LightGBMFeatureConverter.java b/config-model/src/main/java/com/yahoo/schema/expressiontransforms/LightGBMFeatureConverter.java
index af5fa5ebeab..24e0252555c 100644
--- a/config-model/src/main/java/com/yahoo/schema/expressiontransforms/LightGBMFeatureConverter.java
+++ b/config-model/src/main/java/com/yahoo/schema/expressiontransforms/LightGBMFeatureConverter.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema.expressiontransforms;
import com.yahoo.path.Path;
diff --git a/config-model/src/main/java/com/yahoo/schema/expressiontransforms/NormalizerFunctionExpander.java b/config-model/src/main/java/com/yahoo/schema/expressiontransforms/NormalizerFunctionExpander.java
new file mode 100644
index 00000000000..a8fee966656
--- /dev/null
+++ b/config-model/src/main/java/com/yahoo/schema/expressiontransforms/NormalizerFunctionExpander.java
@@ -0,0 +1,134 @@
+// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+package com.yahoo.schema.expressiontransforms;
+
+import com.yahoo.schema.FeatureNames;
+import com.yahoo.schema.RankProfile.RankFeatureNormalizer;
+import com.yahoo.searchlib.rankingexpression.evaluation.BooleanValue;
+import com.yahoo.searchlib.rankingexpression.rule.OperationNode;
+import com.yahoo.searchlib.rankingexpression.rule.Operator;
+import com.yahoo.searchlib.rankingexpression.rule.CompositeNode;
+import com.yahoo.searchlib.rankingexpression.rule.ConstantNode;
+import com.yahoo.searchlib.rankingexpression.rule.ExpressionNode;
+import com.yahoo.searchlib.rankingexpression.rule.IfNode;
+import com.yahoo.searchlib.rankingexpression.transform.ExpressionTransformer;
+import com.yahoo.searchlib.rankingexpression.transform.TransformContext;
+import com.yahoo.searchlib.rankingexpression.RankingExpression;
+import com.yahoo.searchlib.rankingexpression.Reference;
+import com.yahoo.searchlib.rankingexpression.parser.ParseException;
+import com.yahoo.searchlib.rankingexpression.rule.CompositeNode;
+import com.yahoo.searchlib.rankingexpression.rule.ConstantNode;
+import com.yahoo.searchlib.rankingexpression.rule.ExpressionNode;
+import com.yahoo.searchlib.rankingexpression.rule.ReferenceNode;
+import com.yahoo.searchlib.rankingexpression.rule.TensorFunctionNode;
+import com.yahoo.searchlib.rankingexpression.transform.ExpressionTransformer;
+import com.yahoo.tensor.functions.Generate;
+
+import java.io.StringReader;
+import java.util.HashSet;
+import java.util.Set;
+import java.util.logging.Logger;
+
+import java.util.ArrayDeque;
+import java.util.Deque;
+import java.util.Iterator;
+import java.util.List;
+import java.util.ArrayList;
+
+/**
+ * Recognizes pseudo-functions and creates global-phase normalizers
+ * @author arnej
+ */
+public class NormalizerFunctionExpander extends ExpressionTransformer<RankProfileTransformContext> {
+
+ public final static String NORMALIZE_LINEAR = "normalize_linear";
+ public final static String RECIPROCAL_RANK = "reciprocal_rank";
+ public final static String RECIPROCAL_RANK_FUSION = "reciprocal_rank_fusion";
+
+ @Override
+ public ExpressionNode transform(ExpressionNode node, RankProfileTransformContext context) {
+ if (node instanceof ReferenceNode r) {
+ node = transformReference(r, context);
+ }
+ if (node instanceof CompositeNode composite) {
+ node = transformChildren(composite, context);
+ }
+ return node;
+ }
+
+ private ExpressionNode transformReference(ReferenceNode node, RankProfileTransformContext context) {
+ Reference ref = node.reference();
+ String name = ref.name();
+ if (ref.output() != null) {
+ return node;
+ }
+ var f = context.rankProfile().getFunctions().get(name);
+ if (f != null) {
+ // never transform declared functions
+ return node;
+ }
+ return switch(name) {
+ case RECIPROCAL_RANK_FUSION -> transform(expandRRF(ref), context);
+ case NORMALIZE_LINEAR -> transformNormLin(ref, context);
+ case RECIPROCAL_RANK -> transformRRank(ref, context);
+ default -> node;
+ };
+ }
+
+ private ExpressionNode expandRRF(Reference ref) {
+ var args = ref.arguments();
+ if (args.size() < 2) {
+ throw new IllegalArgumentException("must have at least 2 arguments: " + ref);
+ }
+ List<ExpressionNode> children = new ArrayList<>();
+ List<Operator> operators = new ArrayList<>();
+ for (var arg : args.expressions()) {
+ if (! children.isEmpty()) operators.add(Operator.plus);
+ children.add(new ReferenceNode(RECIPROCAL_RANK, List.of(arg), null));
+ }
+ // must be further transformed (see above)
+ return new OperationNode(children, operators);
+ }
+
+ private ExpressionNode transformNormLin(Reference ref, RankProfileTransformContext context) {
+ var args = ref.arguments();
+ if (args.size() != 1) {
+ throw new IllegalArgumentException("must have exactly 1 argument: " + ref);
+ }
+ var input = args.expressions().get(0);
+ if (input instanceof ReferenceNode inputRefNode) {
+ var inputRef = inputRefNode.reference();
+ RankFeatureNormalizer normalizer = RankFeatureNormalizer.linear(ref, inputRef);
+ context.rankProfile().addFeatureNormalizer(normalizer);
+ var newRef = Reference.fromIdentifier(normalizer.name());
+ return new ReferenceNode(newRef);
+ } else {
+ throw new IllegalArgumentException("the first argument must be a simple feature: " + ref + " => " + input.getClass());
+ }
+ }
+
+ private ExpressionNode transformRRank(Reference ref, RankProfileTransformContext context) {
+ var args = ref.arguments();
+ if (args.size() < 1 || args.size() > 2) {
+ throw new IllegalArgumentException("must have 1 or 2 arguments: " + ref);
+ }
+ double k = 60.0;
+ if (args.size() == 2) {
+ var kArg = args.expressions().get(1);
+ if (kArg instanceof ConstantNode kNode) {
+ k = kNode.getValue().asDouble();
+ } else {
+ throw new IllegalArgumentException("the second argument (k) must be a constant in: " + ref);
+ }
+ }
+ var input = args.expressions().get(0);
+ if (input instanceof ReferenceNode inputRefNode) {
+ var inputRef = inputRefNode.reference();
+ RankFeatureNormalizer normalizer = RankFeatureNormalizer.rrank(ref, inputRef, k);
+ context.rankProfile().addFeatureNormalizer(normalizer);
+ var newRef = Reference.fromIdentifier(normalizer.name());
+ return new ReferenceNode(newRef);
+ } else {
+ throw new IllegalArgumentException("the first argument must be a simple feature: " + ref);
+ }
+ }
+}
diff --git a/config-model/src/main/java/com/yahoo/schema/expressiontransforms/OnnxFeatureConverter.java b/config-model/src/main/java/com/yahoo/schema/expressiontransforms/OnnxFeatureConverter.java
index 2277491cd47..ff9367c36a9 100644
--- a/config-model/src/main/java/com/yahoo/schema/expressiontransforms/OnnxFeatureConverter.java
+++ b/config-model/src/main/java/com/yahoo/schema/expressiontransforms/OnnxFeatureConverter.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema.expressiontransforms;
import com.yahoo.path.Path;
diff --git a/config-model/src/main/java/com/yahoo/schema/expressiontransforms/OnnxModelTransformer.java b/config-model/src/main/java/com/yahoo/schema/expressiontransforms/OnnxModelTransformer.java
index 8797deefcb6..4af4b31a2f8 100644
--- a/config-model/src/main/java/com/yahoo/schema/expressiontransforms/OnnxModelTransformer.java
+++ b/config-model/src/main/java/com/yahoo/schema/expressiontransforms/OnnxModelTransformer.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema.expressiontransforms;
import com.yahoo.path.Path;
diff --git a/config-model/src/main/java/com/yahoo/schema/expressiontransforms/RankProfileTransformContext.java b/config-model/src/main/java/com/yahoo/schema/expressiontransforms/RankProfileTransformContext.java
index 890fa5e7a10..43f02ab238b 100644
--- a/config-model/src/main/java/com/yahoo/schema/expressiontransforms/RankProfileTransformContext.java
+++ b/config-model/src/main/java/com/yahoo/schema/expressiontransforms/RankProfileTransformContext.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema.expressiontransforms;
import ai.vespa.rankingexpression.importer.configmodelview.ImportedMlModels;
diff --git a/config-model/src/main/java/com/yahoo/schema/expressiontransforms/TensorFlowFeatureConverter.java b/config-model/src/main/java/com/yahoo/schema/expressiontransforms/TensorFlowFeatureConverter.java
index e2bef0063ea..186452dd3b6 100644
--- a/config-model/src/main/java/com/yahoo/schema/expressiontransforms/TensorFlowFeatureConverter.java
+++ b/config-model/src/main/java/com/yahoo/schema/expressiontransforms/TensorFlowFeatureConverter.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema.expressiontransforms;
import com.yahoo.searchlib.rankingexpression.rule.CompositeNode;
diff --git a/config-model/src/main/java/com/yahoo/schema/expressiontransforms/TokenTransformer.java b/config-model/src/main/java/com/yahoo/schema/expressiontransforms/TokenTransformer.java
index 04a31a47190..c044b91bb7e 100644
--- a/config-model/src/main/java/com/yahoo/schema/expressiontransforms/TokenTransformer.java
+++ b/config-model/src/main/java/com/yahoo/schema/expressiontransforms/TokenTransformer.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema.expressiontransforms;
import com.yahoo.searchlib.rankingexpression.ExpressionFunction;
diff --git a/config-model/src/main/java/com/yahoo/schema/expressiontransforms/XgboostFeatureConverter.java b/config-model/src/main/java/com/yahoo/schema/expressiontransforms/XgboostFeatureConverter.java
index b05f9ba9166..e71d97b4fcc 100644
--- a/config-model/src/main/java/com/yahoo/schema/expressiontransforms/XgboostFeatureConverter.java
+++ b/config-model/src/main/java/com/yahoo/schema/expressiontransforms/XgboostFeatureConverter.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema.expressiontransforms;
import com.yahoo.path.Path;
diff --git a/config-model/src/main/java/com/yahoo/schema/fieldoperation/FieldOperation.java b/config-model/src/main/java/com/yahoo/schema/fieldoperation/FieldOperation.java
index 126f594c371..22a9eed2914 100644
--- a/config-model/src/main/java/com/yahoo/schema/fieldoperation/FieldOperation.java
+++ b/config-model/src/main/java/com/yahoo/schema/fieldoperation/FieldOperation.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema.fieldoperation;
import com.yahoo.schema.document.SDField;
diff --git a/config-model/src/main/java/com/yahoo/schema/fieldoperation/IndexingOperation.java b/config-model/src/main/java/com/yahoo/schema/fieldoperation/IndexingOperation.java
index bb79a45831e..f5366c4b07a 100644
--- a/config-model/src/main/java/com/yahoo/schema/fieldoperation/IndexingOperation.java
+++ b/config-model/src/main/java/com/yahoo/schema/fieldoperation/IndexingOperation.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema.fieldoperation;
import com.yahoo.language.Linguistics;
diff --git a/config-model/src/main/java/com/yahoo/schema/parser/ConvertParsedFields.java b/config-model/src/main/java/com/yahoo/schema/parser/ConvertParsedFields.java
index 7fd16826667..bc0e16abbe3 100644
--- a/config-model/src/main/java/com/yahoo/schema/parser/ConvertParsedFields.java
+++ b/config-model/src/main/java/com/yahoo/schema/parser/ConvertParsedFields.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema.parser;
import com.yahoo.document.DataType;
@@ -20,6 +20,7 @@ import com.yahoo.vespa.documentmodel.SummaryTransform;
import java.util.Locale;
import java.util.Map;
+import java.util.logging.Level;
/**
* Helper for converting ParsedField etc to SDField with settings
@@ -137,7 +138,7 @@ public class ConvertParsedFields {
}
// from grammar, things that can be inside struct-field block
- private void convertCommonFieldSettings(SDField field, ParsedField parsed) {
+ private void convertCommonFieldSettings(Schema schema, SDField field, ParsedField parsed) {
convertMatchSettings(field, parsed.matchSettings());
var indexing = parsed.getIndexing();
if (indexing.isPresent()) {
@@ -152,7 +153,12 @@ public class ConvertParsedFields {
for (var summaryField : parsed.getSummaryFields()) {
var dataType = field.getDataType();
var otherType = summaryField.getType();
- if (otherType != null) {
+ if (otherType != null && summaryField.getHasExplicitType()) {
+ schema.getDeployLogger().log(Level.FINE, () -> "For " + schema.getName() +
+ ", field '" + field.getName() +
+ "', summary '" + summaryField.name() +
+ "': Specifying the type is deprecated, ignored and will be an error in Vespa 9." +
+ " Remove the type specification to silence this warning.");
dataType = context.resolveType(otherType);
}
convertSummaryField(field, summaryField, dataType);
@@ -161,7 +167,7 @@ public class ConvertParsedFields {
field.addQueryCommand(command);
}
for (var structField : parsed.getStructFields()) {
- convertStructField(field, structField);
+ convertStructField(schema, field, structField);
}
if (parsed.hasLiteral()) {
field.getRanking().setLiteral(true);
@@ -174,13 +180,13 @@ public class ConvertParsedFields {
}
}
- private void convertStructField(SDField field, ParsedField parsed) {
+ private void convertStructField(Schema schema, SDField field, ParsedField parsed) {
SDField structField = field.getStructField(parsed.name());
if (structField == null ) {
throw new IllegalArgumentException("Struct field '" + parsed.name() + "' has not been defined in struct " +
"for field '" + field.getName() + "'.");
}
- convertCommonFieldSettings(structField, parsed);
+ convertCommonFieldSettings(schema, structField, parsed);
}
private void convertExtraFieldSettings(SDField field, ParsedField parsed) {
@@ -217,6 +223,8 @@ public class ConvertParsedFields {
transform = SummaryTransform.MATCHED_ELEMENTS_FILTER;
} else if (parsed.getDynamic()) {
transform = SummaryTransform.DYNAMICTEASER;
+ } else if (parsed.getTokens()) {
+ transform = SummaryTransform.TOKENS;
}
if (parsed.getBolded()) {
transform = transform.bold();
@@ -278,7 +286,7 @@ public class ConvertParsedFields {
String name = parsed.name();
DataType dataType = context.resolveType(parsed.getType());
var field = new SDField(document, name, dataType);
- convertCommonFieldSettings(field, parsed);
+ convertCommonFieldSettings(schema, field, parsed);
convertExtraFieldSettings(field, parsed);
document.addField(field);
return field;
@@ -288,7 +296,7 @@ public class ConvertParsedFields {
String name = parsed.name();
DataType dataType = context.resolveType(parsed.getType());
var field = new SDField(schema.getDocument(), name, dataType);
- convertCommonFieldSettings(field, parsed);
+ convertCommonFieldSettings(schema, field, parsed);
convertExtraFieldSettings(field, parsed);
schema.addExtraField(field);
}
@@ -305,7 +313,7 @@ public class ConvertParsedFields {
for (var parsedField : parsed.getFields()) {
var fieldType = context.resolveType(parsedField.getType());
var field = new SDField(document, parsedField.name(), fieldType);
- convertCommonFieldSettings(field, parsedField);
+ convertCommonFieldSettings(schema, field, parsedField);
structProxy.addField(field);
if (parsedField.hasIdOverride()) {
structProxy.setFieldId(field, parsedField.idOverride());
diff --git a/config-model/src/main/java/com/yahoo/schema/parser/ConvertParsedRanking.java b/config-model/src/main/java/com/yahoo/schema/parser/ConvertParsedRanking.java
index c25d393c8bf..5ccbb7b19a4 100644
--- a/config-model/src/main/java/com/yahoo/schema/parser/ConvertParsedRanking.java
+++ b/config-model/src/main/java/com/yahoo/schema/parser/ConvertParsedRanking.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema.parser;
import com.yahoo.schema.RankProfile;
diff --git a/config-model/src/main/java/com/yahoo/schema/parser/ConvertParsedSchemas.java b/config-model/src/main/java/com/yahoo/schema/parser/ConvertParsedSchemas.java
index 40ec84ec8bc..7e19cb4a0ae 100644
--- a/config-model/src/main/java/com/yahoo/schema/parser/ConvertParsedSchemas.java
+++ b/config-model/src/main/java/com/yahoo/schema/parser/ConvertParsedSchemas.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema.parser;
import com.yahoo.config.application.api.ApplicationPackage;
@@ -11,11 +11,13 @@ import com.yahoo.config.model.deploy.TestProperties;
import com.yahoo.config.model.test.MockApplicationPackage;
import com.yahoo.document.DataType;
import com.yahoo.document.DocumentTypeManager;
+import com.yahoo.document.PositionDataType;
import com.yahoo.schema.DefaultRankProfile;
import com.yahoo.schema.DocumentOnlySchema;
import com.yahoo.schema.RankProfileRegistry;
import com.yahoo.schema.Schema;
import com.yahoo.schema.UnrankedRankProfile;
+import com.yahoo.schema.derived.SummaryClass;
import com.yahoo.schema.document.SDDocumentType;
import com.yahoo.schema.document.SDField;
import com.yahoo.schema.document.TemporaryImportedField;
@@ -25,7 +27,9 @@ import com.yahoo.vespa.documentmodel.SummaryField;
import java.util.ArrayList;
import java.util.LinkedHashMap;
+import java.util.LinkedHashSet;
import java.util.List;
+import java.util.logging.Level;
import java.util.Map;
import java.util.Optional;
@@ -137,14 +141,88 @@ public class ConvertParsedSchemas {
schema.addDocument(document);
}
- private void convertDocumentSummary(Schema schema, ParsedDocumentSummary parsed, TypeResolver typeContext) {
- var docsum = new DocumentSummary(parsed.name(), schema);
- var inheritList = parsed.getInherited();
- if (inheritList.size() == 1) {
- docsum.setInherited(inheritList.get(0));
- } else if (inheritList.size() != 0) {
- throw new IllegalArgumentException("document-summary "+parsed.name()+" cannot inherit more than once");
+ /*
+ * Helper class for resolving data type for a document summary. Summary type is still
+ * used internally in config model when generating and processing indexing scripts.
+ * See DynamicSummaryTransformUtils class comment for more details.
+ *
+ * This kind of resolving is a temporary measure until the use of summary fields have
+ * been eliminated from indexing scripts and are no longer used to extend the document
+ * type. At that time, the data type of a summary field is no longer relevant.
+ */
+ private class SummaryFieldTypeResolver {
+
+ private final Schema schema;
+ private final Map<String, ParsedSummaryField> summaryFields = new LinkedHashMap<String, ParsedSummaryField>();
+ private static final String zCurveSuffix = new String("_zcurve");
+
+ public SummaryFieldTypeResolver(Schema schema, List<ParsedDocumentSummary> parsed) {
+ this.schema = schema;
+ for (var docsum : parsed) {
+ for (var field : docsum.getSummaryFields()) {
+ summaryFields.put(field.name(), field);
+ }
+ }
+ }
+
+ private boolean isPositionAttribute(Schema schema, String sourceFieldName) {
+ if (!sourceFieldName.endsWith(zCurveSuffix)) {
+ return false;
+ }
+ var name = sourceFieldName.substring(0, sourceFieldName.length() - zCurveSuffix.length());
+ var field = schema.getField(name);
+ return (field.getDataType().equals(PositionDataType.INSTANCE));
+ }
+
+
+ private String getSingleSource(ParsedSummaryField parsedField) {
+ if (parsedField.getSources().size() == 1) {
+ return parsedField.getSources().get(0);
+ }
+ return parsedField.name();
+ }
+
+ public DataType resolve(ParsedDocumentSummary docsum, ParsedSummaryField parsedField) {
+ var seen = new LinkedHashSet<String>();
+ var origName = parsedField.name();
+ while (true) {
+ if (seen.contains(parsedField.name())) {
+ throw new IllegalArgumentException("For schema '" + schema.getName() +
+ "' summary class '" + docsum.name() +
+ "' summary field '" + origName +
+ "': Source loop detected for summary field '" + parsedField.name() + "'");
+ }
+ seen.add(parsedField.name());
+ if (parsedField.getSources().size() >= 2) {
+ return DataType.STRING; // Flattening, streaming search
+ }
+ var source = getSingleSource(parsedField);
+ if (source.equals(SummaryClass.DOCUMENT_ID_FIELD)) {
+ return DataType.STRING; // Reserved source field name
+ } else if (isPositionAttribute(schema, source)) {
+ return DataType.LONG; // Extra field with suffix is added later for positions
+ }
+ var field = schema.getField(source);
+ if (field != null) {
+ return field.getDataType();
+ } else if (schema.temporaryImportedFields().isPresent() &&
+ schema.temporaryImportedFields().get().hasField(source)) {
+ return null; // Imported field, cannot resolve now
+ } else if (source.equals(parsedField.name()) || !summaryFields.containsKey(source)) {
+ throw new IllegalArgumentException("For schema '" + schema.getName() +
+ "', summary class '" + docsum.name() +
+ "', summary field '" + parsedField.name() +
+ "': there is no valid source '" + source + "'.");
+ }
+ parsedField = summaryFields.get(source);
+ }
}
+ }
+
+ private void convertDocumentSummary(Schema schema, ParsedDocumentSummary parsed, TypeResolver typeContext,
+ SummaryFieldTypeResolver sfResolver) {
+ var docsum = new DocumentSummary(parsed.name(), schema);
+ parsed.getInherited().forEach(inherited -> docsum.addInherited(inherited));
if (parsed.getFromDisk()) {
docsum.setFromDisk(true);
}
@@ -153,10 +231,17 @@ public class ConvertParsedSchemas {
}
for (var parsedField : parsed.getSummaryFields()) {
var parsedType = parsedField.getType();
+ if (parsedType != null) {
+ var log = schema.getDeployLogger();
+ log.log(Level.FINE, () -> "For " + schema.getName() +
+ ", document-summary '" + parsed.name() +
+ "', summary field '" + parsedField.name() +
+ "': Specifying the type is deprecated, ignored and will be an error in Vespa 9." +
+ " Remove the type specification to silence this warning.");
+ }
DataType dataType = (parsedType != null) ? typeContext.resolveType(parsedType) : null;
- var existingField = schema.getField(parsedField.name());
- if (existingField != null) {
- var existingType = existingField.getDataType();
+ DataType existingType = sfResolver.resolve(parsed, parsedField);
+ if (existingType != null) {
if (dataType == null) {
dataType = existingType;
} else if (!dataType.equals(existingType)) {
@@ -166,10 +251,9 @@ public class ConvertParsedSchemas {
}
}
}
- if (dataType == null) {
- throw new IllegalArgumentException("Missing data-type for summary field " + parsedField.name() + " in document-summary " + parsed.name());
- }
- var summaryField = new SummaryField(parsedField.name(), dataType);
+ var summaryField = (dataType == null) ?
+ SummaryField.createWithUnresolvedType(parsedField.name()) :
+ new SummaryField(parsedField.name(), dataType);
// XXX does not belong here:
summaryField.setVsmCommand(SummaryField.VsmCommand.FLATTENSPACE);
ConvertParsedFields.convertSummaryFieldSettings(summaryField, parsedField);
@@ -211,6 +295,7 @@ public class ConvertParsedSchemas {
}
parsed.getRawAsBase64().ifPresent(value -> schema.enableRawAsBase64(value));
var typeContext = typeConverter.makeContext(parsed.getDocument());
+ var sfResolver = new SummaryFieldTypeResolver(schema, parsed.getDocumentSummaries());
var fieldConverter = new ConvertParsedFields(typeContext, convertedStructs);
convertDocument(schema, parsed.getDocument(), fieldConverter);
for (var field : parsed.getFields()) {
@@ -219,12 +304,12 @@ public class ConvertParsedSchemas {
for (var index : parsed.getIndexes()) {
fieldConverter.convertExtraIndex(schema, index);
}
- for (var docsum : parsed.getDocumentSummaries()) {
- convertDocumentSummary(schema, docsum, typeContext);
- }
for (var importedField : parsed.getImportedFields()) {
convertImportField(schema, importedField);
}
+ for (var docsum : parsed.getDocumentSummaries()) {
+ convertDocumentSummary(schema, docsum, typeContext, sfResolver);
+ }
for (var fieldSet : parsed.getFieldSets()) {
convertFieldSet(schema, fieldSet);
}
diff --git a/config-model/src/main/java/com/yahoo/schema/parser/ConvertParsedTypes.java b/config-model/src/main/java/com/yahoo/schema/parser/ConvertParsedTypes.java
index efe1547f146..1ec8d452233 100644
--- a/config-model/src/main/java/com/yahoo/schema/parser/ConvertParsedTypes.java
+++ b/config-model/src/main/java/com/yahoo/schema/parser/ConvertParsedTypes.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema.parser;
import com.yahoo.document.DataType;
diff --git a/config-model/src/main/java/com/yahoo/schema/parser/ConvertSchemaCollection.java b/config-model/src/main/java/com/yahoo/schema/parser/ConvertSchemaCollection.java
index b414d3757e2..ef30ec518f0 100644
--- a/config-model/src/main/java/com/yahoo/schema/parser/ConvertSchemaCollection.java
+++ b/config-model/src/main/java/com/yahoo/schema/parser/ConvertSchemaCollection.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema.parser;
import com.yahoo.config.application.api.ApplicationPackage;
diff --git a/config-model/src/main/java/com/yahoo/schema/parser/DictionaryOption.java b/config-model/src/main/java/com/yahoo/schema/parser/DictionaryOption.java
index 3acb51ace3f..006ce7332ae 100644
--- a/config-model/src/main/java/com/yahoo/schema/parser/DictionaryOption.java
+++ b/config-model/src/main/java/com/yahoo/schema/parser/DictionaryOption.java
@@ -1,3 +1,4 @@
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema.parser;
public enum DictionaryOption {
diff --git a/config-model/src/main/java/com/yahoo/schema/parser/InheritanceResolver.java b/config-model/src/main/java/com/yahoo/schema/parser/InheritanceResolver.java
index ad9acf2f095..d9d51a437ad 100644
--- a/config-model/src/main/java/com/yahoo/schema/parser/InheritanceResolver.java
+++ b/config-model/src/main/java/com/yahoo/schema/parser/InheritanceResolver.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema.parser;
import java.util.ArrayList;
diff --git a/config-model/src/main/java/com/yahoo/schema/parser/IntermediateCollection.java b/config-model/src/main/java/com/yahoo/schema/parser/IntermediateCollection.java
index d893919f640..789f7023aed 100644
--- a/config-model/src/main/java/com/yahoo/schema/parser/IntermediateCollection.java
+++ b/config-model/src/main/java/com/yahoo/schema/parser/IntermediateCollection.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema.parser;
import com.yahoo.config.application.api.ApplicationPackage;
diff --git a/config-model/src/main/java/com/yahoo/schema/parser/ParsedAnnotation.java b/config-model/src/main/java/com/yahoo/schema/parser/ParsedAnnotation.java
index c36656838f7..0037032bf11 100644
--- a/config-model/src/main/java/com/yahoo/schema/parser/ParsedAnnotation.java
+++ b/config-model/src/main/java/com/yahoo/schema/parser/ParsedAnnotation.java
@@ -1,3 +1,4 @@
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema.parser;
import java.util.ArrayList;
diff --git a/config-model/src/main/java/com/yahoo/schema/parser/ParsedAttribute.java b/config-model/src/main/java/com/yahoo/schema/parser/ParsedAttribute.java
index 26916a6685e..56eff4cd171 100644
--- a/config-model/src/main/java/com/yahoo/schema/parser/ParsedAttribute.java
+++ b/config-model/src/main/java/com/yahoo/schema/parser/ParsedAttribute.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema.parser;
import java.util.LinkedHashMap;
diff --git a/config-model/src/main/java/com/yahoo/schema/parser/ParsedBlock.java b/config-model/src/main/java/com/yahoo/schema/parser/ParsedBlock.java
index c20abf52bf3..53dc23964ce 100644
--- a/config-model/src/main/java/com/yahoo/schema/parser/ParsedBlock.java
+++ b/config-model/src/main/java/com/yahoo/schema/parser/ParsedBlock.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema.parser;
/**
diff --git a/config-model/src/main/java/com/yahoo/schema/parser/ParsedDocument.java b/config-model/src/main/java/com/yahoo/schema/parser/ParsedDocument.java
index 281e7989885..e27d886f5fa 100644
--- a/config-model/src/main/java/com/yahoo/schema/parser/ParsedDocument.java
+++ b/config-model/src/main/java/com/yahoo/schema/parser/ParsedDocument.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema.parser;
import java.util.ArrayList;
diff --git a/config-model/src/main/java/com/yahoo/schema/parser/ParsedDocumentSummary.java b/config-model/src/main/java/com/yahoo/schema/parser/ParsedDocumentSummary.java
index 7aaabaef865..e29b0507821 100644
--- a/config-model/src/main/java/com/yahoo/schema/parser/ParsedDocumentSummary.java
+++ b/config-model/src/main/java/com/yahoo/schema/parser/ParsedDocumentSummary.java
@@ -1,3 +1,4 @@
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema.parser;
@@ -10,8 +11,9 @@ import java.util.Map;
* This class holds the extracted information after parsing a
* "document-summary" block, using simple data structures as far as
* possible. Do not put advanced logic here!
+ *
* @author arnej27959
- **/
+ */
class ParsedDocumentSummary extends ParsedBlock {
private boolean omitSummaryFeatures;
@@ -45,4 +47,5 @@ class ParsedDocumentSummary extends ParsedBlock {
void inherit(String other) {
inherited.add(other);
}
+
}
diff --git a/config-model/src/main/java/com/yahoo/schema/parser/ParsedField.java b/config-model/src/main/java/com/yahoo/schema/parser/ParsedField.java
index a4df2ac6dc2..3d575649151 100644
--- a/config-model/src/main/java/com/yahoo/schema/parser/ParsedField.java
+++ b/config-model/src/main/java/com/yahoo/schema/parser/ParsedField.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema.parser;
import com.yahoo.schema.document.Stemming;
diff --git a/config-model/src/main/java/com/yahoo/schema/parser/ParsedFieldSet.java b/config-model/src/main/java/com/yahoo/schema/parser/ParsedFieldSet.java
index 9e8906a41a4..c4785eac47d 100644
--- a/config-model/src/main/java/com/yahoo/schema/parser/ParsedFieldSet.java
+++ b/config-model/src/main/java/com/yahoo/schema/parser/ParsedFieldSet.java
@@ -1,3 +1,4 @@
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema.parser;
import java.util.ArrayList;
diff --git a/config-model/src/main/java/com/yahoo/schema/parser/ParsedIndex.java b/config-model/src/main/java/com/yahoo/schema/parser/ParsedIndex.java
index cf70168e8d2..d0c0c1bf7db 100644
--- a/config-model/src/main/java/com/yahoo/schema/parser/ParsedIndex.java
+++ b/config-model/src/main/java/com/yahoo/schema/parser/ParsedIndex.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema.parser;
import com.yahoo.schema.document.HnswIndexParams;
diff --git a/config-model/src/main/java/com/yahoo/schema/parser/ParsedIndexingOp.java b/config-model/src/main/java/com/yahoo/schema/parser/ParsedIndexingOp.java
index 3a2df2aac4c..af86dd150ab 100644
--- a/config-model/src/main/java/com/yahoo/schema/parser/ParsedIndexingOp.java
+++ b/config-model/src/main/java/com/yahoo/schema/parser/ParsedIndexingOp.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema.parser;
import com.yahoo.vespa.indexinglanguage.ExpressionSearcher;
diff --git a/config-model/src/main/java/com/yahoo/schema/parser/ParsedMatchSettings.java b/config-model/src/main/java/com/yahoo/schema/parser/ParsedMatchSettings.java
index 33094be1079..4c2119b1eba 100644
--- a/config-model/src/main/java/com/yahoo/schema/parser/ParsedMatchSettings.java
+++ b/config-model/src/main/java/com/yahoo/schema/parser/ParsedMatchSettings.java
@@ -1,3 +1,4 @@
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema.parser;
import com.yahoo.schema.document.Case;
diff --git a/config-model/src/main/java/com/yahoo/schema/parser/ParsedRankFunction.java b/config-model/src/main/java/com/yahoo/schema/parser/ParsedRankFunction.java
index 73f1316d468..11081712f0e 100644
--- a/config-model/src/main/java/com/yahoo/schema/parser/ParsedRankFunction.java
+++ b/config-model/src/main/java/com/yahoo/schema/parser/ParsedRankFunction.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema.parser;
import java.util.ArrayList;
diff --git a/config-model/src/main/java/com/yahoo/schema/parser/ParsedRankProfile.java b/config-model/src/main/java/com/yahoo/schema/parser/ParsedRankProfile.java
index 1d06b993cdc..fbbb0c7fe83 100644
--- a/config-model/src/main/java/com/yahoo/schema/parser/ParsedRankProfile.java
+++ b/config-model/src/main/java/com/yahoo/schema/parser/ParsedRankProfile.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema.parser;
import com.yahoo.schema.OnnxModel;
diff --git a/config-model/src/main/java/com/yahoo/schema/parser/ParsedSchema.java b/config-model/src/main/java/com/yahoo/schema/parser/ParsedSchema.java
index 5ee483db044..171b4c0e2e0 100644
--- a/config-model/src/main/java/com/yahoo/schema/parser/ParsedSchema.java
+++ b/config-model/src/main/java/com/yahoo/schema/parser/ParsedSchema.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema.parser;
import com.yahoo.schema.OnnxModel;
diff --git a/config-model/src/main/java/com/yahoo/schema/parser/ParsedSorting.java b/config-model/src/main/java/com/yahoo/schema/parser/ParsedSorting.java
index af84bbbb5bd..5b3ca176506 100644
--- a/config-model/src/main/java/com/yahoo/schema/parser/ParsedSorting.java
+++ b/config-model/src/main/java/com/yahoo/schema/parser/ParsedSorting.java
@@ -1,3 +1,4 @@
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema.parser;
diff --git a/config-model/src/main/java/com/yahoo/schema/parser/ParsedStruct.java b/config-model/src/main/java/com/yahoo/schema/parser/ParsedStruct.java
index 02d10bcb487..31a886481ee 100644
--- a/config-model/src/main/java/com/yahoo/schema/parser/ParsedStruct.java
+++ b/config-model/src/main/java/com/yahoo/schema/parser/ParsedStruct.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema.parser;
import java.util.ArrayList;
diff --git a/config-model/src/main/java/com/yahoo/schema/parser/ParsedSummaryField.java b/config-model/src/main/java/com/yahoo/schema/parser/ParsedSummaryField.java
index 38ee52c9d06..8f9733d2595 100644
--- a/config-model/src/main/java/com/yahoo/schema/parser/ParsedSummaryField.java
+++ b/config-model/src/main/java/com/yahoo/schema/parser/ParsedSummaryField.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema.parser;
import java.util.ArrayList;
@@ -18,6 +18,8 @@ class ParsedSummaryField extends ParsedBlock {
private boolean isMEO = false;
private boolean isFull = false;
private boolean isBold = false;
+ private boolean isTokens = false;
+ private boolean hasExplicitType = false;
private final List<String> sources = new ArrayList<>();
private final List<String> destinations = new ArrayList<>();
@@ -37,6 +39,8 @@ class ParsedSummaryField extends ParsedBlock {
boolean getDynamic() { return isDyn; }
boolean getFull() { return isFull; }
boolean getMatchedElementsOnly() { return isMEO; }
+ boolean getTokens() { return isTokens; }
+ boolean getHasExplicitType() { return hasExplicitType; }
void addDestination(String dst) { destinations.add(dst); }
void addSource(String src) { sources.add(src); }
@@ -44,6 +48,8 @@ class ParsedSummaryField extends ParsedBlock {
void setDynamic() { this.isDyn = true; }
void setFull() { this.isFull = true; }
void setMatchedElementsOnly() { this.isMEO = true; }
+ void setTokens() { this.isTokens = true; }
+ void setHasExplicitType() { this.hasExplicitType = true; }
void setType(ParsedType value) {
verifyThat(type == null, "Cannot change type from ", type, "to", value);
this.type = value;
diff --git a/config-model/src/main/java/com/yahoo/schema/parser/ParsedType.java b/config-model/src/main/java/com/yahoo/schema/parser/ParsedType.java
index 5613278ee85..aad9861273b 100644
--- a/config-model/src/main/java/com/yahoo/schema/parser/ParsedType.java
+++ b/config-model/src/main/java/com/yahoo/schema/parser/ParsedType.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema.parser;
import com.yahoo.tensor.TensorType;
diff --git a/config-model/src/main/java/com/yahoo/schema/parser/SimpleCharStream.java b/config-model/src/main/java/com/yahoo/schema/parser/SimpleCharStream.java
index 0a53e0477ac..7a3e86b0725 100644
--- a/config-model/src/main/java/com/yahoo/schema/parser/SimpleCharStream.java
+++ b/config-model/src/main/java/com/yahoo/schema/parser/SimpleCharStream.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema.parser;
import com.yahoo.javacc.FastCharStream;
diff --git a/config-model/src/main/java/com/yahoo/schema/parser/Utils.java b/config-model/src/main/java/com/yahoo/schema/parser/Utils.java
index cdb299c92df..bf9e96f01a4 100644
--- a/config-model/src/main/java/com/yahoo/schema/parser/Utils.java
+++ b/config-model/src/main/java/com/yahoo/schema/parser/Utils.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema.parser;
/**
diff --git a/config-model/src/main/java/com/yahoo/schema/processing/AddAttributeTransformToSummaryOfImportedFields.java b/config-model/src/main/java/com/yahoo/schema/processing/AddDataTypeAndTransformToSummaryOfImportedFields.java
index d95b4ed4a33..762279e3871 100644
--- a/config-model/src/main/java/com/yahoo/schema/processing/AddAttributeTransformToSummaryOfImportedFields.java
+++ b/config-model/src/main/java/com/yahoo/schema/processing/AddDataTypeAndTransformToSummaryOfImportedFields.java
@@ -1,7 +1,9 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema.processing;
import com.yahoo.config.application.api.DeployLogger;
+import com.yahoo.document.DataType;
+import com.yahoo.document.PositionDataType;
import com.yahoo.schema.RankProfileRegistry;
import com.yahoo.schema.Schema;
import com.yahoo.schema.document.ImmutableImportedComplexSDField;
@@ -13,17 +15,17 @@ import com.yahoo.vespa.model.container.search.QueryProfiles;
import java.util.stream.Stream;
/**
- * Adds the attribute summary transform ({@link SummaryTransform#ATTRIBUTE} to all {@link SummaryField} having an imported
+ * Adds the data type and attribute summary transform ({@link SummaryTransform#ATTRIBUTE} to all {@link SummaryField} having an imported
* field as source.
*
* @author bjorncs
*/
-public class AddAttributeTransformToSummaryOfImportedFields extends Processor {
+public class AddDataTypeAndTransformToSummaryOfImportedFields extends Processor {
- public AddAttributeTransformToSummaryOfImportedFields(Schema schema,
- DeployLogger deployLogger,
- RankProfileRegistry rankProfileRegistry,
- QueryProfiles queryProfiles) {
+ public AddDataTypeAndTransformToSummaryOfImportedFields(Schema schema,
+ DeployLogger deployLogger,
+ RankProfileRegistry rankProfileRegistry,
+ QueryProfiles queryProfiles) {
super(schema, deployLogger, rankProfileRegistry, queryProfiles);
}
@@ -39,19 +41,29 @@ public class AddAttributeTransformToSummaryOfImportedFields extends Processor {
private void setTransform(ImmutableSDField field) {
if (field instanceof ImmutableImportedComplexSDField) {
- getSummaryFieldsForImportedField(field).forEach(AddAttributeTransformToSummaryOfImportedFields::setAttributeCombinerTransform);
+ getSummaryFieldsForImportedField(field).forEach(summaryField -> setAttributeCombinerTransform(field, summaryField));
} else {
- getSummaryFieldsForImportedField(field).forEach(AddAttributeTransformToSummaryOfImportedFields::setAttributeTransform);
+ getSummaryFieldsForImportedField(field).forEach(summaryField -> setAttributeTransform(field, summaryField));
}
}
- private static void setAttributeTransform(SummaryField summaryField) {
+ private static void setAttributeTransform(ImmutableSDField field, SummaryField summaryField) {
+ if (summaryField.hasUnresolvedType()) {
+ if (field.getDataType().equals(DataType.LONG) && summaryField.getTransform().equals(SummaryTransform.GEOPOS)) {
+ summaryField.setResolvedDataType(PositionDataType.INSTANCE);
+ } else {
+ summaryField.setResolvedDataType(field.getDataType());
+ }
+ }
if (summaryField.getTransform() == SummaryTransform.NONE) {
summaryField.setTransform(SummaryTransform.ATTRIBUTE);
}
}
- private static void setAttributeCombinerTransform(SummaryField summaryField) {
+ private static void setAttributeCombinerTransform(ImmutableSDField field, SummaryField summaryField) {
+ if (summaryField.hasUnresolvedType()) {
+ summaryField.setResolvedDataType(field.getDataType());
+ }
if (summaryField.getTransform() == SummaryTransform.MATCHED_ATTRIBUTE_ELEMENTS_FILTER) {
// This field already has the correct transform.
return;
diff --git a/config-model/src/main/java/com/yahoo/schema/processing/AddExtraFieldsToDocument.java b/config-model/src/main/java/com/yahoo/schema/processing/AddExtraFieldsToDocument.java
index 77a17878840..1dd6ead00a4 100644
--- a/config-model/src/main/java/com/yahoo/schema/processing/AddExtraFieldsToDocument.java
+++ b/config-model/src/main/java/com/yahoo/schema/processing/AddExtraFieldsToDocument.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema.processing;
import com.yahoo.config.application.api.DeployLogger;
diff --git a/config-model/src/main/java/com/yahoo/schema/processing/AdjustPositionSummaryFields.java b/config-model/src/main/java/com/yahoo/schema/processing/AdjustPositionSummaryFields.java
index fa663fbec96..df07e938c2f 100644
--- a/config-model/src/main/java/com/yahoo/schema/processing/AdjustPositionSummaryFields.java
+++ b/config-model/src/main/java/com/yahoo/schema/processing/AdjustPositionSummaryFields.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema.processing;
import com.yahoo.config.application.api.DeployLogger;
diff --git a/config-model/src/main/java/com/yahoo/schema/processing/AttributeProperties.java b/config-model/src/main/java/com/yahoo/schema/processing/AttributeProperties.java
index 6c7dbaecbfb..5868c9066ea 100644
--- a/config-model/src/main/java/com/yahoo/schema/processing/AttributeProperties.java
+++ b/config-model/src/main/java/com/yahoo/schema/processing/AttributeProperties.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema.processing;
import com.yahoo.config.application.api.DeployLogger;
diff --git a/config-model/src/main/java/com/yahoo/schema/processing/AttributesImplicitWord.java b/config-model/src/main/java/com/yahoo/schema/processing/AttributesImplicitWord.java
index f0b673920da..767593b82d0 100644
--- a/config-model/src/main/java/com/yahoo/schema/processing/AttributesImplicitWord.java
+++ b/config-model/src/main/java/com/yahoo/schema/processing/AttributesImplicitWord.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema.processing;
import com.yahoo.config.application.api.DeployLogger;
diff --git a/config-model/src/main/java/com/yahoo/schema/processing/Bolding.java b/config-model/src/main/java/com/yahoo/schema/processing/Bolding.java
index 73ad4225c88..428ff9ebc35 100644
--- a/config-model/src/main/java/com/yahoo/schema/processing/Bolding.java
+++ b/config-model/src/main/java/com/yahoo/schema/processing/Bolding.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema.processing;
import com.yahoo.config.application.api.DeployLogger;
diff --git a/config-model/src/main/java/com/yahoo/schema/processing/BuiltInFieldSets.java b/config-model/src/main/java/com/yahoo/schema/processing/BuiltInFieldSets.java
index 514cbf225fd..c7487f738f4 100644
--- a/config-model/src/main/java/com/yahoo/schema/processing/BuiltInFieldSets.java
+++ b/config-model/src/main/java/com/yahoo/schema/processing/BuiltInFieldSets.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema.processing;
import com.yahoo.config.application.api.DeployLogger;
diff --git a/config-model/src/main/java/com/yahoo/schema/processing/CreatePositionZCurve.java b/config-model/src/main/java/com/yahoo/schema/processing/CreatePositionZCurve.java
index 648ed085a54..7bd66ad8f0b 100644
--- a/config-model/src/main/java/com/yahoo/schema/processing/CreatePositionZCurve.java
+++ b/config-model/src/main/java/com/yahoo/schema/processing/CreatePositionZCurve.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema.processing;
import com.yahoo.config.application.api.DeployLogger;
diff --git a/config-model/src/main/java/com/yahoo/schema/processing/DictionaryProcessor.java b/config-model/src/main/java/com/yahoo/schema/processing/DictionaryProcessor.java
index 9c6c446b82d..c6cee651677 100644
--- a/config-model/src/main/java/com/yahoo/schema/processing/DictionaryProcessor.java
+++ b/config-model/src/main/java/com/yahoo/schema/processing/DictionaryProcessor.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema.processing;
import com.yahoo.config.application.api.DeployLogger;
diff --git a/config-model/src/main/java/com/yahoo/schema/processing/DisallowComplexMapAndWsetKeyTypes.java b/config-model/src/main/java/com/yahoo/schema/processing/DisallowComplexMapAndWsetKeyTypes.java
index a5b4ca9a71f..0cbbe80c50f 100644
--- a/config-model/src/main/java/com/yahoo/schema/processing/DisallowComplexMapAndWsetKeyTypes.java
+++ b/config-model/src/main/java/com/yahoo/schema/processing/DisallowComplexMapAndWsetKeyTypes.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema.processing;
import com.yahoo.config.application.api.DeployLogger;
diff --git a/config-model/src/main/java/com/yahoo/schema/processing/DiversitySettingsValidator.java b/config-model/src/main/java/com/yahoo/schema/processing/DiversitySettingsValidator.java
index 0400292c7e5..5c06ce25184 100644
--- a/config-model/src/main/java/com/yahoo/schema/processing/DiversitySettingsValidator.java
+++ b/config-model/src/main/java/com/yahoo/schema/processing/DiversitySettingsValidator.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema.processing;
import com.yahoo.config.application.api.DeployLogger;
diff --git a/config-model/src/main/java/com/yahoo/schema/processing/DynamicSummaryTransformUtils.java b/config-model/src/main/java/com/yahoo/schema/processing/DynamicSummaryTransformUtils.java
index 50739ad3883..f6c78239fa1 100644
--- a/config-model/src/main/java/com/yahoo/schema/processing/DynamicSummaryTransformUtils.java
+++ b/config-model/src/main/java/com/yahoo/schema/processing/DynamicSummaryTransformUtils.java
@@ -1,3 +1,4 @@
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema.processing;
import com.yahoo.document.DataType;
diff --git a/config-model/src/main/java/com/yahoo/schema/processing/ExactMatch.java b/config-model/src/main/java/com/yahoo/schema/processing/ExactMatch.java
index aa2d8293cac..a12183262c4 100644
--- a/config-model/src/main/java/com/yahoo/schema/processing/ExactMatch.java
+++ b/config-model/src/main/java/com/yahoo/schema/processing/ExactMatch.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema.processing;
import com.yahoo.config.application.api.DeployLogger;
diff --git a/config-model/src/main/java/com/yahoo/schema/processing/FastAccessValidator.java b/config-model/src/main/java/com/yahoo/schema/processing/FastAccessValidator.java
index 224000e6b64..4e1c15b8ff3 100644
--- a/config-model/src/main/java/com/yahoo/schema/processing/FastAccessValidator.java
+++ b/config-model/src/main/java/com/yahoo/schema/processing/FastAccessValidator.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema.processing;
import com.yahoo.config.application.api.DeployLogger;
diff --git a/config-model/src/main/java/com/yahoo/schema/processing/FieldSetSettings.java b/config-model/src/main/java/com/yahoo/schema/processing/FieldSetSettings.java
index f0c59ece1bf..66fe36a9af1 100644
--- a/config-model/src/main/java/com/yahoo/schema/processing/FieldSetSettings.java
+++ b/config-model/src/main/java/com/yahoo/schema/processing/FieldSetSettings.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema.processing;
import com.yahoo.config.application.api.DeployLogger;
diff --git a/config-model/src/main/java/com/yahoo/schema/processing/FilterFieldNames.java b/config-model/src/main/java/com/yahoo/schema/processing/FilterFieldNames.java
index 28973c82d42..7346608d0e7 100644
--- a/config-model/src/main/java/com/yahoo/schema/processing/FilterFieldNames.java
+++ b/config-model/src/main/java/com/yahoo/schema/processing/FilterFieldNames.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema.processing;
import com.yahoo.config.application.api.DeployLogger;
diff --git a/config-model/src/main/java/com/yahoo/schema/processing/ImplicitSummaries.java b/config-model/src/main/java/com/yahoo/schema/processing/ImplicitSummaries.java
index 16a37610416..82bf95eb5eb 100644
--- a/config-model/src/main/java/com/yahoo/schema/processing/ImplicitSummaries.java
+++ b/config-model/src/main/java/com/yahoo/schema/processing/ImplicitSummaries.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema.processing;
import com.yahoo.config.application.api.DeployLogger;
diff --git a/config-model/src/main/java/com/yahoo/schema/processing/ImplicitSummaryFields.java b/config-model/src/main/java/com/yahoo/schema/processing/ImplicitSummaryFields.java
index b17efbfe8e8..d9b4718e81a 100644
--- a/config-model/src/main/java/com/yahoo/schema/processing/ImplicitSummaryFields.java
+++ b/config-model/src/main/java/com/yahoo/schema/processing/ImplicitSummaryFields.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema.processing;
import com.yahoo.config.application.api.DeployLogger;
@@ -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.inherited().isPresent()) continue; // Implicit fields are added to inheriting summaries through their parent
+ if ( ! docsum.inherited().isEmpty()) 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/schema/processing/ImportedFieldsResolver.java b/config-model/src/main/java/com/yahoo/schema/processing/ImportedFieldsResolver.java
index ee465be44f2..8bbb2dfcc11 100644
--- a/config-model/src/main/java/com/yahoo/schema/processing/ImportedFieldsResolver.java
+++ b/config-model/src/main/java/com/yahoo/schema/processing/ImportedFieldsResolver.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema.processing;
import com.yahoo.config.application.api.DeployLogger;
diff --git a/config-model/src/main/java/com/yahoo/schema/processing/IndexFieldNames.java b/config-model/src/main/java/com/yahoo/schema/processing/IndexFieldNames.java
index 7ec1a11fb22..c920f3aae0c 100644
--- a/config-model/src/main/java/com/yahoo/schema/processing/IndexFieldNames.java
+++ b/config-model/src/main/java/com/yahoo/schema/processing/IndexFieldNames.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema.processing;
import com.yahoo.config.application.api.DeployLogger;
diff --git a/config-model/src/main/java/com/yahoo/schema/processing/IndexingInputs.java b/config-model/src/main/java/com/yahoo/schema/processing/IndexingInputs.java
index 0537f1704ab..53ebd136e08 100644
--- a/config-model/src/main/java/com/yahoo/schema/processing/IndexingInputs.java
+++ b/config-model/src/main/java/com/yahoo/schema/processing/IndexingInputs.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema.processing;
import com.yahoo.config.application.api.DeployLogger;
diff --git a/config-model/src/main/java/com/yahoo/schema/processing/IndexingOutputs.java b/config-model/src/main/java/com/yahoo/schema/processing/IndexingOutputs.java
index 2c24d3e53e1..e4116c3f9d5 100644
--- a/config-model/src/main/java/com/yahoo/schema/processing/IndexingOutputs.java
+++ b/config-model/src/main/java/com/yahoo/schema/processing/IndexingOutputs.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema.processing;
import com.yahoo.config.application.api.DeployLogger;
@@ -78,7 +78,8 @@ public class IndexingOutputs extends Processor {
return;
}
dynamicSummary.add(summaryName);
- } else if (summaryTransform != SummaryTransform.ATTRIBUTE) {
+ } else if (summaryTransform != SummaryTransform.ATTRIBUTE &&
+ summaryTransform != SummaryTransform.TOKENS) {
staticSummary.add(summaryName);
}
}
diff --git a/config-model/src/main/java/com/yahoo/schema/processing/IndexingValidation.java b/config-model/src/main/java/com/yahoo/schema/processing/IndexingValidation.java
index e17b1e46a6e..9a98958fca9 100644
--- a/config-model/src/main/java/com/yahoo/schema/processing/IndexingValidation.java
+++ b/config-model/src/main/java/com/yahoo/schema/processing/IndexingValidation.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema.processing;
import com.yahoo.config.application.api.DeployLogger;
diff --git a/config-model/src/main/java/com/yahoo/schema/processing/IndexingValues.java b/config-model/src/main/java/com/yahoo/schema/processing/IndexingValues.java
index fa4b7d2bc40..cac31bea743 100644
--- a/config-model/src/main/java/com/yahoo/schema/processing/IndexingValues.java
+++ b/config-model/src/main/java/com/yahoo/schema/processing/IndexingValues.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema.processing;
import com.yahoo.config.application.api.DeployLogger;
diff --git a/config-model/src/main/java/com/yahoo/schema/processing/IntegerIndex2Attribute.java b/config-model/src/main/java/com/yahoo/schema/processing/IntegerIndex2Attribute.java
index 1d8480a8e99..0d296783cfb 100644
--- a/config-model/src/main/java/com/yahoo/schema/processing/IntegerIndex2Attribute.java
+++ b/config-model/src/main/java/com/yahoo/schema/processing/IntegerIndex2Attribute.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema.processing;
import com.yahoo.config.application.api.DeployLogger;
diff --git a/config-model/src/main/java/com/yahoo/schema/processing/LiteralBoost.java b/config-model/src/main/java/com/yahoo/schema/processing/LiteralBoost.java
index a84f895100a..076711b42cd 100644
--- a/config-model/src/main/java/com/yahoo/schema/processing/LiteralBoost.java
+++ b/config-model/src/main/java/com/yahoo/schema/processing/LiteralBoost.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema.processing;
import com.yahoo.config.application.api.DeployLogger;
diff --git a/config-model/src/main/java/com/yahoo/schema/processing/MakeAliases.java b/config-model/src/main/java/com/yahoo/schema/processing/MakeAliases.java
index 7093242d0ac..98343e24a60 100644
--- a/config-model/src/main/java/com/yahoo/schema/processing/MakeAliases.java
+++ b/config-model/src/main/java/com/yahoo/schema/processing/MakeAliases.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema.processing;
import com.yahoo.config.application.api.DeployLogger;
diff --git a/config-model/src/main/java/com/yahoo/schema/processing/MakeDefaultSummaryTheSuperSet.java b/config-model/src/main/java/com/yahoo/schema/processing/MakeDefaultSummaryTheSuperSet.java
index ea24bf0569d..420df3ee575 100644
--- a/config-model/src/main/java/com/yahoo/schema/processing/MakeDefaultSummaryTheSuperSet.java
+++ b/config-model/src/main/java/com/yahoo/schema/processing/MakeDefaultSummaryTheSuperSet.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema.processing;
import com.yahoo.config.application.api.DeployLogger;
@@ -41,6 +41,7 @@ public class MakeDefaultSummaryTheSuperSet extends Processor {
if (summaryField.getTransform() == SummaryTransform.ATTRIBUTE) continue;
if (summaryField.getTransform() == SummaryTransform.ATTRIBUTECOMBINER) continue;
if (summaryField.getTransform() == SummaryTransform.MATCHED_ATTRIBUTE_ELEMENTS_FILTER) continue;
+ if (summaryField.getTransform() == SummaryTransform.TOKENS) continue;
defaultSummary.add(summaryField.clone());
}
diff --git a/config-model/src/main/java/com/yahoo/schema/processing/MatchConsistency.java b/config-model/src/main/java/com/yahoo/schema/processing/MatchConsistency.java
index 5fb59e53ba9..d7d78198885 100644
--- a/config-model/src/main/java/com/yahoo/schema/processing/MatchConsistency.java
+++ b/config-model/src/main/java/com/yahoo/schema/processing/MatchConsistency.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema.processing;
import com.yahoo.config.application.api.DeployLogger;
diff --git a/config-model/src/main/java/com/yahoo/schema/processing/MatchPhaseSettingsValidator.java b/config-model/src/main/java/com/yahoo/schema/processing/MatchPhaseSettingsValidator.java
index 7c1c255097f..f3a8f7cee18 100644
--- a/config-model/src/main/java/com/yahoo/schema/processing/MatchPhaseSettingsValidator.java
+++ b/config-model/src/main/java/com/yahoo/schema/processing/MatchPhaseSettingsValidator.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema.processing;
import com.yahoo.config.application.api.DeployLogger;
diff --git a/config-model/src/main/java/com/yahoo/schema/processing/MatchedElementsOnlyResolver.java b/config-model/src/main/java/com/yahoo/schema/processing/MatchedElementsOnlyResolver.java
index ed95f87d7d6..d2ef467438f 100644
--- a/config-model/src/main/java/com/yahoo/schema/processing/MatchedElementsOnlyResolver.java
+++ b/config-model/src/main/java/com/yahoo/schema/processing/MatchedElementsOnlyResolver.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema.processing;
import com.yahoo.config.application.api.DeployLogger;
diff --git a/config-model/src/main/java/com/yahoo/schema/processing/MultifieldIndexHarmonizer.java b/config-model/src/main/java/com/yahoo/schema/processing/MultifieldIndexHarmonizer.java
index 3a889085871..108db405a53 100644
--- a/config-model/src/main/java/com/yahoo/schema/processing/MultifieldIndexHarmonizer.java
+++ b/config-model/src/main/java/com/yahoo/schema/processing/MultifieldIndexHarmonizer.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema.processing;
import com.yahoo.config.application.api.DeployLogger;
diff --git a/config-model/src/main/java/com/yahoo/schema/processing/MutableAttributes.java b/config-model/src/main/java/com/yahoo/schema/processing/MutableAttributes.java
index 854f6b2dddb..a7215dca5c1 100644
--- a/config-model/src/main/java/com/yahoo/schema/processing/MutableAttributes.java
+++ b/config-model/src/main/java/com/yahoo/schema/processing/MutableAttributes.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema.processing;
import com.yahoo.config.application.api.DeployLogger;
diff --git a/config-model/src/main/java/com/yahoo/schema/processing/NGramMatch.java b/config-model/src/main/java/com/yahoo/schema/processing/NGramMatch.java
index 6ec5428156f..2ec5c03e04c 100644
--- a/config-model/src/main/java/com/yahoo/schema/processing/NGramMatch.java
+++ b/config-model/src/main/java/com/yahoo/schema/processing/NGramMatch.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema.processing;
import com.yahoo.config.application.api.DeployLogger;
diff --git a/config-model/src/main/java/com/yahoo/schema/processing/OnnxModelConfigGenerator.java b/config-model/src/main/java/com/yahoo/schema/processing/OnnxModelConfigGenerator.java
index 338977fa679..b7ff2f9a127 100644
--- a/config-model/src/main/java/com/yahoo/schema/processing/OnnxModelConfigGenerator.java
+++ b/config-model/src/main/java/com/yahoo/schema/processing/OnnxModelConfigGenerator.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema.processing;
diff --git a/config-model/src/main/java/com/yahoo/schema/processing/OnnxModelTypeResolver.java b/config-model/src/main/java/com/yahoo/schema/processing/OnnxModelTypeResolver.java
index 32229ea635b..82e01414cb0 100644
--- a/config-model/src/main/java/com/yahoo/schema/processing/OnnxModelTypeResolver.java
+++ b/config-model/src/main/java/com/yahoo/schema/processing/OnnxModelTypeResolver.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema.processing;
diff --git a/config-model/src/main/java/com/yahoo/schema/processing/OptimizeIlscript.java b/config-model/src/main/java/com/yahoo/schema/processing/OptimizeIlscript.java
index a3b026fb724..b268a7a9c03 100644
--- a/config-model/src/main/java/com/yahoo/schema/processing/OptimizeIlscript.java
+++ b/config-model/src/main/java/com/yahoo/schema/processing/OptimizeIlscript.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema.processing;
import com.yahoo.config.application.api.DeployLogger;
diff --git a/config-model/src/main/java/com/yahoo/schema/processing/PagedAttributeValidator.java b/config-model/src/main/java/com/yahoo/schema/processing/PagedAttributeValidator.java
index 6f470cfdc56..4feb065a90b 100644
--- a/config-model/src/main/java/com/yahoo/schema/processing/PagedAttributeValidator.java
+++ b/config-model/src/main/java/com/yahoo/schema/processing/PagedAttributeValidator.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema.processing;
import com.yahoo.config.application.api.DeployLogger;
diff --git a/config-model/src/main/java/com/yahoo/schema/processing/PredicateProcessor.java b/config-model/src/main/java/com/yahoo/schema/processing/PredicateProcessor.java
index 1627320dc54..7e9d79fc858 100644
--- a/config-model/src/main/java/com/yahoo/schema/processing/PredicateProcessor.java
+++ b/config-model/src/main/java/com/yahoo/schema/processing/PredicateProcessor.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema.processing;
import com.yahoo.config.application.api.DeployLogger;
diff --git a/config-model/src/main/java/com/yahoo/schema/processing/Processing.java b/config-model/src/main/java/com/yahoo/schema/processing/Processing.java
index df4b0d0d941..d9b90ad661d 100644
--- a/config-model/src/main/java/com/yahoo/schema/processing/Processing.java
+++ b/config-model/src/main/java/com/yahoo/schema/processing/Processing.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema.processing;
import com.yahoo.config.application.api.DeployLogger;
@@ -49,6 +49,7 @@ public class Processing {
DictionaryProcessor::new,
WordMatch::new,
ImportedFieldsResolver::new,
+ AddDataTypeAndTransformToSummaryOfImportedFields::new,
ImplicitSummaries::new,
ImplicitSummaryFields::new,
AdjustPositionSummaryFields::new,
@@ -57,7 +58,6 @@ public class Processing {
SummaryNamesFieldCollisions::new,
SummaryFieldsMustHaveValidSource::new,
MatchedElementsOnlyResolver::new,
- AddAttributeTransformToSummaryOfImportedFields::new,
MakeDefaultSummaryTheSuperSet::new,
Bolding::new,
AttributeProperties::new,
diff --git a/config-model/src/main/java/com/yahoo/schema/processing/Processor.java b/config-model/src/main/java/com/yahoo/schema/processing/Processor.java
index 9768f33c27d..beaff13c613 100644
--- a/config-model/src/main/java/com/yahoo/schema/processing/Processor.java
+++ b/config-model/src/main/java/com/yahoo/schema/processing/Processor.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema.processing;
import com.yahoo.config.application.api.DeployLogger;
diff --git a/config-model/src/main/java/com/yahoo/schema/processing/RankingExpressionTypeResolver.java b/config-model/src/main/java/com/yahoo/schema/processing/RankingExpressionTypeResolver.java
index 88b304e31c4..eae327729f3 100644
--- a/config-model/src/main/java/com/yahoo/schema/processing/RankingExpressionTypeResolver.java
+++ b/config-model/src/main/java/com/yahoo/schema/processing/RankingExpressionTypeResolver.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema.processing;
import com.yahoo.config.application.api.DeployLogger;
diff --git a/config-model/src/main/java/com/yahoo/schema/processing/ReferenceFieldsProcessor.java b/config-model/src/main/java/com/yahoo/schema/processing/ReferenceFieldsProcessor.java
index 67c07aaeaf4..e425f81c0b4 100644
--- a/config-model/src/main/java/com/yahoo/schema/processing/ReferenceFieldsProcessor.java
+++ b/config-model/src/main/java/com/yahoo/schema/processing/ReferenceFieldsProcessor.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema.processing;
import com.yahoo.config.application.api.DeployLogger;
diff --git a/config-model/src/main/java/com/yahoo/schema/processing/ReservedDocumentNames.java b/config-model/src/main/java/com/yahoo/schema/processing/ReservedDocumentNames.java
index 7eaf690d899..6e90b95a441 100644
--- a/config-model/src/main/java/com/yahoo/schema/processing/ReservedDocumentNames.java
+++ b/config-model/src/main/java/com/yahoo/schema/processing/ReservedDocumentNames.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema.processing;
import com.yahoo.config.application.api.DeployLogger;
diff --git a/config-model/src/main/java/com/yahoo/schema/processing/ReservedFunctionNames.java b/config-model/src/main/java/com/yahoo/schema/processing/ReservedFunctionNames.java
index e1054c365b0..f4d2faf9444 100644
--- a/config-model/src/main/java/com/yahoo/schema/processing/ReservedFunctionNames.java
+++ b/config-model/src/main/java/com/yahoo/schema/processing/ReservedFunctionNames.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema.processing;
import com.yahoo.config.application.api.DeployLogger;
diff --git a/config-model/src/main/java/com/yahoo/schema/processing/SearchMustHaveDocument.java b/config-model/src/main/java/com/yahoo/schema/processing/SearchMustHaveDocument.java
index b90a5fdec98..eb140f333f3 100644
--- a/config-model/src/main/java/com/yahoo/schema/processing/SearchMustHaveDocument.java
+++ b/config-model/src/main/java/com/yahoo/schema/processing/SearchMustHaveDocument.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema.processing;
import com.yahoo.config.application.api.DeployLogger;
diff --git a/config-model/src/main/java/com/yahoo/schema/processing/SetRankTypeEmptyOnFilters.java b/config-model/src/main/java/com/yahoo/schema/processing/SetRankTypeEmptyOnFilters.java
index f84d6f19145..258625aeda5 100644
--- a/config-model/src/main/java/com/yahoo/schema/processing/SetRankTypeEmptyOnFilters.java
+++ b/config-model/src/main/java/com/yahoo/schema/processing/SetRankTypeEmptyOnFilters.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema.processing;
import com.yahoo.config.application.api.DeployLogger;
diff --git a/config-model/src/main/java/com/yahoo/schema/processing/SingleValueOnlyAttributeValidator.java b/config-model/src/main/java/com/yahoo/schema/processing/SingleValueOnlyAttributeValidator.java
index b2786e6c785..9ac99de6ffb 100644
--- a/config-model/src/main/java/com/yahoo/schema/processing/SingleValueOnlyAttributeValidator.java
+++ b/config-model/src/main/java/com/yahoo/schema/processing/SingleValueOnlyAttributeValidator.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema.processing;
import com.yahoo.config.application.api.DeployLogger;
diff --git a/config-model/src/main/java/com/yahoo/schema/processing/SortingSettings.java b/config-model/src/main/java/com/yahoo/schema/processing/SortingSettings.java
index e0dfbab9780..1be22d38444 100644
--- a/config-model/src/main/java/com/yahoo/schema/processing/SortingSettings.java
+++ b/config-model/src/main/java/com/yahoo/schema/processing/SortingSettings.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema.processing;
import com.yahoo.config.application.api.DeployLogger;
diff --git a/config-model/src/main/java/com/yahoo/schema/processing/StringSettingsOnNonStringFields.java b/config-model/src/main/java/com/yahoo/schema/processing/StringSettingsOnNonStringFields.java
index 8ca0b595907..bf07c1b95fc 100644
--- a/config-model/src/main/java/com/yahoo/schema/processing/StringSettingsOnNonStringFields.java
+++ b/config-model/src/main/java/com/yahoo/schema/processing/StringSettingsOnNonStringFields.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema.processing;
import com.yahoo.config.application.api.DeployLogger;
diff --git a/config-model/src/main/java/com/yahoo/schema/processing/SummaryConsistency.java b/config-model/src/main/java/com/yahoo/schema/processing/SummaryConsistency.java
index 4aa8f6f0e37..a7ff50ffcca 100644
--- a/config-model/src/main/java/com/yahoo/schema/processing/SummaryConsistency.java
+++ b/config-model/src/main/java/com/yahoo/schema/processing/SummaryConsistency.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema.processing;
import com.yahoo.config.application.api.DeployLogger;
diff --git a/config-model/src/main/java/com/yahoo/schema/processing/SummaryDiskAccessValidator.java b/config-model/src/main/java/com/yahoo/schema/processing/SummaryDiskAccessValidator.java
index 2294e8f3e09..70e2bd038b8 100644
--- a/config-model/src/main/java/com/yahoo/schema/processing/SummaryDiskAccessValidator.java
+++ b/config-model/src/main/java/com/yahoo/schema/processing/SummaryDiskAccessValidator.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema.processing;
import com.yahoo.config.application.api.DeployLogger;
diff --git a/config-model/src/main/java/com/yahoo/schema/processing/SummaryDynamicStructsArrays.java b/config-model/src/main/java/com/yahoo/schema/processing/SummaryDynamicStructsArrays.java
index a899f5e82ab..33cb3db6112 100644
--- a/config-model/src/main/java/com/yahoo/schema/processing/SummaryDynamicStructsArrays.java
+++ b/config-model/src/main/java/com/yahoo/schema/processing/SummaryDynamicStructsArrays.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema.processing;
diff --git a/config-model/src/main/java/com/yahoo/schema/processing/SummaryFieldsMustHaveValidSource.java b/config-model/src/main/java/com/yahoo/schema/processing/SummaryFieldsMustHaveValidSource.java
index c8f201e2915..ac9dbf73e4f 100644
--- a/config-model/src/main/java/com/yahoo/schema/processing/SummaryFieldsMustHaveValidSource.java
+++ b/config-model/src/main/java/com/yahoo/schema/processing/SummaryFieldsMustHaveValidSource.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema.processing;
import com.yahoo.config.application.api.DeployLogger;
diff --git a/config-model/src/main/java/com/yahoo/schema/processing/SummaryNamesFieldCollisions.java b/config-model/src/main/java/com/yahoo/schema/processing/SummaryNamesFieldCollisions.java
index d3f73011d14..d98f7e84b26 100644
--- a/config-model/src/main/java/com/yahoo/schema/processing/SummaryNamesFieldCollisions.java
+++ b/config-model/src/main/java/com/yahoo/schema/processing/SummaryNamesFieldCollisions.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema.processing;
import java.util.HashMap;
diff --git a/config-model/src/main/java/com/yahoo/schema/processing/SummaryTransformForDocumentId.java b/config-model/src/main/java/com/yahoo/schema/processing/SummaryTransformForDocumentId.java
index 99419ecd526..388aa93e81c 100644
--- a/config-model/src/main/java/com/yahoo/schema/processing/SummaryTransformForDocumentId.java
+++ b/config-model/src/main/java/com/yahoo/schema/processing/SummaryTransformForDocumentId.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema.processing;
import com.yahoo.config.application.api.DeployLogger;
diff --git a/config-model/src/main/java/com/yahoo/schema/processing/TagType.java b/config-model/src/main/java/com/yahoo/schema/processing/TagType.java
index 112d3c4cad0..2843647fd3b 100644
--- a/config-model/src/main/java/com/yahoo/schema/processing/TagType.java
+++ b/config-model/src/main/java/com/yahoo/schema/processing/TagType.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema.processing;
import com.yahoo.config.application.api.DeployLogger;
diff --git a/config-model/src/main/java/com/yahoo/schema/processing/TensorFieldProcessor.java b/config-model/src/main/java/com/yahoo/schema/processing/TensorFieldProcessor.java
index 227054d9800..50c37cf6a32 100644
--- a/config-model/src/main/java/com/yahoo/schema/processing/TensorFieldProcessor.java
+++ b/config-model/src/main/java/com/yahoo/schema/processing/TensorFieldProcessor.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema.processing;
import com.yahoo.config.application.api.DeployLogger;
diff --git a/config-model/src/main/java/com/yahoo/schema/processing/TextMatch.java b/config-model/src/main/java/com/yahoo/schema/processing/TextMatch.java
index 1783a3c7c63..7dd968c5454 100644
--- a/config-model/src/main/java/com/yahoo/schema/processing/TextMatch.java
+++ b/config-model/src/main/java/com/yahoo/schema/processing/TextMatch.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema.processing;
import com.yahoo.config.application.api.DeployLogger;
diff --git a/config-model/src/main/java/com/yahoo/schema/processing/TypedTransformProvider.java b/config-model/src/main/java/com/yahoo/schema/processing/TypedTransformProvider.java
index 1836cd631ad..63eee474095 100644
--- a/config-model/src/main/java/com/yahoo/schema/processing/TypedTransformProvider.java
+++ b/config-model/src/main/java/com/yahoo/schema/processing/TypedTransformProvider.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema.processing;
import com.yahoo.document.DataType;
diff --git a/config-model/src/main/java/com/yahoo/schema/processing/UriHack.java b/config-model/src/main/java/com/yahoo/schema/processing/UriHack.java
index a4773a42ed6..e4e2ac9f5be 100644
--- a/config-model/src/main/java/com/yahoo/schema/processing/UriHack.java
+++ b/config-model/src/main/java/com/yahoo/schema/processing/UriHack.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema.processing;
import com.yahoo.config.application.api.DeployLogger;
diff --git a/config-model/src/main/java/com/yahoo/schema/processing/UrlFieldValidator.java b/config-model/src/main/java/com/yahoo/schema/processing/UrlFieldValidator.java
index 63d4a342c72..c7cc1a9b469 100644
--- a/config-model/src/main/java/com/yahoo/schema/processing/UrlFieldValidator.java
+++ b/config-model/src/main/java/com/yahoo/schema/processing/UrlFieldValidator.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema.processing;
import com.yahoo.config.application.api.DeployLogger;
diff --git a/config-model/src/main/java/com/yahoo/schema/processing/ValidateFieldTypes.java b/config-model/src/main/java/com/yahoo/schema/processing/ValidateFieldTypes.java
index 2327cf4d9c9..662f3fc970b 100644
--- a/config-model/src/main/java/com/yahoo/schema/processing/ValidateFieldTypes.java
+++ b/config-model/src/main/java/com/yahoo/schema/processing/ValidateFieldTypes.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema.processing;
import com.yahoo.config.application.api.DeployLogger;
@@ -49,7 +49,9 @@ 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().values()) {
- checkFieldType(searchName, "summary field", field.getName(), field.getDataType(), seenFields);
+ if (!field.hasUnresolvedType()) {
+ checkFieldType(searchName, "summary field", field.getName(), field.getDataType(), seenFields);
+ }
}
}
}
diff --git a/config-model/src/main/java/com/yahoo/schema/processing/ValidateFieldTypesDocumentsOnly.java b/config-model/src/main/java/com/yahoo/schema/processing/ValidateFieldTypesDocumentsOnly.java
index 08771b40fe9..55a8b6e7bff 100644
--- a/config-model/src/main/java/com/yahoo/schema/processing/ValidateFieldTypesDocumentsOnly.java
+++ b/config-model/src/main/java/com/yahoo/schema/processing/ValidateFieldTypesDocumentsOnly.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema.processing;
import com.yahoo.config.application.api.DeployLogger;
diff --git a/config-model/src/main/java/com/yahoo/schema/processing/ValidateFieldWithIndexSettingsCreatesIndex.java b/config-model/src/main/java/com/yahoo/schema/processing/ValidateFieldWithIndexSettingsCreatesIndex.java
index 5423defa74a..6f1bf49bea9 100644
--- a/config-model/src/main/java/com/yahoo/schema/processing/ValidateFieldWithIndexSettingsCreatesIndex.java
+++ b/config-model/src/main/java/com/yahoo/schema/processing/ValidateFieldWithIndexSettingsCreatesIndex.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema.processing;
import com.yahoo.config.application.api.DeployLogger;
diff --git a/config-model/src/main/java/com/yahoo/schema/processing/ValidateStructTypeInheritance.java b/config-model/src/main/java/com/yahoo/schema/processing/ValidateStructTypeInheritance.java
index cad555a24b1..9bf0c534f19 100644
--- a/config-model/src/main/java/com/yahoo/schema/processing/ValidateStructTypeInheritance.java
+++ b/config-model/src/main/java/com/yahoo/schema/processing/ValidateStructTypeInheritance.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema.processing;
import com.yahoo.schema.Schema;
diff --git a/config-model/src/main/java/com/yahoo/schema/processing/WordMatch.java b/config-model/src/main/java/com/yahoo/schema/processing/WordMatch.java
index 1e312b71afd..b2fa7c35719 100644
--- a/config-model/src/main/java/com/yahoo/schema/processing/WordMatch.java
+++ b/config-model/src/main/java/com/yahoo/schema/processing/WordMatch.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema.processing;
import com.yahoo.config.application.api.DeployLogger;
diff --git a/config-model/src/main/java/com/yahoo/schema/processing/multifieldresolver/IndexCommandResolver.java b/config-model/src/main/java/com/yahoo/schema/processing/multifieldresolver/IndexCommandResolver.java
index 565a377f2a9..111f5384c41 100644
--- a/config-model/src/main/java/com/yahoo/schema/processing/multifieldresolver/IndexCommandResolver.java
+++ b/config-model/src/main/java/com/yahoo/schema/processing/multifieldresolver/IndexCommandResolver.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema.processing.multifieldresolver;
import com.yahoo.config.application.api.DeployLogger;
diff --git a/config-model/src/main/java/com/yahoo/schema/processing/multifieldresolver/MultiFieldResolver.java b/config-model/src/main/java/com/yahoo/schema/processing/multifieldresolver/MultiFieldResolver.java
index ed8ad61706b..8b235121b36 100644
--- a/config-model/src/main/java/com/yahoo/schema/processing/multifieldresolver/MultiFieldResolver.java
+++ b/config-model/src/main/java/com/yahoo/schema/processing/multifieldresolver/MultiFieldResolver.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema.processing.multifieldresolver;
import com.yahoo.config.application.api.DeployLogger;
diff --git a/config-model/src/main/java/com/yahoo/schema/processing/multifieldresolver/RankProfileTypeSettingsProcessor.java b/config-model/src/main/java/com/yahoo/schema/processing/multifieldresolver/RankProfileTypeSettingsProcessor.java
index 3d79ac7d68a..2c6bb955695 100644
--- a/config-model/src/main/java/com/yahoo/schema/processing/multifieldresolver/RankProfileTypeSettingsProcessor.java
+++ b/config-model/src/main/java/com/yahoo/schema/processing/multifieldresolver/RankProfileTypeSettingsProcessor.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema.processing.multifieldresolver;
import com.yahoo.config.application.api.DeployLogger;
diff --git a/config-model/src/main/java/com/yahoo/schema/processing/multifieldresolver/RankTypeResolver.java b/config-model/src/main/java/com/yahoo/schema/processing/multifieldresolver/RankTypeResolver.java
index e86ac6dabfc..1b614b02ccd 100644
--- a/config-model/src/main/java/com/yahoo/schema/processing/multifieldresolver/RankTypeResolver.java
+++ b/config-model/src/main/java/com/yahoo/schema/processing/multifieldresolver/RankTypeResolver.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema.processing.multifieldresolver;
import com.yahoo.config.application.api.DeployLogger;
diff --git a/config-model/src/main/java/com/yahoo/schema/processing/multifieldresolver/StemmingResolver.java b/config-model/src/main/java/com/yahoo/schema/processing/multifieldresolver/StemmingResolver.java
index 95d9a50a6ab..54c9d55e004 100644
--- a/config-model/src/main/java/com/yahoo/schema/processing/multifieldresolver/StemmingResolver.java
+++ b/config-model/src/main/java/com/yahoo/schema/processing/multifieldresolver/StemmingResolver.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema.processing.multifieldresolver;
import com.yahoo.config.application.api.DeployLogger;
diff --git a/config-model/src/main/java/com/yahoo/schema/processing/package-info.java b/config-model/src/main/java/com/yahoo/schema/processing/package-info.java
index e81d50897ac..1864b2f80a0 100644
--- a/config-model/src/main/java/com/yahoo/schema/processing/package-info.java
+++ b/config-model/src/main/java/com/yahoo/schema/processing/package-info.java
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
/**
* Classes in this package (processors) implements some search
* definition features by reducing them to simpler features.