diff options
Diffstat (limited to 'config-model/src')
151 files changed, 903 insertions, 2908 deletions
diff --git a/config-model/src/main/.gitignore b/config-model/src/main/.gitignore new file mode 100644 index 00000000000..24600083db4 --- /dev/null +++ b/config-model/src/main/.gitignore @@ -0,0 +1 @@ +!Makefile diff --git a/config-model/src/main/Makefile b/config-model/src/main/Makefile index b1c37f4889f..f63f7dd832f 100644 --- a/config-model/src/main/Makefile +++ b/config-model/src/main/Makefile @@ -1,42 +1,46 @@ # Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -#all: services.xsd hosts.xsd + +srcdir=resources/schema +outputdir=../../target/generated-sources/trang/resources/schema trangjar=../../target/trang.jar -all: resources/schema/services.rng resources/schema/hosts.rng resources/schema/container-include.rng resources/schema/services.xsd resources/schema/hosts.xsd resources/schema/container-include.xsd resources/schema/deployment.xsd +all: ${outputdir} ${outputdir}/services.rng ${outputdir}/hosts.rng ${outputdir}/container-include.rng ${outputdir}/services.xsd ${outputdir}/hosts.xsd ${outputdir}/container-include.xsd ${outputdir}/deployment.xsd + +${outputdir}: + mkdir -p ${outputdir} -resources/schema/services.rng: resources/schema/services.rnc resources/schema/common.rnc resources/schema/admin.rnc resources/schema/clients.rnc resources/schema/docproc.rnc resources/schema/routing.rnc resources/schema/clients-v2.rnc resources/schema/content.rnc resources/schema/genericmodule.rnc resources/schema/legacygenericcluster.rnc resources/schema/genericcluster.rnc resources/schema/legacygenericmodule.rnc resources/schema/containercluster.rnc - java -jar $(trangjar) -I rnc -O rng resources/schema/services.rnc resources/schema/services.rng +${outputdir}/services.rng: ${srcdir}/services.rnc ${srcdir}/common.rnc ${srcdir}/admin.rnc ${srcdir}/clients.rnc ${srcdir}/docproc.rnc ${srcdir}/routing.rnc ${srcdir}/clients-v2.rnc ${srcdir}/content.rnc ${srcdir}/genericmodule.rnc ${srcdir}/legacygenericcluster.rnc ${srcdir}/genericcluster.rnc ${srcdir}/legacygenericmodule.rnc ${srcdir}/containercluster.rnc + java -jar $(trangjar) -I rnc -O rng ${srcdir}/services.rnc ${outputdir}/services.rng -resources/schema/services.xsd: resources/schema/services.rng - java -jar $(trangjar) -I rng -O xsd resources/schema/services.rng resources/schema/services.xsd +${outputdir}/services.xsd: ${outputdir}/services.rng + java -jar $(trangjar) -I rng -O xsd ${outputdir}/services.rng ${outputdir}/services.xsd -resources/schema/container-include.rng: resources/schema/common.rnc resources/schema/containercluster.rnc - java -jar $(trangjar) -I rnc -O rng resources/schema/container-include.rnc resources/schema/container-include.rng +${outputdir}/container-include.rng: ${srcdir}/common.rnc ${srcdir}/containercluster.rnc + java -jar $(trangjar) -I rnc -O rng ${srcdir}/container-include.rnc ${outputdir}/container-include.rng -resources/schema/container-include.xsd: resources/schema/container-include.rng - java -jar $(trangjar) -I rng -O xsd resources/schema/container-include.rng resources/schema/container-include.xsd +${outputdir}/container-include.xsd: ${outputdir}/container-include.rng + java -jar $(trangjar) -I rng -O xsd ${outputdir}/container-include.rng ${outputdir}/container-include.xsd -resources/schema/hosts.rng: resources/schema/hosts.rnc - java -jar $(trangjar) -I rnc -O rng resources/schema/hosts.rnc resources/schema/hosts.rng +${outputdir}/hosts.rng: ${srcdir}/hosts.rnc + java -jar $(trangjar) -I rnc -O rng ${srcdir}/hosts.rnc ${outputdir}/hosts.rng -resources/schema/hosts.xsd: resources/schema/hosts.rng - java -jar $(trangjar) -I rng -O xsd resources/schema/hosts.rng resources/schema/hosts.xsd +${outputdir}/hosts.xsd: ${outputdir}/hosts.rng + java -jar $(trangjar) -I rng -O xsd ${outputdir}/hosts.rng ${outputdir}/hosts.xsd -resources/schema/deployment.rng: resources/schema/deployment.rnc - java -jar $(trangjar) -I rnc -O rng resources/schema/deployment.rnc resources/schema/deployment.rng +${outputdir}/deployment.rng: ${srcdir}/deployment.rnc + java -jar $(trangjar) -I rnc -O rng ${srcdir}/deployment.rnc ${outputdir}/deployment.rng -resources/schema/deployment.xsd: resources/schema/deployment.rng - java -jar $(trangjar) -I rng -O xsd resources/schema/deployment.rng resources/schema/deployment.xsd +${outputdir}/deployment.xsd: ${outputdir}/deployment.rng + java -jar $(trangjar) -I rng -O xsd ${outputdir}/deployment.rng ${outputdir}/deployment.xsd -resources/schema/validation-overrides.rng: resources/schema/validation-overrides.rnc - java -jar $(trangjar) -I rnc -O rng resources/schema/validation-overrides.rnc resources/schema/validation-overrides.rng +${outputdir}/validation-overrides.rng: ${srcdir}/validation-overrides.rnc + java -jar $(trangjar) -I rnc -O rng ${srcdir}/validation-overrides.rnc ${outputdir}/validation-overrides.rng -resources/schema/deployment.xsd: resources/schema/validation-overrides.rng - java -jar $(trangjar) -I rng -O xsd resources/schema/validation-overrides.rng resources/schema/validation-overrides.xsd +${outputdir}/deployment.xsd: ${outputdir}/validation-overrides.rng + java -jar $(trangjar) -I rng -O xsd ${outputdir}/validation-overrides.rng ${outputdir}/validation-overrides.xsd clean: - rm -f resources/schema/*.rng - rm -f resources/schema/*.xsd + rm -rf ${outputdir} diff --git a/config-model/src/main/java/com/yahoo/config/model/ConfigModelRepo.java b/config-model/src/main/java/com/yahoo/config/model/ConfigModelRepo.java index 0b638c14485..93ff88f182b 100644 --- a/config-model/src/main/java/com/yahoo/config/model/ConfigModelRepo.java +++ b/config-model/src/main/java/com/yahoo/config/model/ConfigModelRepo.java @@ -125,8 +125,13 @@ public class ConfigModelRepo implements ConfigModelRepoAdder, Serializable, Iter for (Element servicesElement : children) { String tagName = servicesElement.getTagName(); - if (tagName.equals("config")) continue; // TODO: Remove on Vespa 6 - if (tagName.equals("cluster")) continue; // TODO: Remove on Vespa 6 + if (tagName.equals("config")) { + // TODO: disallow on Vespa 8 + continue; + } + if (tagName.equals("cluster")) { + throw new IllegalArgumentException("<" + tagName + "> on top-level is not allowed anymore"); + } if ((tagName.equals("clients")) && deployState.isHosted()) throw new IllegalArgumentException("<" + tagName + "> is not allowed when running Vespa in a hosted environment"); diff --git a/config-model/src/main/java/com/yahoo/searchdefinition/Index.java b/config-model/src/main/java/com/yahoo/searchdefinition/Index.java index 59f97a7e535..1620c90acd1 100644 --- a/config-model/src/main/java/com/yahoo/searchdefinition/Index.java +++ b/config-model/src/main/java/com/yahoo/searchdefinition/Index.java @@ -51,9 +51,6 @@ public class Index implements Cloneable, Serializable { /** Whether the content of this index is normalized */ private boolean normalized=true; - /** The set of all searchable fields which should be searched with this index. May not null */ - public Set<String> matchGroup=new LinkedHashSet<>(); - private Type type = Type.VESPA; /** The boolean index definition, if set */ @@ -82,22 +79,6 @@ public class Index implements Cloneable, Serializable { public Stemming getStemming() { return stemming; } /** - * Returns the (unmodifiable) set of searchable fields which should be searched - * when this index is searched. This is useful to specify that some attributes should be - * searched as well when an index is searched. - * This set is either empty, or if set contains both the name of this index, and some other - * indexes. - */ - public Set<String> getMatchGroup() { return Collections.unmodifiableSet(matchGroup); } - - /** Adds a searchable field name to be searched when this index is searched */ - public void addToMatchGroup(String name) { - if (name.equals(this.name)) return; - if (matchGroup.size()==0) matchGroup.add(this.name); - matchGroup.add(name); - } - - /** * Whether this field should be stemmed in this search definition, * this is never null */ diff --git a/config-model/src/main/java/com/yahoo/searchdefinition/Search.java b/config-model/src/main/java/com/yahoo/searchdefinition/Search.java index ba2421bf5bb..a99300cfd32 100644 --- a/config-model/src/main/java/com/yahoo/searchdefinition/Search.java +++ b/config-model/src/main/java/com/yahoo/searchdefinition/Search.java @@ -64,9 +64,8 @@ public class Search implements Serializable, ImmutableSearch { // True if this doesn't define a search, just some documents. private boolean documentsOnly = false; - // The stemming setting of this search definition. Default is SHORTEST. - // TODO: Change to Stemming.BEST on Vespa 7 - private Stemming stemming = Stemming.SHORTEST; + // The stemming setting of this search definition. Default is BEST. + private Stemming stemming = Stemming.BEST; // Documents contained in this definition. private SDDocumentType docType; diff --git a/config-model/src/main/java/com/yahoo/searchdefinition/SearchBuilder.java b/config-model/src/main/java/com/yahoo/searchdefinition/SearchBuilder.java index cf88886029f..bd4daa58253 100644 --- a/config-model/src/main/java/com/yahoo/searchdefinition/SearchBuilder.java +++ b/config-model/src/main/java/com/yahoo/searchdefinition/SearchBuilder.java @@ -319,9 +319,13 @@ public class SearchBuilder { * @throws ParseException Thrown if there was a problem parsing the string. */ public static SearchBuilder createFromString(String sd) throws ParseException { + return createFromString(sd, new BaseDeployLogger()); + } + + public static SearchBuilder createFromString(String sd, DeployLogger logger) throws ParseException { SearchBuilder builder = new SearchBuilder(MockApplicationPackage.createEmpty()); - builder.importString(sd); - builder.build(); + builder.importString(sd, logger); + builder.build(true, logger); return builder; } diff --git a/config-model/src/main/java/com/yahoo/searchdefinition/derived/IndexInfo.java b/config-model/src/main/java/com/yahoo/searchdefinition/derived/IndexInfo.java index 1e4a4a2a5d2..a807cc79d95 100644 --- a/config-model/src/main/java/com/yahoo/searchdefinition/derived/IndexInfo.java +++ b/config-model/src/main/java/com/yahoo/searchdefinition/derived/IndexInfo.java @@ -27,7 +27,6 @@ public class IndexInfo extends Derived implements IndexInfoConfig.Producer { private static final String CMD_HIGHLIGHT = "highlight"; private static final String CMD_INDEX = "index"; private static final String CMD_LOWERCASE = "lowercase"; - private static final String CMD_MATCH_GROUP = "match-group "; private static final String CMD_NORMALIZE = "normalize"; private static final String CMD_STEM = "stem"; private static final String CMD_URLHOST = "urlhost"; @@ -76,24 +75,6 @@ public class IndexInfo extends Derived implements IndexInfoConfig.Producer { } } - @Override - protected void derive(Index index, Search search) { - if (index.getMatchGroup().size() > 0) { - addIndexCommand(index.getName(), CMD_MATCH_GROUP + toSpaceSeparated(index.getMatchGroup())); - } - } - - private String toSpaceSeparated(Collection c) { - StringBuffer b = new StringBuffer(); - for (Iterator i = c.iterator(); i.hasNext();) { - b.append(i.next()); - if (i.hasNext()) { - b.append(" "); - } - } - return b.toString(); - } - private static boolean isPositionArrayField(ImmutableSDField field) { return field.getDataType().equals(DataType.getArray(PositionDataType.INSTANCE)); } @@ -442,8 +423,7 @@ public class IndexInfo extends Derived implements IndexInfoConfig.Producer { if (active != null) { return active; } - // assume default: TODO: Change to Stemming.BEST on Vespa 7 - return Stemming.SHORTEST; + return Stemming.BEST; // assume default } private boolean stemming(ImmutableSDField field) { diff --git a/config-model/src/main/java/com/yahoo/searchdefinition/derived/IndexSchema.java b/config-model/src/main/java/com/yahoo/searchdefinition/derived/IndexSchema.java index 39d51414607..f8766afbc7b 100644 --- a/config-model/src/main/java/com/yahoo/searchdefinition/derived/IndexSchema.java +++ b/config-model/src/main/java/com/yahoo/searchdefinition/derived/IndexSchema.java @@ -114,9 +114,6 @@ public class IndexSchema extends Derived implements IndexschemaConfig.Producer { .prefix(f.hasPrefix()) .phrases(f.hasPhrases()) .positions(f.hasPositions()); - if (f.getSdType() !=null && !f.getSdType().equals(com.yahoo.searchdefinition.Index.Type.VESPA)) { - ifB.indextype(IndexschemaConfig.Indexfield.Indextype.Enum.valueOf(f.getSdType().toString())); - } if (!f.getCollectionType().equals("SINGLE")) { ifB.collectiontype(IndexschemaConfig.Indexfield.Collectiontype.Enum.valueOf(f.getCollectionType())); } @@ -194,10 +191,7 @@ public class IndexSchema extends Derived implements IndexschemaConfig.Producer { public Index.Type getRawType() { return type; } public String getType() { return type.equals(Index.Type.INT64) - ? "INT64" - : type.equals(Index.Type.BOOLEANTREE) - ? "BOOLEANTREE" - : "STRING"; + ? "INT64" : "STRING"; } public String getCollectionType() { return (sdFieldType == null) diff --git a/config-model/src/main/java/com/yahoo/searchdefinition/document/SDDocumentType.java b/config-model/src/main/java/com/yahoo/searchdefinition/document/SDDocumentType.java index c7b698f5835..692fe7666d4 100644 --- a/config-model/src/main/java/com/yahoo/searchdefinition/document/SDDocumentType.java +++ b/config-model/src/main/java/com/yahoo/searchdefinition/document/SDDocumentType.java @@ -260,9 +260,9 @@ public class SDDocumentType implements Cloneable, Serializable { } } } - } + } - public SDField addField(String string, DataType dataType) { + public SDField addField(String string, DataType dataType) { SDField field = new SDField(this, string, dataType); addField(field); return field; diff --git a/config-model/src/main/java/com/yahoo/searchdefinition/document/SDField.java b/config-model/src/main/java/com/yahoo/searchdefinition/document/SDField.java index 049f5392c04..8b523211471 100644 --- a/config-model/src/main/java/com/yahoo/searchdefinition/document/SDField.java +++ b/config-model/src/main/java/com/yahoo/searchdefinition/document/SDField.java @@ -83,9 +83,6 @@ public class SDField extends Field implements TypedKey, FieldOperationContainer, /** The explicitly index settings on this field */ private Map<String, Index> indices = new java.util.LinkedHashMap<>(); - /** True if body or header is set explicitly for this field */ - private boolean headerOrBodyDefined = false; - private boolean idOverride = false; /** Struct fields defined in this field */ @@ -426,7 +423,7 @@ public class SDField extends Field implements TypedKey, FieldOperationContainer, /** Parse an indexing expression which will use the simple linguistics implementatino suitable for testing */ @SuppressWarnings("deprecation") public void parseIndexingScript(String script) { - parseIndexingScript(script, new SimpleLinguistics(false)); + parseIndexingScript(script, new SimpleLinguistics()); } public void parseIndexingScript(String script, Linguistics linguistics) { @@ -769,15 +766,6 @@ public class SDField extends Field implements TypedKey, FieldOperationContainer, return queryCommands; } - - public boolean isHeaderOrBodyDefined() { - return headerOrBodyDefined; - } - - public void setHeaderOrBodyDefined(boolean headerOrBodySetExplicitly) { - this.headerOrBodyDefined = headerOrBodySetExplicitly; - } - /** * The document that this field was declared in, or null * diff --git a/config-model/src/main/java/com/yahoo/searchdefinition/document/Stemming.java b/config-model/src/main/java/com/yahoo/searchdefinition/document/Stemming.java index b5a0ecfbe3d..8a7ee78ea91 100644 --- a/config-model/src/main/java/com/yahoo/searchdefinition/document/Stemming.java +++ b/config-model/src/main/java/com/yahoo/searchdefinition/document/Stemming.java @@ -17,10 +17,6 @@ public enum Stemming { /** No stemming */ NONE("none"), - /** @deprecated incorrectly don't stem at all */ - @Deprecated - ALL("all"), - /** select shortest possible stem */ SHORTEST("shortest"), @@ -43,12 +39,7 @@ public enum Stemming { @SuppressWarnings("deprecation") public static Stemming get(String stemmingName) { try { - Stemming stemming = Stemming.valueOf(stemmingName.toUpperCase()); - if (stemming.equals(ALL)) { - log.warning("note: stemming ALL is the same as stemming mode SHORTEST"); - stemming = SHORTEST; - } - return stemming; + return Stemming.valueOf(stemmingName.toUpperCase()); } catch (IllegalArgumentException e) { throw new IllegalArgumentException("'" + stemmingName + "' is not a valid stemming setting"); } @@ -71,7 +62,6 @@ public enum Stemming { case MULTIPLE: return StemMode.ALL; case BEST : return StemMode.BEST; case NONE: return StemMode.NONE; - case ALL: return StemMode.SHORTEST; // Intentional; preserve historic behavior default: throw new IllegalStateException("Inconvertible stem mode " + this); } } diff --git a/config-model/src/main/java/com/yahoo/searchdefinition/fieldoperation/AttributeOperation.java b/config-model/src/main/java/com/yahoo/searchdefinition/fieldoperation/AttributeOperation.java index 4df3660a967..861a9f530d4 100644 --- a/config-model/src/main/java/com/yahoo/searchdefinition/fieldoperation/AttributeOperation.java +++ b/config-model/src/main/java/com/yahoo/searchdefinition/fieldoperation/AttributeOperation.java @@ -17,7 +17,6 @@ public class AttributeOperation implements FieldOperation, FieldOperationContain private Boolean fastSearch; private Boolean fastAccess; private Boolean mutable; - private Boolean prefetch; private Boolean enableBitVectors; private Boolean enableOnlyBitVector; //TODO: Husk sorting!! @@ -73,14 +72,6 @@ public class AttributeOperation implements FieldOperation, FieldOperationContain this.mutable = mutable; } - public Boolean getPrefetch() { - return prefetch; - } - - public void setPrefetch(Boolean prefetch) { - this.prefetch = prefetch; - } - public Boolean getEnableBitVectors() { return enableBitVectors; } @@ -150,9 +141,6 @@ public class AttributeOperation implements FieldOperation, FieldOperationContain if (mutable != null) { attribute.setMutable(mutable); } - if (prefetch != null) { - attribute.setPrefetch(prefetch); - } if (enableBitVectors != null) { attribute.setEnableBitVectors(enableBitVectors); } diff --git a/config-model/src/main/java/com/yahoo/searchdefinition/fieldoperation/IndexingOperation.java b/config-model/src/main/java/com/yahoo/searchdefinition/fieldoperation/IndexingOperation.java index d1dc68373db..dece0064fcc 100644 --- a/config-model/src/main/java/com/yahoo/searchdefinition/fieldoperation/IndexingOperation.java +++ b/config-model/src/main/java/com/yahoo/searchdefinition/fieldoperation/IndexingOperation.java @@ -29,7 +29,7 @@ public class IndexingOperation implements FieldOperation { /** Creates an indexing operation which will use the simple linguistics implementation suitable for testing */ @SuppressWarnings("deprecation") public static IndexingOperation fromStream(SimpleCharStream input, boolean multiLine) throws ParseException { - return fromStream(input, multiLine, new SimpleLinguistics(false)); + return fromStream(input, multiLine, new SimpleLinguistics()); } public static IndexingOperation fromStream(SimpleCharStream input, boolean multiLine, Linguistics linguistics) @@ -51,4 +51,5 @@ public class IndexingOperation implements FieldOperation { } return new IndexingOperation(exp); } + } diff --git a/config-model/src/main/java/com/yahoo/searchdefinition/processing/DeprecateAttributePrefetch.java b/config-model/src/main/java/com/yahoo/searchdefinition/processing/DeprecateAttributePrefetch.java deleted file mode 100644 index b34db6febd5..00000000000 --- a/config-model/src/main/java/com/yahoo/searchdefinition/processing/DeprecateAttributePrefetch.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -package com.yahoo.searchdefinition.processing; - -import com.yahoo.config.application.api.DeployLogger; -import com.yahoo.searchdefinition.RankProfileRegistry; -import com.yahoo.searchdefinition.Search; -import com.yahoo.searchdefinition.document.Attribute; -import com.yahoo.searchdefinition.document.SDField; -import com.yahoo.vespa.model.container.search.QueryProfiles; - -public class DeprecateAttributePrefetch extends Processor { - - public DeprecateAttributePrefetch(Search search, DeployLogger deployLogger, RankProfileRegistry rankProfileRegistry, QueryProfiles queryProfiles) { - super(search, deployLogger, rankProfileRegistry, queryProfiles); - } - - @Override - public void process(boolean validate, boolean documentsOnly) { - if ( ! validate) return; - - for (SDField field : search.allConcreteFields()) { - for (Attribute a : field.getAttributes().values()) { - if (Boolean.TRUE.equals(a.getPrefetchValue())) { - warn(search, field, "Attribute prefetch is deprecated. Use an explicitly defined document summary with all desired fields defined as attribute."); - } - if (Boolean.FALSE.equals(a.getPrefetchValue())) { - warn(search, field, "Attribute prefetch is deprecated. no-prefetch can be removed."); - } - } - } - } - -} diff --git a/config-model/src/main/java/com/yahoo/searchdefinition/processing/ImplicitSummaries.java b/config-model/src/main/java/com/yahoo/searchdefinition/processing/ImplicitSummaries.java index 724fb060dc2..2e6187d4545 100644 --- a/config-model/src/main/java/com/yahoo/searchdefinition/processing/ImplicitSummaries.java +++ b/config-model/src/main/java/com/yahoo/searchdefinition/processing/ImplicitSummaries.java @@ -32,6 +32,7 @@ public class ImplicitSummaries extends Processor { DocumentSummary defaultSummary = search.getSummary("default"); if (defaultSummary == null) { defaultSummary = new DocumentSummary("default"); + defaultSummary.setFromDisk(true); search.addSummary(defaultSummary); } diff --git a/config-model/src/main/java/com/yahoo/searchdefinition/processing/IndexingOutputs.java b/config-model/src/main/java/com/yahoo/searchdefinition/processing/IndexingOutputs.java index 4feb5b6103b..8c60de1241e 100644 --- a/config-model/src/main/java/com/yahoo/searchdefinition/processing/IndexingOutputs.java +++ b/config-model/src/main/java/com/yahoo/searchdefinition/processing/IndexingOutputs.java @@ -17,7 +17,7 @@ import java.util.*; /** * This processor modifies all indexing scripts so that they output to the owning field by default. It also prevents - * any output expression from writing to any field except for the owning field. Finally, for <tt>SummaryExpression</tt>, + * any output expression from writing to any field except for the owning field. Finally, for <code>SummaryExpression</code>, * this processor expands to write all appropriate summary fields. * * @author Simon Thoresen Hult diff --git a/config-model/src/main/java/com/yahoo/searchdefinition/processing/Processing.java b/config-model/src/main/java/com/yahoo/searchdefinition/processing/Processing.java index 8396139861d..47433479588 100644 --- a/config-model/src/main/java/com/yahoo/searchdefinition/processing/Processing.java +++ b/config-model/src/main/java/com/yahoo/searchdefinition/processing/Processing.java @@ -39,7 +39,6 @@ public class Processing { MutableAttributes::new, CreatePositionZCurve::new, WordMatch::new, - DeprecateAttributePrefetch::new, ImportedFieldsResolver::new, ImplicitSummaries::new, ImplicitSummaryFields::new, diff --git a/config-model/src/main/java/com/yahoo/searchdefinition/processing/SummaryDiskAccessValidator.java b/config-model/src/main/java/com/yahoo/searchdefinition/processing/SummaryDiskAccessValidator.java index d30006a753e..8c0c6a74037 100644 --- a/config-model/src/main/java/com/yahoo/searchdefinition/processing/SummaryDiskAccessValidator.java +++ b/config-model/src/main/java/com/yahoo/searchdefinition/processing/SummaryDiskAccessValidator.java @@ -42,11 +42,10 @@ public class SummaryDiskAccessValidator extends Processor { throw new IllegalArgumentException(summaryField + " in " + summary + " references " + source + ", but this field does not exist"); if ( ! isInMemory(field) && ! summary.isFromDisk()) { - // TODO: Set to warning on vespa 7 - deployLogger.log(Level.FINE, summaryField + " in " + summary + " references " + - source + ", which is not an attribute: Using this " + - "summary will cause disk accesses. " + - "Set 'from-disk' on this summary class to silence this warning."); + deployLogger.log(Level.WARNING, summaryField + " in " + summary + " references " + + source + ", which is not an attribute: Using this " + + "summary will cause disk accesses. " + + "Set 'from-disk' on this summary class to silence this warning."); } } } diff --git a/config-model/src/main/java/com/yahoo/vespa/documentmodel/SummaryField.java b/config-model/src/main/java/com/yahoo/vespa/documentmodel/SummaryField.java index 0f162ee9d51..a9d7f407eb5 100644 --- a/config-model/src/main/java/com/yahoo/vespa/documentmodel/SummaryField.java +++ b/config-model/src/main/java/com/yahoo/vespa/documentmodel/SummaryField.java @@ -121,12 +121,6 @@ public class SummaryField extends Field implements Cloneable, TypedKey { public void setImplicit(boolean implicit) { this.implicit=implicit; } - @Override // override to make public - @Deprecated - public void setDataType(DataType type) { - super.setDataType(type); - } - public boolean isImplicit() { return implicit; } public void setTransform(SummaryTransform transform) { diff --git a/config-model/src/main/java/com/yahoo/vespa/model/admin/Admin.java b/config-model/src/main/java/com/yahoo/vespa/model/admin/Admin.java index 9e12886143d..6b0c9a1abb2 100644 --- a/config-model/src/main/java/com/yahoo/vespa/model/admin/Admin.java +++ b/config-model/src/main/java/com/yahoo/vespa/model/admin/Admin.java @@ -44,7 +44,6 @@ public class Admin extends AbstractConfigProducer implements Serializable { private final boolean isHostedVespa; private final Monitoring monitoring; private final Metrics metrics; - private final Map<String, MetricsConsumer> legacyMetricsConsumers; private final List<Configserver> configservers = new ArrayList<>(); private final List<Slobrok> slobroks = new ArrayList<>(); @@ -73,14 +72,16 @@ public class Admin extends AbstractConfigProducer implements Serializable { private FileDistributionConfigProducer fileDistribution; private final boolean multitenant; - public Admin(AbstractConfigProducer parent, Monitoring monitoring, Metrics metrics, - Map<String, MetricsConsumer> legacyMetricsConsumers, boolean multitenant, - FileDistributionConfigProducer fileDistributionConfigProducer,boolean isHostedVespa) { + public Admin(AbstractConfigProducer parent, + Monitoring monitoring, + Metrics metrics, + boolean multitenant, + FileDistributionConfigProducer fileDistributionConfigProducer, + boolean isHostedVespa) { super(parent, "admin"); this.isHostedVespa = isHostedVespa; this.monitoring = monitoring; this.metrics = metrics; - this.legacyMetricsConsumers = legacyMetricsConsumers; this.multitenant = multitenant; this.fileDistribution = fileDistributionConfigProducer; } @@ -94,11 +95,6 @@ public class Admin extends AbstractConfigProducer implements Serializable { public Metrics getUserMetrics() { return metrics; } - /** Returns the configured userMetricConsumers. Empty if not configured */ - public Map<String, MetricsConsumer> getLegacyUserMetricsConsumers(){ - return legacyMetricsConsumers; - } - /** Returns a list of all config servers */ public List<Configserver> getConfigservers() { return configservers; diff --git a/config-model/src/main/java/com/yahoo/vespa/model/admin/clustercontroller/ClusterControllerClusterVerifier.java b/config-model/src/main/java/com/yahoo/vespa/model/admin/clustercontroller/ClusterControllerClusterVerifier.java index 5ab16037957..4edfab6d738 100644 --- a/config-model/src/main/java/com/yahoo/vespa/model/admin/clustercontroller/ClusterControllerClusterVerifier.java +++ b/config-model/src/main/java/com/yahoo/vespa/model/admin/clustercontroller/ClusterControllerClusterVerifier.java @@ -17,7 +17,7 @@ import java.util.Set; * Verifies that all containers added are ClusterControllerContainers and that filters away Linguistics components. */ public class ClusterControllerClusterVerifier implements ContainerClusterVerifier { - static final Set<ComponentSpecification> unwantedComponents = Collections.singleton(new SimpleComponent(ContainerCluster.SIMPLE_LINGUISTICS_PROVIDER).getClassId()); + static final Set<ComponentSpecification> unwantedComponents = Collections.singleton(new SimpleComponent(ContainerCluster.DEFAULT_LINGUISTICS_PROVIDER).getClassId()); @Override public boolean acceptComponent(Component component) { return ! unwantedComponents.contains(component.getClassId()); diff --git a/config-model/src/main/java/com/yahoo/vespa/model/admin/clustercontroller/ClusterControllerContainer.java b/config-model/src/main/java/com/yahoo/vespa/model/admin/clustercontroller/ClusterControllerContainer.java index ef180119ac0..d64d8d03481 100644 --- a/config-model/src/main/java/com/yahoo/vespa/model/admin/clustercontroller/ClusterControllerContainer.java +++ b/config-model/src/main/java/com/yahoo/vespa/model/admin/clustercontroller/ClusterControllerContainer.java @@ -69,7 +69,7 @@ public class ClusterControllerContainer extends Container implements addBundle("file:" + getDefaults().underVespaHome("lib/jars/zkfacade-jar-with-dependencies.jar")); log.log(LogLevel.DEBUG, "Adding access log for cluster controller ..."); - addComponent(new AccessLogComponent(AccessLogComponent.AccessLogType.queryAccessLog, "controller", isHosted)); + addComponent(new AccessLogComponent(AccessLogComponent.AccessLogType.jsonAccessLog, "controller", isHosted)); } @Override diff --git a/config-model/src/main/java/com/yahoo/vespa/model/admin/monitoring/VespaMetricSet.java b/config-model/src/main/java/com/yahoo/vespa/model/admin/monitoring/VespaMetricSet.java index f3f80304b21..4a9f01597c2 100644 --- a/config-model/src/main/java/com/yahoo/vespa/model/admin/monitoring/VespaMetricSet.java +++ b/config-model/src/main/java/com/yahoo/vespa/model/admin/monitoring/VespaMetricSet.java @@ -41,7 +41,7 @@ public class VespaMetricSet { metrics.add(new Metric("sentinel.restarts.count")); metrics.add(new Metric("sentinel.totalRestarts.last")); - metrics.add(new Metric("sentinel.uptime.last", "sentinel.uptime")); + metrics.add(new Metric("sentinel.uptime.last")); metrics.add(new Metric("sentinel.running.count")); metrics.add(new Metric("sentinel.running.last")); @@ -51,28 +51,28 @@ public class VespaMetricSet { private static Set<Metric> getOtherMetrics() { Set<Metric> metrics = new LinkedHashSet<>(); - metrics.add(new Metric("slobrok.heartbeats.failed.count", "slobrok.heartbeats.failed")); - metrics.add(new Metric("logd.processed.lines.count", "logd.processed.lines")); + metrics.add(new Metric("slobrok.heartbeats.failed.count")); + metrics.add(new Metric("logd.processed.lines.count")); return metrics; } private static Set<Metric> getConfigServerMetrics() { Set<Metric> metrics =new LinkedHashSet<>(); - metrics.add(new Metric("configserver.requests.count", "configserver.requests")); - metrics.add(new Metric("configserver.failedRequests.count", "configserver.failedRequests")); - metrics.add(new Metric("configserver.latency.average", "configserver.latency")); - metrics.add(new Metric("configserver.cacheConfigElems.last", "configserver.cacheConfigElems")); - metrics.add(new Metric("configserver.cacheChecksumElems.last", "configserver.cacheChecksumElems")); - metrics.add(new Metric("configserver.hosts.last", "configserver.hosts")); - metrics.add(new Metric("configserver.delayedResponses.count", "configserver.delayedResponses")); - metrics.add(new Metric("configserver.sessionChangeErrors.count", "configserver.sessionChangeErrors")); - - metrics.add(new Metric("configserver.zkZNodes.last", "configserver.zkZNodes")); - metrics.add(new Metric("configserver.zkAvgLatency.last", "configserver.zkAvgLatency")); - metrics.add(new Metric("configserver.zkMaxLatency.last", "configserver.zkMaxLatency")); - metrics.add(new Metric("configserver.zkConnections.last", "configserver.zkConnections")); - metrics.add(new Metric("configserver.zkOutstandingRequests.last", "configserver.zkOutstandingRequests")); + metrics.add(new Metric("configserver.requests.count")); + metrics.add(new Metric("configserver.failedRequests.count")); + metrics.add(new Metric("configserver.latency.average")); + metrics.add(new Metric("configserver.cacheConfigElems.last")); + metrics.add(new Metric("configserver.cacheChecksumElems.last")); + metrics.add(new Metric("configserver.hosts.last")); + metrics.add(new Metric("configserver.delayedResponses.count")); + metrics.add(new Metric("configserver.sessionChangeErrors.count")); + + metrics.add(new Metric("configserver.zkZNodes.last")); + metrics.add(new Metric("configserver.zkAvgLatency.last")); + metrics.add(new Metric("configserver.zkMaxLatency.last")); + metrics.add(new Metric("configserver.zkConnections.last")); + metrics.add(new Metric("configserver.zkOutstandingRequests.last")); return metrics; } @@ -80,7 +80,7 @@ public class VespaMetricSet { private static Set<Metric> getContainerMetrics() { Set<Metric> metrics = new LinkedHashSet<>(); - metrics.add(new Metric("handled.requests.count", "handled.requests")); + metrics.add(new Metric("handled.requests.count")); metrics.add(new Metric("handled.latency.average")); metrics.add(new Metric("handled.latency.max")); @@ -126,7 +126,7 @@ public class VespaMetricSet { metrics.add(new Metric("jdisc.deactivated_containers.total.last")); metrics.add(new Metric("jdisc.deactivated_containers.with_retained_refs.last")); - metrics.add(new Metric("athenz-tenant-cert.expiry.seconds.last", "athenz-tenant-cert.expiry.seconds")); + metrics.add(new Metric("athenz-tenant-cert.expiry.seconds.last")); metrics.add(new Metric("jdisc.http.request.prematurely_closed.rate")); @@ -154,7 +154,7 @@ public class VespaMetricSet { metrics.add(new Metric("cluster-controller.retired.count.last")); metrics.add(new Metric("cluster-controller.stopping.count.last")); metrics.add(new Metric("cluster-controller.up.count.last")); - metrics.add(new Metric("cluster-controller.cluster-state-change.count", "content.cluster-controller.cluster-state-change.count")); + metrics.add(new Metric("cluster-controller.cluster-state-change.count")); metrics.add(new Metric("cluster-controller.is-master.last")); // TODO(hakonhall): Update this name once persistent "count" metrics has been implemented. @@ -168,7 +168,7 @@ public class VespaMetricSet { Set<Metric> metrics = new LinkedHashSet<>(); // per chain - metrics.add(new Metric("documents_processed.rate", "documents_processed")); + metrics.add(new Metric("documents_processed.rate")); return metrics; } @@ -176,40 +176,40 @@ public class VespaMetricSet { private static Set<Metric> getQrserverMetrics() { Set<Metric> metrics = new LinkedHashSet<>(); - metrics.add(new Metric("peak_qps.max", "peak_qps")); - metrics.add(new Metric("search_connections.average", "search_connections")); - metrics.add(new Metric("active_queries.average", "active_queries")); + metrics.add(new Metric("peak_qps.max")); + metrics.add(new Metric("search_connections.average")); + metrics.add(new Metric("active_queries.average")); metrics.add(new Metric("feed.latency.average")); - metrics.add(new Metric("queries.rate", "queries")); + metrics.add(new Metric("queries.rate")); metrics.add(new Metric("query_container_latency.average")); - metrics.add(new Metric("query_latency.average", "mean_query_latency")); - metrics.add(new Metric("query_latency.max", "max_query_latency")); - metrics.add(new Metric("query_latency.95percentile", "95p_query_latency")); - metrics.add(new Metric("query_latency.99percentile", "99p_query_latency")); - metrics.add(new Metric("failed_queries.rate", "failed_queries")); - metrics.add(new Metric("degraded_queries.rate", "degraded_queries")); - metrics.add(new Metric("hits_per_query.average", "hits_per_query")); + metrics.add(new Metric("query_latency.average")); + metrics.add(new Metric("query_latency.max")); + metrics.add(new Metric("query_latency.95percentile")); + metrics.add(new Metric("query_latency.99percentile")); + metrics.add(new Metric("failed_queries.rate")); + metrics.add(new Metric("degraded_queries.rate")); + metrics.add(new Metric("hits_per_query.average")); metrics.add(new Metric("documents_covered.count")); metrics.add(new Metric("documents_total.count")); - metrics.add(new Metric("totalhits_per_query.average", "totalhits_per_query")); - metrics.add(new Metric("empty_results.rate", "empty_results")); + metrics.add(new Metric("totalhits_per_query.average")); + metrics.add(new Metric("empty_results.rate")); metrics.add(new Metric("requestsOverQuota.rate")); metrics.add(new Metric("requestsOverQuota.count")); // Errors from qrserver - metrics.add(new Metric("error.timeout.rate","error.timeout")); - metrics.add(new Metric("error.backends_oos.rate","error.backends_oos")); - metrics.add(new Metric("error.plugin_failure.rate","error.plugin_failure")); - metrics.add(new Metric("error.backend_communication_error.rate","error.backend_communication_error")); - metrics.add(new Metric("error.empty_document_summaries.rate","error.empty_document_summaries")); - metrics.add(new Metric("error.invalid_query_parameter.rate","error.invalid_query_parameter")); - metrics.add(new Metric("error.internal_server_error.rate", "error.internal_server_error")); - metrics.add(new Metric("error.misconfigured_server.rate","error.misconfigured_server")); - metrics.add(new Metric("error.invalid_query_transformation.rate","error.invalid_query_transformation")); - metrics.add(new Metric("error.result_with_errors.rate","error.result_with_errors")); - metrics.add(new Metric("error.unspecified.rate","error.unspecified")); - metrics.add(new Metric("error.unhandled_exception.rate","error.unhandled_exception")); + metrics.add(new Metric("error.timeout.rate")); + metrics.add(new Metric("error.backends_oos.rate")); + metrics.add(new Metric("error.plugin_failure.rate")); + metrics.add(new Metric("error.backend_communication_error.rate")); + metrics.add(new Metric("error.empty_document_summaries.rate")); + metrics.add(new Metric("error.invalid_query_parameter.rate")); + metrics.add(new Metric("error.internal_server_error.rate")); + metrics.add(new Metric("error.misconfigured_server.rate")); + metrics.add(new Metric("error.invalid_query_transformation.rate")); + metrics.add(new Metric("error.result_with_errors.rate")); + metrics.add(new Metric("error.unspecified.rate")); + metrics.add(new Metric("error.unhandled_exception.rate")); return metrics; } @@ -217,18 +217,18 @@ public class VespaMetricSet { private static Set<Metric> getSearchNodeMetrics() { Set<Metric> metrics = new LinkedHashSet<>(); - metrics.add(new Metric("proton.numstoreddocs.last", "documents_total")); - metrics.add(new Metric("proton.numindexeddocs.last", "documents_ready")); - metrics.add(new Metric("proton.numactivedocs.last", "documents_active")); - metrics.add(new Metric("proton.numremoveddocs.last", "documents_removed")); + metrics.add(new Metric("content.proton.documentdb.documents.total.last")); + metrics.add(new Metric("content.proton.documentdb.documents.ready.last")); + metrics.add(new Metric("content.proton.documentdb.documents.active.last")); + metrics.add(new Metric("content.proton.documentdb.documents.removed.last")); - metrics.add(new Metric("proton.docsinmemory.last", "documents_inmemory")); - metrics.add(new Metric("proton.diskusage.last", "diskusage")); - metrics.add(new Metric("proton.memoryusage.max", "content.proton.memoryusage.max")); - metrics.add(new Metric("proton.transport.query.count.rate", "query_requests")); - metrics.add(new Metric("proton.docsum.docs.rate", "document_requests")); - metrics.add(new Metric("proton.docsum.latency.average", "content.proton.transport.docsum.latency.average")); - metrics.add(new Metric("proton.transport.query.latency.average", "query_latency")); + metrics.add(new Metric("content.proton.documentdb.index.docs_in_memory.last")); + metrics.add(new Metric("content.proton.documentdb.disk_usage.last")); + metrics.add(new Metric("content.proton.documentdb.memory_usage.allocated_bytes.max")); + metrics.add(new Metric("content.proton.transport.query.count.rate")); + metrics.add(new Metric("content.proton.docsum.docs.rate")); + metrics.add(new Metric("content.proton.docsum.latency.average")); + metrics.add(new Metric("content.proton.transport.query.latency.average")); // jobs metrics.add(new Metric("content.proton.documentdb.job.total.average")); @@ -343,10 +343,10 @@ public class VespaMetricSet { private static Set<Metric> getStorageMetrics() { Set<Metric> metrics = new LinkedHashSet<>(); - metrics.add(new Metric("vds.datastored.alldisks.docs.average","docs")); - metrics.add(new Metric("vds.datastored.alldisks.bytes.average","bytes")); - metrics.add(new Metric("vds.visitor.allthreads.averagevisitorlifetime.sum.average","visitorlifetime")); - metrics.add(new Metric("vds.visitor.allthreads.averagequeuewait.sum.average","visitorqueuewait")); + metrics.add(new Metric("vds.datastored.alldisks.docs.average")); + metrics.add(new Metric("vds.datastored.alldisks.bytes.average")); + metrics.add(new Metric("vds.visitor.allthreads.averagevisitorlifetime.sum.average")); + metrics.add(new Metric("vds.visitor.allthreads.averagequeuewait.sum.average")); metrics.add(new Metric("vds.filestor.alldisks.allthreads.put.sum.count.rate")); metrics.add(new Metric("vds.filestor.alldisks.allthreads.remove.sum.count.rate")); metrics.add(new Metric("vds.filestor.alldisks.allthreads.get.sum.count.rate")); @@ -354,12 +354,12 @@ public class VespaMetricSet { metrics.add(new Metric("vds.filestor.alldisks.allthreads.createiterator.count.rate")); metrics.add(new Metric("vds.filestor.alldisks.allthreads.visit.sum.count.rate")); metrics.add(new Metric("vds.filestor.alldisks.allthreads.remove_location.sum.count.rate")); - metrics.add(new Metric("vds.filestor.alldisks.queuesize.average","diskqueuesize")); - metrics.add(new Metric("vds.filestor.alldisks.averagequeuewait.sum.average","diskqueuewait")); + metrics.add(new Metric("vds.filestor.alldisks.queuesize.average")); + metrics.add(new Metric("vds.filestor.alldisks.averagequeuewait.sum.average")); metrics.add(new Metric("vds.visitor.allthreads.queuesize.count.average")); metrics.add(new Metric("vds.visitor.allthreads.completed.sum.average")); - metrics.add(new Metric("vds.visitor.allthreads.created.sum.rate","visit")); + metrics.add(new Metric("vds.visitor.allthreads.created.sum.rate")); metrics.add(new Metric("vds.visitor.allthreads.averagemessagesendtime.sum.average")); metrics.add(new Metric("vds.visitor.allthreads.averageprocessingtime.sum.average")); @@ -397,18 +397,18 @@ public class VespaMetricSet { metrics.add(new Metric("vds.idealstate.buckets_toomanycopies.average")); metrics.add(new Metric("vds.idealstate.buckets.average")); metrics.add(new Metric("vds.idealstate.buckets_notrusted.average")); - metrics.add(new Metric("vds.idealstate.delete_bucket.done_ok.rate","deleteok")); - metrics.add(new Metric("vds.idealstate.delete_bucket.done_failed.rate","deletefailed")); - metrics.add(new Metric("vds.idealstate.delete_bucket.pending.average","deletepending")); - metrics.add(new Metric("vds.idealstate.merge_bucket.done_ok.rate","mergeok")); - metrics.add(new Metric("vds.idealstate.merge_bucket.done_failed.rate","mergefailed")); - metrics.add(new Metric("vds.idealstate.merge_bucket.pending.average","mergepending")); - metrics.add(new Metric("vds.idealstate.split_bucket.done_ok.rate","splitok")); - metrics.add(new Metric("vds.idealstate.split_bucket.done_failed.rate","splitfailed")); - metrics.add(new Metric("vds.idealstate.split_bucket.pending.average","splitpending")); - metrics.add(new Metric("vds.idealstate.join_bucket.done_ok.rate","joinok")); - metrics.add(new Metric("vds.idealstate.join_bucket.done_failed.rate","joinfailed")); - metrics.add(new Metric("vds.idealstate.join_bucket.pending.average","joinpending")); + metrics.add(new Metric("vds.idealstate.delete_bucket.done_ok.rate")); + metrics.add(new Metric("vds.idealstate.delete_bucket.done_failed.rate")); + metrics.add(new Metric("vds.idealstate.delete_bucket.pending.average")); + metrics.add(new Metric("vds.idealstate.merge_bucket.done_ok.rate")); + metrics.add(new Metric("vds.idealstate.merge_bucket.done_failed.rate")); + metrics.add(new Metric("vds.idealstate.merge_bucket.pending.average")); + metrics.add(new Metric("vds.idealstate.split_bucket.done_ok.rate")); + metrics.add(new Metric("vds.idealstate.split_bucket.done_failed.rate")); + metrics.add(new Metric("vds.idealstate.split_bucket.pending.average")); + metrics.add(new Metric("vds.idealstate.join_bucket.done_ok.rate")); + metrics.add(new Metric("vds.idealstate.join_bucket.done_failed.rate")); + metrics.add(new Metric("vds.idealstate.join_bucket.pending.average")); metrics.add(new Metric("vds.idealstate.garbage_collection.done_ok.rate")); metrics.add(new Metric("vds.idealstate.garbage_collection.done_failed.rate")); metrics.add(new Metric("vds.idealstate.garbage_collection.pending.average")); diff --git a/config-model/src/main/java/com/yahoo/vespa/model/builder/xml/dom/DomAdminBuilderBase.java b/config-model/src/main/java/com/yahoo/vespa/model/builder/xml/dom/DomAdminBuilderBase.java index fa28802b3ac..3a9a5d59b1a 100644 --- a/config-model/src/main/java/com/yahoo/vespa/model/builder/xml/dom/DomAdminBuilderBase.java +++ b/config-model/src/main/java/com/yahoo/vespa/model/builder/xml/dom/DomAdminBuilderBase.java @@ -72,18 +72,12 @@ public abstract class DomAdminBuilderBase extends VespaDomBuilder.DomConfigProdu @Override protected Admin doBuild(DeployState deployState, AbstractConfigProducer parent, Element adminElement) { - Monitoring monitoring = getMonitoring(getChildWithFallback(adminElement, "monitoring", "yamas")); + Monitoring monitoring = getMonitoring(XML.getChild(adminElement,"monitoring")); Metrics metrics = new MetricsBuilder(applicationType, predefinedMetricSets) .buildMetrics(XML.getChild(adminElement, "metrics")); - Map<String, MetricsConsumer> legacyMetricsConsumers = DomMetricBuilderHelper - .buildMetricsConsumers(XML.getChild(adminElement, "metric-consumers")); - if (! legacyMetricsConsumers.isEmpty()) { - deployState.getDeployLogger().log(WARNING, "Element 'metric-consumers' is deprecated and will be removed in Vespa 7. Use 'metrics' instead!"); - } FileDistributionConfigProducer fileDistributionConfigProducer = getFileDistributionConfigProducer(parent); - Admin admin = new Admin(parent, monitoring, metrics, legacyMetricsConsumers, multitenant, - fileDistributionConfigProducer, deployState.isHosted()); + Admin admin = new Admin(parent, monitoring, metrics, multitenant, fileDistributionConfigProducer, deployState.isHosted()); admin.setApplicationType(applicationType); doBuildAdmin(deployState, admin, adminElement); new ModelConfigProvider(admin); @@ -95,12 +89,6 @@ public abstract class DomAdminBuilderBase extends VespaDomBuilder.DomConfigProdu return new FileDistributionConfigProducer(parent, fileRegistry, configServerSpecs); } - private Element getChildWithFallback(Element parent, String childName, String alternativeChildName) { - Element child = XML.getChild(parent, childName); - if (child != null) return child; - return XML.getChild(parent, alternativeChildName); - } - protected abstract void doBuildAdmin(DeployState deployState, Admin admin, Element adminE); private Monitoring getMonitoring(Element monitoringElement) { diff --git a/config-model/src/main/java/com/yahoo/vespa/model/builder/xml/dom/DomClientsBuilder.java b/config-model/src/main/java/com/yahoo/vespa/model/builder/xml/dom/DomClientsBuilder.java index 24da87200b8..c107a85bcb5 100644 --- a/config-model/src/main/java/com/yahoo/vespa/model/builder/xml/dom/DomClientsBuilder.java +++ b/config-model/src/main/java/com/yahoo/vespa/model/builder/xml/dom/DomClientsBuilder.java @@ -30,7 +30,7 @@ public class DomClientsBuilder extends LegacyConfigModelBuilder<Clients> { String version = clientsE.getAttribute("version"); if (version.startsWith("2.")) { DomV20ClientsBuilder parser = new DomV20ClientsBuilder(clients, version); - parser.build(modelContext.getDeployState(), clientsE); + parser.build(clientsE); } else { throw new IllegalArgumentException("Version '" + version + "' of 'clients' not supported."); } diff --git a/config-model/src/main/java/com/yahoo/vespa/model/builder/xml/dom/DomMetricBuilderHelper.java b/config-model/src/main/java/com/yahoo/vespa/model/builder/xml/dom/DomMetricBuilderHelper.java deleted file mode 100644 index 4c1fdd3f92c..00000000000 --- a/config-model/src/main/java/com/yahoo/vespa/model/builder/xml/dom/DomMetricBuilderHelper.java +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -package com.yahoo.vespa.model.builder.xml.dom; - -import com.yahoo.text.XML; -import com.yahoo.vespa.model.admin.monitoring.Metric; -import com.yahoo.vespa.model.admin.monitoring.MetricSet; -import com.yahoo.vespa.model.admin.monitoring.MetricsConsumer; -import org.w3c.dom.Element; - -import java.util.LinkedHashMap; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import static com.yahoo.vespa.model.admin.monitoring.DefaultMetricsConsumer.VESPA_CONSUMER_ID; - -/** - * Helper class for parsing metric config. - * - * TODO: Remove when 'metric-consumers' under 'admin' is disallowed - * - * @author Trygve Berdal - */ -public class DomMetricBuilderHelper { - - private static final String LEGACY_DEFAULT_CONSUMER_ID = "yamas"; - - /** - * Build metricConsumer config - * - * @param spec xml element - * @return a map from metric name to a {@link MetricsConsumer} - */ - protected static Map<String, MetricsConsumer> buildMetricsConsumers(Element spec) { - Map<String, MetricsConsumer> metricsConsumers = new LinkedHashMap<>(); - List<Element> consumersElem = XML.getChildren(spec, "consumer"); - for (Element consumer : consumersElem) { - String consumerName = getConsumerName(consumer); - Set<Metric> metrics = new LinkedHashSet<>(); - List<Element> metricsEl = XML.getChildren(consumer, "metric"); - if (metricsEl != null) { - for (Element metric : metricsEl) { - String metricName = metric.getAttribute("name"); - String outputName = metric.getAttribute("output-name"); - metrics.add(new Metric(metricName, outputName)); - } - } - MetricsConsumer metricsConsumer = new MetricsConsumer(consumerName, - new MetricSet(metricSetId(consumerName), metrics)); - metricsConsumers.put(consumerName, metricsConsumer); - } - return metricsConsumers; - } - - // Converts the old default consumer id to the new default id. - private static String getConsumerName(Element consumerElement) { - String givenName = consumerElement.getAttribute("name"); - if (givenName.equals(LEGACY_DEFAULT_CONSUMER_ID)) - return VESPA_CONSUMER_ID; - else - return givenName; - } - - private static String metricSetId(String consumerName) { - return "legacy-user-metrics-" + consumerName; - } -} diff --git a/config-model/src/main/java/com/yahoo/vespa/model/builder/xml/dom/DomSearchTuningBuilder.java b/config-model/src/main/java/com/yahoo/vespa/model/builder/xml/dom/DomSearchTuningBuilder.java index 81f901fc849..067d653ea40 100644 --- a/config-model/src/main/java/com/yahoo/vespa/model/builder/xml/dom/DomSearchTuningBuilder.java +++ b/config-model/src/main/java/com/yahoo/vespa/model/builder/xml/dom/DomSearchTuningBuilder.java @@ -128,9 +128,7 @@ public class DomSearchTuningBuilder extends VespaDomBuilder.DomConfigProducerBui } } else if (equals("transactionlog", e)) { for (Element subElem : XML.getChildren(e)) { - if (equals("maxentries", subElem)) { - deployLogger.log(Level.WARNING, "Element 'transactionlog.maxentries is deprecated and ignored in 'native' flush strategy. Use 'transactionlog.maxsize' to limit by size."); - } else if (equals("maxsize", subElem)) { + if (equals("maxsize", subElem)) { fs.transactionLogMaxSize = asLong(subElem); } } @@ -224,8 +222,6 @@ public class DomSearchTuningBuilder extends VespaDomBuilder.DomConfigProducerBui c.maxSize = asLong(e); } else if (equals("maxsize-percent", e)) { c.maxSizePercent = asDouble(e); - } else if (equals("maxentries", e)) { - deployLogger.log(Level.WARNING, "Element 'maxentries is deprecated and ignored. Will only limit by size."); } else if (equals("initialentries", e)) { c.initialEntries = asLong(e); } else if (equals("compression", e)) { @@ -250,15 +246,8 @@ public class DomSearchTuningBuilder extends VespaDomBuilder.DomConfigProducerBui for (Element e : XML.getChildren(spec)) { if (equals("maxfilesize", e)) { s.logStore.maxFileSize = asLong(e); - } else if (equals("maxdiskbloatfactor", e)) { - deployLogger.log(Level.WARNING, - "Element 'maxdiskbloatfactor is deprecated and ignored." + - " The min value from flush.memory.xxx.diskbloatfactor is used instead"); } else if (equals("minfilesizefactor", e)) { s.logStore.minFileSizeFactor = asDouble(e); - } else if (equals("numthreads", e)) { - deployLogger.log(Level.WARNING, "Element 'numthreads is deprecated. Use feeding.concurrency instead."); - s.logStore.numThreads = asInt(e); } else if (equals("chunk", e)) { s.logStore.chunk = new Tuning.SearchNode.Summary.Store.Component(true); handleSummaryStoreComponent(deployLogger, e, s.logStore.chunk); diff --git a/config-model/src/main/java/com/yahoo/vespa/model/builder/xml/dom/DomV20ClientsBuilder.java b/config-model/src/main/java/com/yahoo/vespa/model/builder/xml/dom/DomV20ClientsBuilder.java index 6a02619bdb4..74e3ac581c4 100644 --- a/config-model/src/main/java/com/yahoo/vespa/model/builder/xml/dom/DomV20ClientsBuilder.java +++ b/config-model/src/main/java/com/yahoo/vespa/model/builder/xml/dom/DomV20ClientsBuilder.java @@ -2,26 +2,11 @@ package com.yahoo.vespa.model.builder.xml.dom; import com.yahoo.config.model.deploy.DeployState; -import com.yahoo.vespa.config.content.spooler.SpoolerConfig; -import com.yahoo.config.model.producer.AbstractConfigProducer; import com.yahoo.text.XML; -import com.yahoo.vespa.defaults.Defaults; -import com.yahoo.vespa.model.SimpleConfigProducer; -import com.yahoo.vespa.model.builder.xml.dom.VespaDomBuilder.DomConfigProducerBuilder; import com.yahoo.vespa.model.clients.Clients; -import com.yahoo.vespa.model.clients.VespaSpoolMaster; -import com.yahoo.vespa.model.clients.VespaSpooler; -import com.yahoo.vespa.model.clients.VespaSpoolerProducer; -import com.yahoo.vespa.model.clients.VespaSpoolerService; -import com.yahoo.vespaclient.config.FeederConfig; import org.w3c.dom.Element; -import org.w3c.dom.Node; import org.w3c.dom.NodeList; -import java.io.Serializable; -import java.util.ArrayList; -import java.util.List; - /** * Builds the Clients plugin * @@ -38,13 +23,8 @@ public class DomV20ClientsBuilder { this.clients = clients; } - public void build(DeployState deployState, Element spec) { - NodeList children = spec.getElementsByTagName("spoolers"); - for (int i = 0; i < children.getLength(); i++) { - createSpoolers(deployState, clients.getConfigProducer(), (Element) children.item(i), clients); - } - - children = spec.getElementsByTagName("load-types"); + public void build(Element spec) { + NodeList children = spec.getElementsByTagName("load-types"); for (int i = 0; i < children.getLength(); i++) { createLoadTypes((Element) children.item(i), clients); } @@ -57,283 +37,4 @@ public class DomV20ClientsBuilder { } } - /** - * Creates VespaSpooler objects using the given xml Element. - */ - private void createSpoolers(DeployState deployState, AbstractConfigProducer pcp, Element element, Clients clients) { - String jvmArgs = null; - if (element.hasAttribute(VespaDomBuilder.JVMARGS_ATTRIB_NAME)) jvmArgs=element.getAttribute(VespaDomBuilder.JVMARGS_ATTRIB_NAME); - SimpleConfigProducer spoolerCfg = new VespaDomBuilder.DomSimpleConfigProducerBuilder(element.getNodeName()). - build(deployState, pcp, element); - Element spoolersFeederOptions = findFeederOptions(element); - createSpoolMasters(deployState, spoolerCfg, element); - for (Element e : XML.getChildren(element, "spooler")) { - String configId = e.getAttribute("id").trim(); - FeederConfig.Builder feederConfig = getFeederConfig(spoolersFeederOptions, e); - SpoolerConfig.Builder spoolConfig = getSpoolConfig(e); - if (configId.length() == 0) { - int index = clients.getVespaSpoolers().size(); - VespaSpoolerService spoolerService = new VespaSpoolerServiceBuilder(index, new VespaSpooler(feederConfig, spoolConfig)). - build(deployState, spoolerCfg, e); - if ("".equals(spoolerService.getJvmOptions()) && jvmArgs!=null) spoolerService.setJvmOptions(jvmArgs); - spoolerService.setProp("index", String.valueOf(index)); - clients.getVespaSpoolers().add(spoolerService); - } else { - new VespaSpoolerProducerBuilder(configId, new VespaSpooler(feederConfig, spoolConfig)). - build(deployState, spoolerCfg, e); - } - } - } - - private void createSpoolMasters(DeployState deployState, SimpleConfigProducer producer, Element element) { - int i=0; - for (Element e : XML.getChildren(element, "spoolmaster")) - new VespaSpoolMasterBuilder(i++).build(deployState, producer, e); - } - - private SpoolerConfig.Builder getSpoolConfig(Element conf) { - SpoolerConfig.Builder builder = new SpoolerConfig.Builder(); - if (conf.getAttributes().getNamedItem("directory") != null) { - builder.directory(Defaults.getDefaults().underVespaHome(conf.getAttributes().getNamedItem("directory").getNodeValue())); - } - if (conf.getAttributes().getNamedItem("keepsuccess") != null) { - builder.keepsuccess(getBooleanFromAttribute(conf, "keepsuccess")); - } - if (conf.getAttributes().getNamedItem("maxfailuresize") != null) { - builder.maxfailuresize(getIntegerFromAttribute(conf, "maxfailuresize")); - } - if (conf.getAttributes().getNamedItem("maxfatalfailuresize") != null) { - builder.maxfatalfailuresize(getIntegerFromAttribute(conf, "maxfatalfailuresize")); - } - if (conf.getAttributes().getNamedItem("threads") != null) { - builder.threads(getIntegerFromAttribute(conf, "threads")); - } - if (conf.getAttributes().getNamedItem("maxretries") != null) { - builder.maxretries(getIntegerFromAttribute(conf, "maxretries")); - } - - NodeList children = conf.getElementsByTagName("parsers"); - if (children.getLength() == 1) { - children = ((Element)children.item(0)).getElementsByTagName("parser"); - } - - for (int i=0; i < children.getLength(); i++) { - Element e = (Element)children.item(i); - - String type = e.getAttributes().getNamedItem("type").getNodeValue(); - NodeList params = e.getElementsByTagName("parameter"); - - SpoolerConfig.Parsers.Builder parserBuilder = new SpoolerConfig.Parsers.Builder(); - parserBuilder.classname(type); - if (params.getLength() > 0) { - List<SpoolerConfig.Parsers.Parameters.Builder> parametersBuilders = new ArrayList<>(); - for (int j = 0; j < params.getLength(); j++) { - SpoolerConfig.Parsers.Parameters.Builder parametersBuilder = new SpoolerConfig.Parsers.Parameters.Builder(); - Element p = (Element) params.item(j); - parametersBuilder.key(getStringFromAttribute(p, "key")); - parametersBuilder.value(getStringFromAttribute(p, "value")); - parametersBuilders.add(parametersBuilder); - } - parserBuilder.parameters(parametersBuilders); - } - - builder.parsers.add(parserBuilder); - } - return builder; - } - - Boolean getBooleanFromAttribute(Element e, String attributeName) { - return Boolean.parseBoolean(e.getAttributes().getNamedItem(attributeName).getNodeValue()); - } - - Integer getIntegerFromAttribute(Element e, String attributeName) { - return Integer.parseInt(e.getAttributes().getNamedItem(attributeName).getNodeValue()); - } - - String getStringFromAttribute(Element e, String attributeName) { - return e.getAttributes().getNamedItem(attributeName).getNodeValue(); - } - - private FeederConfig.Builder getFeederConfig(Element gatewaysFeederOptions, Element e) { - FeederOptionsParser foParser = new FeederOptionsParser(); - if (gatewaysFeederOptions!=null) { - foParser.parseFeederOptions(gatewaysFeederOptions).getFeederConfig(); - } - foParser.parseFeederOptions(e); - return foParser.getFeederConfig(); - } - - /** - * Finds the feederoptions subelement in the given xml Element. - * - * @param element The xml Element - * @return The feederoptions xml Element - */ - private Element findFeederOptions(Element element) { - for (Element child : XML.getChildren(element)) { - if (child.getNodeName().equals("feederoptions")) { - return child; - } - } - return null; - } - - private static class VespaSpoolerServiceBuilder extends DomConfigProducerBuilder<VespaSpoolerService> { - private int index; - private VespaSpooler spoolerConfig; - - public VespaSpoolerServiceBuilder(int index, VespaSpooler spoolerConfig) { - this.index = index; - this.spoolerConfig = spoolerConfig; - } - - @Override - protected VespaSpoolerService doBuild(DeployState deployState, AbstractConfigProducer parent, Element spec) { - return new VespaSpoolerService(parent, index, spoolerConfig); - } - } - - private static class VespaSpoolerProducerBuilder extends DomConfigProducerBuilder<VespaSpoolerProducer> { - private String name=null; - private VespaSpooler spooler; - - public VespaSpoolerProducerBuilder(String name, VespaSpooler spooler) { - this.name = name; - this.spooler = spooler; - } - - @Override - protected VespaSpoolerProducer doBuild(DeployState deployState, AbstractConfigProducer parent, Element producerSpec) { - return new VespaSpoolerProducer(parent, name, spooler); - } - } - - private static class VespaSpoolMasterBuilder extends DomConfigProducerBuilder<VespaSpoolMaster> { - int index; - - public VespaSpoolMasterBuilder(int index) { - super(); - this.index = index; - } - - @Override - protected VespaSpoolMaster doBuild(DeployState deployState, AbstractConfigProducer parent, Element spec) { - return new VespaSpoolMaster(parent, index); - } - } - - /** - * This class parses the feederoptions xml tag and produces Vespa config output. - * - * @author Gunnar Gauslaa Bergem - */ - private class FeederOptionsParser implements Serializable { - private static final long serialVersionUID = 1L; - // All member variables are objects so that we can switch on null values. - private Boolean abortondocumenterror = null; - private String route = null; - private Integer maxpendingdocs = null; - private Integer maxpendingbytes = null; - private Boolean retryenabled = null; - private Double retrydelay = null; - private Double timeout = null; - private Integer tracelevel = null; - private Integer mbusport = null; - private String docprocChain = null; - - /** - * Constructs an empty feeder options object with all members set to null. - */ - public FeederOptionsParser() { - // empty - } - - /** - * Parses the content of the given XML element as feeder options. - * - * @param conf The XML element to parse. - */ - public FeederOptionsParser parseFeederOptions(Element conf) { - for (Node node : XML.getChildren(conf)) { - String nodename = node.getNodeName(); - Node firstchild = node.getFirstChild(); - String childval = (firstchild != null) ? firstchild.getNodeValue() : null; - - switch (nodename) { - case "abortondocumenterror": - abortondocumenterror = Boolean.valueOf(childval); - break; - case "maxpendingdocs": - maxpendingdocs = Integer.valueOf(childval); - break; - case "maxpendingbytes": - maxpendingbytes = Integer.valueOf(childval); - break; - case "retryenabled": - retryenabled = Boolean.valueOf(childval); - break; - case "retrydelay": - retrydelay = Double.valueOf(childval); - break; - case "timeout": - timeout = Double.valueOf(childval); - break; - case "route": - route = childval; - break; - case "tracelevel": - tracelevel = Integer.valueOf(childval); - break; - case "mbusport": - mbusport = Integer.valueOf(childval); - break; - case "docprocchain": - docprocChain = childval; - break; - } - } - return this; - } - - /** - * Returns a feeder options config string of the content of this. - * - * @return A config string. - */ - public FeederConfig.Builder getFeederConfig() { - FeederConfig.Builder builder = new FeederConfig.Builder(); - if (abortondocumenterror != null) { - builder.abortondocumenterror(abortondocumenterror); - } - if (route != null && route.length() > 0) { - builder.route(route); - } - if (maxpendingdocs != null) { - builder.maxpendingdocs(maxpendingdocs); - } - if (maxpendingbytes != null) { - builder.maxpendingbytes(maxpendingbytes); - } - if (retryenabled != null) { - builder.retryenabled(retryenabled); - } - if (retrydelay != null) { - builder.retrydelay(retrydelay); - } - if (timeout != null) { - builder.timeout(timeout); - } - if (tracelevel != null) { - builder.tracelevel(tracelevel); - } - if (mbusport != null) { - builder.mbusport(mbusport); - } - if (docprocChain != null && docprocChain.length() > 0) { - builder.docprocchain(docprocChain); - } - return builder; - } - } - } diff --git a/config-model/src/main/java/com/yahoo/vespa/model/builder/xml/dom/chains/search/DomProviderBuilder.java b/config-model/src/main/java/com/yahoo/vespa/model/builder/xml/dom/chains/search/DomProviderBuilder.java index 66b425be8f5..534b07339ec 100644 --- a/config-model/src/main/java/com/yahoo/vespa/model/builder/xml/dom/chains/search/DomProviderBuilder.java +++ b/config-model/src/main/java/com/yahoo/vespa/model/builder/xml/dom/chains/search/DomProviderBuilder.java @@ -2,8 +2,6 @@ package com.yahoo.vespa.model.builder.xml.dom.chains.search; import com.yahoo.binaryprefix.BinaryPrefix; -import com.yahoo.component.chain.dependencies.Dependencies; -import com.yahoo.component.chain.model.ChainedComponentModel; import com.yahoo.component.ComponentId; import com.yahoo.component.chain.model.ChainSpecification; import com.yahoo.config.model.deploy.DeployState; @@ -13,7 +11,7 @@ import com.yahoo.text.XML; import com.yahoo.config.model.producer.AbstractConfigProducer; import com.yahoo.vespa.model.builder.xml.dom.BinaryScaledAmountParser; import com.yahoo.vespa.model.builder.xml.dom.chains.ComponentsBuilder; -import com.yahoo.vespa.model.container.search.searchchain.HttpProvider; +import com.yahoo.vespa.model.container.search.searchchain.GenericProvider; import com.yahoo.vespa.model.container.search.searchchain.LocalProvider; import com.yahoo.vespa.model.container.search.searchchain.Provider; import com.yahoo.vespa.model.container.search.searchchain.Source; @@ -23,7 +21,6 @@ import java.util.ArrayList; import java.util.Collection; import java.util.List; import java.util.Map; -import java.util.stream.Collectors; /** * Builds a provider from xml. @@ -211,9 +208,7 @@ public class DomProviderBuilder extends DomGenericTargetBuilder<Provider> { ProviderReader providerReader, FederationOptions federationOptions) { if (providerReader.type == null) { - return buildEmptyHttpProvider(specWithoutInnerSearchers, providerReader, federationOptions); - } else if (com.yahoo.search.searchchain.model.federation.HttpProviderSpec.includesType(providerReader.type)) { // TODO: Remove on Vespa 7 - return buildHttpProvider(specWithoutInnerSearchers, providerReader, federationOptions); + return new GenericProvider(specWithoutInnerSearchers, federationOptions); } else if (LocalProviderSpec.includesType(providerReader.type)) { return buildLocalProvider(specWithoutInnerSearchers, providerReader, federationOptions); } else { @@ -236,63 +231,6 @@ public class DomProviderBuilder extends DomGenericTargetBuilder<Provider> { } } - // TODO: Remove on Vespa 7 - @SuppressWarnings("deprecation") - private Provider buildHttpProvider(ChainSpecification specWithoutInnerSearchers, ProviderReader providerReader, FederationOptions federationOptions) { - ensureEmpty(specWithoutInnerSearchers.componentId, providerReader.clusterName); - - Provider httpProvider = buildEmptyHttpProvider(specWithoutInnerSearchers, providerReader, federationOptions); - - httpProvider.addInnerComponent(new com.yahoo.vespa.model.container.search.searchchain.HttpProviderSearcher( - new ChainedComponentModel( - com.yahoo.search.searchchain.model.federation.HttpProviderSpec.toBundleInstantiationSpecification(com.yahoo.search.searchchain.model.federation.HttpProviderSpec.Type.valueOf(providerReader.type)), - Dependencies.emptyDependencies()))); - - return httpProvider; - } - - // TODO: Remove on Vespa 7 - @SuppressWarnings("deprecation") - private Provider buildEmptyHttpProvider(ChainSpecification specWithoutInnerSearchers, ProviderReader providerReader, FederationOptions federationOptions) { - ensureEmpty(specWithoutInnerSearchers.componentId, providerReader.clusterName); - - return new HttpProvider(specWithoutInnerSearchers, - federationOptions, - new com.yahoo.search.searchchain.model.federation.HttpProviderSpec( - providerReader.cacheWeight, - providerReader.path, - toHttpProviderNodes(providerReader.nodes), - providerReader.certificateApplicationId, - providerReader.certificateTtl, - providerReader.certificateRetryWait, - toHttpProviderNode(providerReader.certificateProxy), - providerReader.cacheSizeMB, - connectionParameters(providerReader))); - } - - // TODO: Remove on Vespa 7 - @SuppressWarnings("deprecation") - private com.yahoo.search.searchchain.model.federation.HttpProviderSpec.Node toHttpProviderNode(Node node) { - if (node == null) return null; - return new com.yahoo.search.searchchain.model.federation.HttpProviderSpec.Node(node.host, node.port); - } - - @SuppressWarnings("deprecation") - private List<com.yahoo.search.searchchain.model.federation.HttpProviderSpec.Node> toHttpProviderNodes(List<Node> nodes) { - if (nodes == null) return null; - return nodes.stream().map(node -> toHttpProviderNode(node)).collect(Collectors.toList()); - } - - // TODO: Remove on Vespa 7 - @SuppressWarnings("deprecation") - private com.yahoo.search.searchchain.model.federation.HttpProviderSpec.ConnectionParameters connectionParameters(ProviderReader providerReader) { - return new com.yahoo.search.searchchain.model.federation.HttpProviderSpec.ConnectionParameters( - providerReader.readTimeout, - providerReader.connectionTimeout, - providerReader.connectionPoolTimeout, - providerReader.retries); - } - private void ensureEmpty(ComponentId componentId, Object... objects) { for (Object object : objects) { if (object != null) { @@ -313,10 +251,7 @@ public class DomProviderBuilder extends DomGenericTargetBuilder<Provider> { @Override public String toString() { - return "Node{" + - "host='" + host + '\'' + - ", port=" + port + - '}'; + return "Node{" + "host='" + host + '\'' + ", port=" + port + '}'; } } diff --git a/config-model/src/main/java/com/yahoo/vespa/model/clients/Clients.java b/config-model/src/main/java/com/yahoo/vespa/model/clients/Clients.java index 75c10ea2667..9b33568b61e 100644 --- a/config-model/src/main/java/com/yahoo/vespa/model/clients/Clients.java +++ b/config-model/src/main/java/com/yahoo/vespa/model/clients/Clients.java @@ -22,23 +22,10 @@ import java.util.List; public class Clients extends ConfigModel { private static final long serialVersionUID = 1L; - private List<VespaSpoolerService> vespaSpoolers = new LinkedList<>(); private LoadTypeSet loadTypes = new LoadTypeSet(); - private final AbstractConfigProducer parent; - public Clients(ConfigModelContext modelContext) { super(modelContext); - this.parent = modelContext.getParentProducer(); - } - - public AbstractConfigProducer getConfigProducer() { - return parent; - } - - /** Returns the mutable list of spoolers which is then used to add spoolers */ - public List<VespaSpoolerService> getVespaSpoolers() { - return vespaSpoolers; } public LoadTypeSet getLoadTypes() { diff --git a/config-model/src/main/java/com/yahoo/vespa/model/clients/ContainerDocumentApi.java b/config-model/src/main/java/com/yahoo/vespa/model/clients/ContainerDocumentApi.java index 9801eab9f2b..c2394e7cac3 100644 --- a/config-model/src/main/java/com/yahoo/vespa/model/clients/ContainerDocumentApi.java +++ b/config-model/src/main/java/com/yahoo/vespa/model/clients/ContainerDocumentApi.java @@ -1,29 +1,15 @@ // Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.vespa.model.clients; -import com.yahoo.component.ComponentId; -import com.yahoo.component.ComponentSpecification; -import com.yahoo.component.chain.Phase; -import com.yahoo.component.chain.dependencies.Dependencies; -import com.yahoo.component.chain.model.ChainSpecification; -import com.yahoo.component.chain.model.ChainedComponentModel; import com.yahoo.config.model.producer.AbstractConfigProducer; import com.yahoo.container.bundle.BundleInstantiationSpecification; import com.yahoo.osgi.provider.model.ComponentModel; import com.yahoo.vespa.model.container.ContainerCluster; import com.yahoo.vespa.model.container.component.Handler; -import com.yahoo.vespa.model.container.component.chain.ProcessingHandler; -import com.yahoo.vespa.model.container.search.ContainerSearch; -import com.yahoo.vespa.model.container.search.searchchain.SearchChain; -import com.yahoo.vespa.model.container.search.searchchain.SearchChains; -import com.yahoo.vespa.model.container.search.searchchain.Searcher; import com.yahoo.vespaclient.config.FeederConfig; -import java.util.ArrayList; import java.util.Collection; import java.util.Collections; -import java.util.Set; -import java.util.TreeSet; /** * @author Einar M R Rosenvinge @@ -35,53 +21,14 @@ public class ContainerDocumentApi implements FeederConfig.Producer { public ContainerDocumentApi(ContainerCluster cluster, Options options) { this.options = options; - setupLegacySearchers(cluster); setupHandlers(cluster); } private void setupHandlers(ContainerCluster cluster) { - cluster.addComponent(newVespaClientHandler("com.yahoo.feedhandler.VespaFeedHandler", "feed")); - cluster.addComponent(newVespaClientHandler("com.yahoo.feedhandler.VespaFeedHandlerRemove", "remove")); - cluster.addComponent(newVespaClientHandler("com.yahoo.feedhandler.VespaFeedHandlerRemoveLocation", "removelocation")); - cluster.addComponent(newVespaClientHandler("com.yahoo.feedhandler.VespaFeedHandlerGet", "get")); - cluster.addComponent(newVespaClientHandler("com.yahoo.feedhandler.VespaFeedHandlerVisit", "visit")); cluster.addComponent(newVespaClientHandler("com.yahoo.document.restapi.resource.RestApi", "document/v1/*")); - cluster.addComponent(newVespaClientHandler("com.yahoo.feedhandler.VespaFeedHandlerCompatibility", "document")); - cluster.addComponent(newVespaClientHandler("com.yahoo.feedhandler.VespaFeedHandlerStatus", "feedstatus")); cluster.addComponent(newVespaClientHandler("com.yahoo.vespa.http.server.FeedHandler", ContainerCluster.RESERVED_URI_PREFIX + "/feedapi")); } - private void setupLegacySearchers(ContainerCluster cluster) { - Set<ComponentSpecification> inherited = new TreeSet<>(); - - SearchChain vespaGetChain = new SearchChain(new ChainSpecification(new ComponentId("vespaget"), - new ChainSpecification.Inheritance(inherited, null), new ArrayList<>(), new TreeSet<>())); - vespaGetChain.addInnerComponent(newVespaClientSearcher("com.yahoo.storage.searcher.GetSearcher")); - - SearchChain vespaVisitChain = new SearchChain(new ChainSpecification(new ComponentId("vespavisit"), - new ChainSpecification.Inheritance(inherited, null), new ArrayList<>(), new TreeSet<>())); - vespaVisitChain.addInnerComponent(newVespaClientSearcher("com.yahoo.storage.searcher.VisitSearcher")); - - SearchChains chains; - if (cluster.getSearch() != null) { - chains = cluster.getSearchChains(); - } else { - chains = new SearchChains(cluster, "searchchain"); - } - chains.add(vespaGetChain); - chains.add(vespaVisitChain); - - if (cluster.getSearch() == null) { - ContainerSearch containerSearch = new ContainerSearch(cluster, chains, new ContainerSearch.Options()); - cluster.setSearch(containerSearch); - - ProcessingHandler<SearchChains> searchHandler = new ProcessingHandler<>(chains, - "com.yahoo.search.handler.SearchHandler"); - searchHandler.addServerBindings("http://*/search/*", "https://*/search/*"); - cluster.addComponent(searchHandler); - } - } - private Handler newVespaClientHandler(String componentId, String bindingSuffix) { Handler<AbstractConfigProducer<?>> handler = new Handler<>(new ComponentModel( BundleInstantiationSpecification.getFromStrings(componentId, null, vespaClientBundleSpecification), "")); @@ -93,12 +40,6 @@ public class ContainerDocumentApi implements FeederConfig.Producer { return handler; } - private Searcher newVespaClientSearcher(String componentSpec) { - return new Searcher<>(new ChainedComponentModel( - BundleInstantiationSpecification.getFromStrings(componentSpec, null, vespaClientBundleSpecification), - new Dependencies(null, null, null))); - } - @Override public void getConfig(FeederConfig.Builder builder) { if (options.abortondocumenterror != null) diff --git a/config-model/src/main/java/com/yahoo/vespa/model/clients/VespaSpoolMaster.java b/config-model/src/main/java/com/yahoo/vespa/model/clients/VespaSpoolMaster.java deleted file mode 100644 index 7013a09009a..00000000000 --- a/config-model/src/main/java/com/yahoo/vespa/model/clients/VespaSpoolMaster.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -package com.yahoo.vespa.model.clients; - -import com.yahoo.config.model.producer.AbstractConfigProducer; -import com.yahoo.vespa.model.AbstractService; - -/** - * The spoolmaster program, which is used when multiple spooler instances are used to provide - * multi colo HTTP feeding. - * @author vegardh - * - */ -public class VespaSpoolMaster extends AbstractService { - - public VespaSpoolMaster(AbstractConfigProducer parent, int index) { - super(parent, "spoolmaster."+index); - } - - @Override - public int getPortCount() { - // TODO Auto-generated method stub - return 0; - } - - @Override - public String getStartupCommand() { - return "exec vespa-spoolmaster"; - } -} diff --git a/config-model/src/main/java/com/yahoo/vespa/model/clients/VespaSpooler.java b/config-model/src/main/java/com/yahoo/vespa/model/clients/VespaSpooler.java deleted file mode 100644 index c750a5d2a89..00000000000 --- a/config-model/src/main/java/com/yahoo/vespa/model/clients/VespaSpooler.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -package com.yahoo.vespa.model.clients; - -import com.yahoo.vespa.config.content.spooler.SpoolerConfig; -import com.yahoo.config.subscription.ConfigInstanceUtil; -import com.yahoo.vespaclient.config.FeederConfig; - -/** - * Holds configuration for VespaSpoolers. Actual services use VespaSpoolerService, - * while virtual services can be generated for external spoolers (VespaSpoolerProducer). - * - * @author <a href="mailto:thomasg@yahoo-inc.com">Gunnar Gauslaa Bergem</a> - * @author Vidar Larsen - */ -public class VespaSpooler { - private final SpoolerConfig.Builder spoolConfig; - private final FeederConfig.Builder feederConfig; - - public VespaSpooler(FeederConfig.Builder feederConfig, SpoolerConfig.Builder spoolConfig) { - this.feederConfig = feederConfig; - this.spoolConfig = spoolConfig; - } - - public void getConfig(SpoolerConfig.Builder builder) { - ConfigInstanceUtil.setValues(builder, spoolConfig); - } - - public void getConfig(FeederConfig.Builder builder) { - ConfigInstanceUtil.setValues(builder, feederConfig); - } -} diff --git a/config-model/src/main/java/com/yahoo/vespa/model/clients/VespaSpoolerProducer.java b/config-model/src/main/java/com/yahoo/vespa/model/clients/VespaSpoolerProducer.java deleted file mode 100644 index 3fae5389a94..00000000000 --- a/config-model/src/main/java/com/yahoo/vespa/model/clients/VespaSpoolerProducer.java +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -package com.yahoo.vespa.model.clients; - -import com.yahoo.vespa.config.content.spooler.SpoolerConfig; -import com.yahoo.config.model.producer.AbstractConfigProducer; -import com.yahoo.vespaclient.config.FeederConfig; - -/** - * This model represents a config producer for spooler used for feeding documents to Vespa. - * - * @author <a href="mailto:gunnarga@yahoo-inc.com">Gunnar Gauslaa Bergem</a> - * @author Vidar Larsen - */ -public class VespaSpoolerProducer extends AbstractConfigProducer implements SpoolerConfig.Producer, FeederConfig.Producer { - private static final long serialVersionUID = 1L; - private VespaSpooler spoolerConfig; - - public VespaSpoolerProducer(AbstractConfigProducer parent, String configId, VespaSpooler spooler) { - super(parent, configId); - spoolerConfig = spooler; - } - - @Override - public void getConfig(SpoolerConfig.Builder builder) { - spoolerConfig.getConfig(builder); - } - - @Override - public void getConfig(FeederConfig.Builder builder) { - spoolerConfig.getConfig(builder); - } -} diff --git a/config-model/src/main/java/com/yahoo/vespa/model/clients/VespaSpoolerService.java b/config-model/src/main/java/com/yahoo/vespa/model/clients/VespaSpoolerService.java deleted file mode 100644 index 378c85dc325..00000000000 --- a/config-model/src/main/java/com/yahoo/vespa/model/clients/VespaSpoolerService.java +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -package com.yahoo.vespa.model.clients; - -import com.yahoo.vespa.config.content.spooler.SpoolerConfig; -import com.yahoo.config.model.producer.AbstractConfigProducer; -import com.yahoo.vespa.model.AbstractService; -import com.yahoo.vespaclient.config.FeederConfig; - -/** - * This model represents a spooler used for feeding documents to Vespa. - * - * @author <a href="mailto:gunnarga@yahoo-inc.com">Gunnar Gauslaa Bergem</a> - * @author Vidar Larsen - */ -public class VespaSpoolerService extends AbstractService implements SpoolerConfig.Producer, FeederConfig.Producer { - private static final long serialVersionUID = 1L; - private VespaSpooler spooler; - - public VespaSpoolerService(AbstractConfigProducer parent, int index, VespaSpooler spooler) { - super(parent, "spooler." + index); - this.spooler = spooler; - } - - public int getPortCount() { - return 0; - } - - public String getStartupCommand() { - return "exec vespaspooler "+ getJvmOptions(); - } - - @Override - public void getConfig(SpoolerConfig.Builder builder) { - spooler.getConfig(builder); - } - - @Override - public void getConfig(FeederConfig.Builder builder) { - spooler.getConfig(builder); - } -} diff --git a/config-model/src/main/java/com/yahoo/vespa/model/container/ContainerCluster.java b/config-model/src/main/java/com/yahoo/vespa/model/container/ContainerCluster.java index 8d46eb3718f..b90f18d4f24 100755 --- a/config-model/src/main/java/com/yahoo/vespa/model/container/ContainerCluster.java +++ b/config-model/src/main/java/com/yahoo/vespa/model/container/ContainerCluster.java @@ -26,7 +26,6 @@ import com.yahoo.container.handler.ThreadpoolConfig; import com.yahoo.container.jdisc.ContainerMbusConfig; import com.yahoo.container.jdisc.JdiscBindingsConfig; import com.yahoo.container.jdisc.config.HealthMonitorConfig; -import com.yahoo.container.jdisc.config.MetricDefaultsConfig; import com.yahoo.container.jdisc.jrt.DefaultJrtFactory; import com.yahoo.container.jdisc.messagebus.MbusServerProvider; import com.yahoo.container.jdisc.state.StateHandler; @@ -117,7 +116,6 @@ public final class ContainerCluster PageTemplatesConfig.Producer, SemanticRulesConfig.Producer, DocprocConfig.Producer, - MetricDefaultsConfig.Producer, ClusterInfoConfig.Producer, ServletPathsConfig.Producer, RoutingProviderConfig.Producer, @@ -140,7 +138,7 @@ public final class ContainerCluster public static final String BINDINGS_OVERVIEW_HANDLER_CLASS = BindingsOverviewHandler.class.getName(); public static final String STATE_HANDLER_CLASS = "com.yahoo.container.jdisc.state.StateHandler"; public static final String STATISTICS_HANDLER_CLASS = "com.yahoo.container.config.StatisticsRequestHandler"; - public static final String SIMPLE_LINGUISTICS_PROVIDER = "com.yahoo.language.provider.SimpleLinguisticsProvider"; + public static final String DEFAULT_LINGUISTICS_PROVIDER = "com.yahoo.language.provider.DefaultLinguisticsProvider"; public static final String CMS = "-XX:+UseConcMarkSweepGC -XX:MaxTenuringThreshold=15 -XX:NewRatio=1"; public static final String G1GC = "-XX:+UseG1GC -XX:MaxTenuringThreshold=15"; @@ -176,7 +174,6 @@ public final class ContainerCluster private final boolean isHostedVespa; private Map<String, String> concreteDocumentTypes = new LinkedHashMap<>(); - private MetricDefaultsConfig.Factory.Enum defaultMetricConsumerFactory; private ApplicationMetaData applicationMetaData = null; @@ -221,7 +218,7 @@ public final class ContainerCluster addSimpleComponent(ThreadPoolProvider.class); addSimpleComponent(com.yahoo.concurrent.classlock.ClassLocking.class); addSimpleComponent("com.yahoo.jdisc.http.filter.SecurityFilterInvoker"); - addSimpleComponent(SIMPLE_LINGUISTICS_PROVIDER); + addSimpleComponent(DEFAULT_LINGUISTICS_PROVIDER); addSimpleComponent("com.yahoo.container.jdisc.SecretStoreProvider"); addSimpleComponent("com.yahoo.container.jdisc.CertificateStoreProvider"); addSimpleComponent("com.yahoo.container.jdisc.metric.MetricConsumerProviderProvider"); @@ -232,7 +229,6 @@ public final class ContainerCluster addSimpleComponent(com.yahoo.metrics.simple.jdisc.JdiscMetricsFactory.class.getName(), null, MetricProperties.BUNDLE_SYMBOLIC_NAME); addSimpleComponent("com.yahoo.container.jdisc.state.StateMonitor"); addSimpleComponent("com.yahoo.container.jdisc.ContainerThreadFactory"); - addSimpleComponent("com.yahoo.container.protect.FreezeDetector"); addSimpleComponent("com.yahoo.container.handler.VipStatus"); addSimpleComponent(com.yahoo.container.handler.ClustersStatus.class.getName()); addSimpleComponent(DefaultJrtFactory.class); @@ -294,7 +290,6 @@ public final class ContainerCluster private void addJaxProviders() { addSimpleComponent(com.yahoo.container.xml.providers.DatatypeFactoryProvider.class); addSimpleComponent(com.yahoo.container.xml.providers.DocumentBuilderFactoryProvider.class); - addSimpleComponent(com.yahoo.container.xml.providers.JAXBContextFactoryProvider.class); addSimpleComponent(com.yahoo.container.xml.providers.SAXParserFactoryProvider.class); addSimpleComponent(com.yahoo.container.xml.providers.SchemaFactoryProvider.class); addSimpleComponent(com.yahoo.container.xml.providers.TransformerFactoryProvider.class); @@ -631,9 +626,6 @@ public final class ContainerCluster } else if (isHostedVespa()) { jvmBuilder.heapSizeAsPercentageOfPhysicalMemory(getHostClusterId().isPresent() ? 17 : 60); } - if (containerSearch!=null) { - jvmBuilder.directMemorySizeCache(containerSearch.totalCacheSizeMb()); - } if (jvmGCOptions != null) { jvmBuilder.gcopts(jvmGCOptions); } else { @@ -710,7 +702,7 @@ public final class ContainerCluster } public void addDefaultSearchAccessLog() { - addComponent(new AccessLogComponent(AccessLogComponent.AccessLogType.queryAccessLog, getName(), isHostedVespa)); + addComponent(new AccessLogComponent(AccessLogComponent.AccessLogType.jsonAccessLog, getName(), isHostedVespa)); } @Override @@ -723,11 +715,6 @@ public final class ContainerCluster } @Override - public void getConfig(MetricDefaultsConfig.Builder builder) { - if (defaultMetricConsumerFactory != null) builder.factory(defaultMetricConsumerFactory); - } - - @Override public void getConfig(ClusterInfoConfig.Builder builder) { builder.clusterId(name); builder.nodeCount(containers.size()); @@ -764,11 +751,6 @@ public final class ContainerCluster return builders; } - public void setDefaultMetricConsumerFactory(MetricDefaultsConfig.Factory.Enum defaultMetricConsumerFactory) { - Objects.requireNonNull(defaultMetricConsumerFactory, "defaultMetricConsumerFactory"); - this.defaultMetricConsumerFactory = defaultMetricConsumerFactory; - } - public boolean isHostedVespa() { return isHostedVespa; } diff --git a/config-model/src/main/java/com/yahoo/vespa/model/container/component/AccessLogComponent.java b/config-model/src/main/java/com/yahoo/vespa/model/container/component/AccessLogComponent.java index d9cb43c1850..009aa454ab3 100644 --- a/config-model/src/main/java/com/yahoo/vespa/model/container/component/AccessLogComponent.java +++ b/config-model/src/main/java/com/yahoo/vespa/model/container/component/AccessLogComponent.java @@ -8,8 +8,6 @@ import com.yahoo.container.logging.JSONAccessLog; import com.yahoo.osgi.provider.model.ComponentModel; import edu.umd.cs.findbugs.annotations.Nullable; -import static com.yahoo.container.core.AccessLogConfig.FileHandler.RotateScheme; - /** * @author Tony Vaagenes * @author gjoranv @@ -20,7 +18,6 @@ public final class AccessLogComponent extends SimpleComponent implements AccessL private final String fileNamePattern; private final String rotationInterval; - private final RotateScheme.Enum rotationScheme; private final Boolean compression; private final boolean isHostedVespa; private final String symlinkName; @@ -29,7 +26,7 @@ public final class AccessLogComponent extends SimpleComponent implements AccessL { this(logType, String.format("logs/vespa/qrs/%s.%s.%s", capitalize(logType.name()), clusterName, "%Y%m%d%H%M%S"), - null, null, null, isHostedVespa, + null, null, isHostedVespa, capitalize(logType.name()) + "." + clusterName); } @@ -40,7 +37,6 @@ public final class AccessLogComponent extends SimpleComponent implements AccessL public AccessLogComponent(AccessLogType logType, String fileNamePattern, String rotationInterval, - RotateScheme.Enum rotationScheme, Boolean compressOnRotation, boolean isHostedVespa, String symlinkName) @@ -48,7 +44,6 @@ public final class AccessLogComponent extends SimpleComponent implements AccessL super(new ComponentModel(accessLogClass(logType), null, "container-core", null)); this.fileNamePattern = fileNamePattern; this.rotationInterval = rotationInterval; - this.rotationScheme = rotationScheme; this.compression = compressOnRotation; this.isHostedVespa = isHostedVespa; this.symlinkName = symlinkName; @@ -81,8 +76,6 @@ public final class AccessLogComponent extends SimpleComponent implements AccessL builder.pattern(fileNamePattern); if (rotationInterval != null) builder.rotation(rotationInterval); - if (rotationScheme != null) - builder.rotateScheme(rotationScheme); if (symlinkName != null) builder.symlink(symlinkName); if (compression != null) { @@ -97,18 +90,4 @@ public final class AccessLogComponent extends SimpleComponent implements AccessL public String getFileNamePattern() { return fileNamePattern; } - - public static final RotateScheme.Enum rotateScheme(@Nullable String name) { - if (name == null) - return null; - - switch (name) { - case "date": - return RotateScheme.Enum.DATE; - case "sequence": - return RotateScheme.Enum.SEQUENCE; - default: - throw new IllegalArgumentException("Invalid rotation scheme " + name); - } - } } diff --git a/config-model/src/main/java/com/yahoo/vespa/model/container/http/ConnectorFactory.java b/config-model/src/main/java/com/yahoo/vespa/model/container/http/ConnectorFactory.java index a9d3ec0e5a2..73fc9c0cf41 100644 --- a/config-model/src/main/java/com/yahoo/vespa/model/container/http/ConnectorFactory.java +++ b/config-model/src/main/java/com/yahoo/vespa/model/container/http/ConnectorFactory.java @@ -5,13 +5,10 @@ import com.yahoo.component.ComponentId; import com.yahoo.container.bundle.BundleInstantiationSpecification; import com.yahoo.jdisc.http.ConnectorConfig; import com.yahoo.osgi.provider.model.ComponentModel; -import com.yahoo.text.XML; import com.yahoo.vespa.model.container.component.SimpleComponent; -import com.yahoo.vespa.model.container.http.ssl.LegacySslProvider; -import org.w3c.dom.Element; +import com.yahoo.vespa.model.container.http.ssl.DummySslProvider; import static com.yahoo.component.ComponentSpecification.fromString; -import static com.yahoo.jdisc.http.ConnectorConfig.Ssl.KeyStoreType; /** * @author Einar M R Rosenvinge @@ -22,16 +19,14 @@ public class ConnectorFactory extends SimpleComponent implements ConnectorConfig private final String name; private final int listenPort; - private final Element legacyConfig; private final SimpleComponent sslProviderComponent; public ConnectorFactory(String name, int listenPort) { - this(name, listenPort, null, new LegacySslProvider(name)); + this(name, listenPort, new DummySslProvider(name)); } public ConnectorFactory(String name, int listenPort, - Element legacyConfig, SimpleComponent sslProviderComponent) { super(new ComponentModel( new BundleInstantiationSpecification(new ComponentId(name), @@ -39,7 +34,6 @@ public class ConnectorFactory extends SimpleComponent implements ConnectorConfig fromString("jdisc_http_service")))); this.name = name; this.listenPort = listenPort; - this.legacyConfig = legacyConfig; this.sslProviderComponent = sslProviderComponent; addChild(sslProviderComponent); inject(sslProviderComponent); @@ -47,7 +41,6 @@ public class ConnectorFactory extends SimpleComponent implements ConnectorConfig @Override public void getConfig(ConnectorConfig.Builder connectorBuilder) { - configureWithLegacyHttpConfig(legacyConfig, connectorBuilder); connectorBuilder.listenPort(listenPort); connectorBuilder.name(name); ((ConnectorConfig.Producer)sslProviderComponent).getConfig(connectorBuilder); @@ -61,97 +54,4 @@ public class ConnectorFactory extends SimpleComponent implements ConnectorConfig return listenPort; } - // TODO Remove support for legacy config in Vespa 7 - @Deprecated - private static void configureWithLegacyHttpConfig(Element legacyConfig, ConnectorConfig.Builder connectorBuilder) { - if (legacyConfig != null) { - { - Element tcpKeepAliveEnabled = XML.getChild(legacyConfig, "tcpKeepAliveEnabled"); - if (tcpKeepAliveEnabled != null) { - connectorBuilder.tcpKeepAliveEnabled(Boolean.valueOf(XML.getValue(tcpKeepAliveEnabled).trim())); - } - } - { - Element tcpNoDelayEnabled = XML.getChild(legacyConfig, "tcpNoDelayEnabled"); - if (tcpNoDelayEnabled != null) { - connectorBuilder.tcpNoDelay(Boolean.valueOf(XML.getValue(tcpNoDelayEnabled).trim())); - } - } - { - Element tcpListenBacklogLength = XML.getChild(legacyConfig, "tcpListenBacklogLength"); - if (tcpListenBacklogLength != null) { - connectorBuilder.acceptQueueSize(Integer.parseInt(XML.getValue(tcpListenBacklogLength).trim())); - } - } - { - Element idleConnectionTimeout = XML.getChild(legacyConfig, "idleConnectionTimeout"); - if (idleConnectionTimeout != null) { - connectorBuilder.idleTimeout(Double.parseDouble(XML.getValue(idleConnectionTimeout).trim())); - } - } - { - Element soLinger = XML.getChild(legacyConfig, "soLinger"); - if (soLinger != null) { - - connectorBuilder.soLingerTime(Double.parseDouble(XML.getValue(soLinger).trim())); - } - } - { - Element sendBufferSize = XML.getChild(legacyConfig, "sendBufferSize"); - if (sendBufferSize != null) { - connectorBuilder.outputBufferSize(Integer.parseInt(XML.getValue(sendBufferSize).trim())); - } - } - { - Element maxHeaderSize = XML.getChild(legacyConfig, "maxHeaderSize"); - if (maxHeaderSize != null) { - connectorBuilder.headerCacheSize(Integer.parseInt(XML.getValue(maxHeaderSize).trim())); - } - } - - Element ssl = XML.getChild(legacyConfig, "ssl"); - Element sslEnabled = XML.getChild(ssl, "enabled"); - if (ssl != null && sslEnabled != null && Boolean.parseBoolean(XML.getValue(sslEnabled).trim())) { - ConnectorConfig.Ssl.Builder sslBuilder = new ConnectorConfig.Ssl.Builder(); - sslBuilder.enabled(true); - { - Element keyStoreType = XML.getChild(ssl, "keyStoreType"); - if (keyStoreType != null) { - sslBuilder.keyStoreType(KeyStoreType.Enum.valueOf(XML.getValue(keyStoreType).trim())); - } - } - { - Element keyStorePath = XML.getChild(ssl, "keyStorePath"); - if (keyStorePath != null) { - sslBuilder.keyStorePath(XML.getValue(keyStorePath).trim()); - } - } - { - Element trustStorePath = XML.getChild(ssl, "trustStorePath"); - if (trustStorePath != null) { - sslBuilder.trustStorePath(XML.getValue(trustStorePath).trim()); - } - } - { - Element keyDBKey = XML.getChild(ssl, "keyDBKey"); - if (keyDBKey != null) { - sslBuilder.keyDbKey(XML.getValue(keyDBKey).trim()); - } - } - { - Element algorithm = XML.getChild(ssl, "algorithm"); - if (algorithm != null) { - sslBuilder.sslKeyManagerFactoryAlgorithm(XML.getValue(algorithm).trim()); - } - } - { - Element protocol = XML.getChild(ssl, "protocol"); - if (protocol != null) { - sslBuilder.protocol(XML.getValue(protocol).trim()); - } - } - connectorBuilder.ssl(sslBuilder); - } - } - } } diff --git a/config-model/src/main/java/com/yahoo/vespa/model/container/http/Http.java b/config-model/src/main/java/com/yahoo/vespa/model/container/http/Http.java index 4eed3628bfd..9e85a889075 100644 --- a/config-model/src/main/java/com/yahoo/vespa/model/container/http/Http.java +++ b/config-model/src/main/java/com/yahoo/vespa/model/container/http/Http.java @@ -4,7 +4,6 @@ package com.yahoo.vespa.model.container.http; import com.yahoo.component.ComponentSpecification; import com.yahoo.component.provider.ComponentRegistry; import com.yahoo.config.model.producer.AbstractConfigProducer; -import com.yahoo.container.jdisc.config.HttpServerConfig; import com.yahoo.jdisc.http.ServerConfig; import com.yahoo.vespa.model.container.component.chain.Chain; import com.yahoo.vespa.model.container.component.chain.ChainedComponent; @@ -19,8 +18,7 @@ import java.util.Optional; * * @author Tony Vaagenes */ -public class Http extends AbstractConfigProducer<AbstractConfigProducer<?>> - implements HttpServerConfig.Producer, ServerConfig.Producer { +public class Http extends AbstractConfigProducer<AbstractConfigProducer<?>> implements ServerConfig.Producer { public static class Binding { public final ComponentSpecification filterId; @@ -89,12 +87,6 @@ public class Http extends AbstractConfigProducer<AbstractConfigProducer<?>> } @Override - public void getConfig(HttpServerConfig.Builder builder) { - for (Binding binding: bindings) - builder.filter(filterBindings(binding)); - } - - @Override public void getConfig(ServerConfig.Builder builder) { for (final Binding binding : bindings) { builder.filter( @@ -104,14 +96,6 @@ public class Http extends AbstractConfigProducer<AbstractConfigProducer<?>> } } - static HttpServerConfig.Filter.Builder filterBindings(Binding binding) { - HttpServerConfig.Filter.Builder builder = new HttpServerConfig.Filter.Builder(); - builder.id(binding.filterId.stringValue()). - binding(binding.binding); - return builder; - } - - @Override public void validate() throws Exception { validate(bindings); diff --git a/config-model/src/main/java/com/yahoo/vespa/model/container/http/ssl/LegacySslProvider.java b/config-model/src/main/java/com/yahoo/vespa/model/container/http/ssl/DummySslProvider.java index 7ab553c45b9..4e2ee61f33f 100644 --- a/config-model/src/main/java/com/yahoo/vespa/model/container/http/ssl/LegacySslProvider.java +++ b/config-model/src/main/java/com/yahoo/vespa/model/container/http/ssl/DummySslProvider.java @@ -4,25 +4,22 @@ package com.yahoo.vespa.model.container.http.ssl; import com.yahoo.component.ComponentId; import com.yahoo.container.bundle.BundleInstantiationSpecification; import com.yahoo.jdisc.http.ConnectorConfig; -import com.yahoo.jdisc.http.ssl.SslContextFactoryProvider; -import com.yahoo.jdisc.http.ssl.impl.LegacySslContextFactoryProvider; +import com.yahoo.jdisc.http.ssl.ThrowingSslContextFactoryProvider; import com.yahoo.osgi.provider.model.ComponentModel; import com.yahoo.vespa.model.container.component.SimpleComponent; import static com.yahoo.component.ComponentSpecification.fromString; /** - * Provides a legacy implementation of {@link SslContextFactoryProvider} to be injected into non-ssl connectors and connectors using legacy ssl config override - * * @author bjorncs */ -public class LegacySslProvider extends SimpleComponent implements ConnectorConfig.Producer { +public class DummySslProvider extends SimpleComponent implements ConnectorConfig.Producer { - public static final String COMPONENT_ID_PREFIX = "legacy-ssl-provider@"; - public static final String COMPONENT_CLASS = LegacySslContextFactoryProvider.class.getName(); + public static final String COMPONENT_ID_PREFIX = "dummy-ssl-provider@"; + public static final String COMPONENT_CLASS = ThrowingSslContextFactoryProvider.class.getName(); public static final String COMPONENT_BUNDLE = "jdisc_http_service"; - public LegacySslProvider(String serverName) { + public DummySslProvider(String serverName) { super(new ComponentModel( new BundleInstantiationSpecification(new ComponentId(COMPONENT_ID_PREFIX + serverName), fromString(COMPONENT_CLASS), @@ -30,7 +27,5 @@ public class LegacySslProvider extends SimpleComponent implements ConnectorConfi } @Override - public void getConfig(ConnectorConfig.Builder builder) { - - } -} + public void getConfig(ConnectorConfig.Builder builder) {} +}
\ No newline at end of file diff --git a/config-model/src/main/java/com/yahoo/vespa/model/container/http/xml/JettyConnectorBuilder.java b/config-model/src/main/java/com/yahoo/vespa/model/container/http/xml/JettyConnectorBuilder.java index 02840ff380b..4c41aaa504c 100644 --- a/config-model/src/main/java/com/yahoo/vespa/model/container/http/xml/JettyConnectorBuilder.java +++ b/config-model/src/main/java/com/yahoo/vespa/model/container/http/xml/JettyConnectorBuilder.java @@ -10,37 +10,24 @@ import com.yahoo.vespa.model.container.component.SimpleComponent; import com.yahoo.vespa.model.container.http.ConnectorFactory; import com.yahoo.vespa.model.container.http.ssl.CustomSslProvider; import com.yahoo.vespa.model.container.http.ssl.DefaultSslProvider; -import com.yahoo.vespa.model.container.http.ssl.LegacySslProvider; +import com.yahoo.vespa.model.container.http.ssl.DummySslProvider; import org.w3c.dom.Element; import java.util.Optional; -import java.util.logging.Level; -import java.util.logging.Logger; /** * @author Einar M R Rosenvinge * @author mortent */ public class JettyConnectorBuilder extends VespaDomBuilder.DomConfigProducerBuilder<ConnectorFactory> { - private static final Logger log = Logger.getLogger(JettyConnectorBuilder.class.getName()); @Override protected ConnectorFactory doBuild(DeployState deployState, AbstractConfigProducer ancestor, Element serverSpec) { String name = XmlHelper.getIdString(serverSpec); int port = HttpBuilder.readPort(serverSpec, deployState.isHosted(), deployState.getDeployLogger()); - Element legacyServerConfig = XML.getChild(serverSpec, "config"); - if (legacyServerConfig != null) { - String configName = legacyServerConfig.getAttribute("name"); - if (configName.equals("container.jdisc.config.http-server")) { - deployState.getDeployLogger().log(Level.WARNING, "The config 'container.jdisc.config.http-server' is deprecated and will be removed in a later version of Vespa." - + " Please use 'jdisc.http.connector' instead, see http://docs.vespa.ai/documentation/jdisc/http-server-and-filters.html#configuring-jetty-server"); - } else { - legacyServerConfig = null; - } - } SimpleComponent sslProviderComponent = getSslConfigComponents(name, serverSpec); - return new ConnectorFactory(name, port, legacyServerConfig, sslProviderComponent); + return new ConnectorFactory(name, port, sslProviderComponent); } SimpleComponent getSslConfigComponents(String serverName, Element serverSpec) { @@ -63,7 +50,7 @@ public class JettyConnectorBuilder extends VespaDomBuilder.DomConfigProducerBuil String bundle = sslProviderConfigurator.getAttribute("bundle"); return new CustomSslProvider(serverName, className, bundle); } else { - return new LegacySslProvider(serverName); + return new DummySslProvider(serverName); } } } diff --git a/config-model/src/main/java/com/yahoo/vespa/model/container/search/ContainerSearch.java b/config-model/src/main/java/com/yahoo/vespa/model/container/search/ContainerSearch.java index 3a7b7864554..6c537e359d1 100644 --- a/config-model/src/main/java/com/yahoo/vespa/model/container/search/ContainerSearch.java +++ b/config-model/src/main/java/com/yahoo/vespa/model/container/search/ContainerSearch.java @@ -8,7 +8,6 @@ import com.yahoo.prelude.semantics.SemanticRulesConfig; import com.yahoo.vespa.model.container.ContainerCluster; import com.yahoo.vespa.model.container.component.Component; import com.yahoo.vespa.model.container.component.ContainerSubsystem; -import com.yahoo.vespa.model.container.search.searchchain.HttpProvider; import com.yahoo.vespa.model.container.search.searchchain.LocalProvider; import com.yahoo.vespa.model.container.search.searchchain.SearchChains; import com.yahoo.search.config.IndexInfoConfig; @@ -110,18 +109,6 @@ public class ContainerSearch extends ContainerSubsystem<SearchChains> if (pageTemplates!=null) pageTemplates.getConfig(builder); } - public int totalCacheSizeMb() { - return totalHttpProviderCacheSize(); - } - - private int totalHttpProviderCacheSize() { - int totalCacheSizeMb = 0; - for (HttpProvider provider: getChains().httpProviders()) - totalCacheSizeMb += provider.cacheSizeMB(); - - return totalCacheSizeMb; - } - @Override public void getConfig(IndexInfoConfig.Builder builder) { for (AbstractSearchCluster sc : systems) { diff --git a/config-model/src/main/java/com/yahoo/vespa/model/container/search/searchchain/GenericProvider.java b/config-model/src/main/java/com/yahoo/vespa/model/container/search/searchchain/GenericProvider.java new file mode 100644 index 00000000000..a82d2da2a6b --- /dev/null +++ b/config-model/src/main/java/com/yahoo/vespa/model/container/search/searchchain/GenericProvider.java @@ -0,0 +1,27 @@ +// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +package com.yahoo.vespa.model.container.search.searchchain; + +import com.yahoo.component.chain.model.ChainSpecification; +import com.yahoo.search.federation.ProviderConfig; +import com.yahoo.search.searchchain.model.federation.FederationOptions; + +/** + * A generic provider, used when no type is given. + * + * @author Tony Vaagenes + */ +public class GenericProvider extends Provider implements ProviderConfig.Producer { + + /* + * Config producer for the contained http searcher.. + */ + @SuppressWarnings("deprecation") + public GenericProvider(ChainSpecification specWithoutInnerSearchers, FederationOptions federationOptions) { + super(specWithoutInnerSearchers, federationOptions); + } + + @Override + public void getConfig(ProviderConfig.Builder builder) { + } + +} diff --git a/config-model/src/main/java/com/yahoo/vespa/model/container/search/searchchain/HttpProvider.java b/config-model/src/main/java/com/yahoo/vespa/model/container/search/searchchain/HttpProvider.java deleted file mode 100644 index 62b2f2ccbc6..00000000000 --- a/config-model/src/main/java/com/yahoo/vespa/model/container/search/searchchain/HttpProvider.java +++ /dev/null @@ -1,102 +0,0 @@ -// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -package com.yahoo.vespa.model.container.search.searchchain; - -import com.yahoo.binaryprefix.BinaryPrefix; -import com.yahoo.binaryprefix.BinaryScaledAmount; -import com.yahoo.component.chain.model.ChainSpecification; -import com.yahoo.search.cache.QrBinaryCacheConfig; -import com.yahoo.search.cache.QrBinaryCacheRegionConfig; -import com.yahoo.search.federation.ProviderConfig; -import com.yahoo.search.searchchain.model.federation.FederationOptions; - -import java.util.ArrayList; -import java.util.List; - -import static com.yahoo.search.federation.ProviderConfig.Node; -import static com.yahoo.search.federation.ProviderConfig.Yca; - - -/** - * A provider containing a http searcher. - * - * @author Tony Vaagenes - */ -public class HttpProvider extends Provider implements ProviderConfig.Producer, - QrBinaryCacheConfig.Producer, - QrBinaryCacheRegionConfig.Producer { - - @SuppressWarnings("deprecation") - private final com.yahoo.search.searchchain.model.federation.HttpProviderSpec providerSpec; - - /* - * Config producer for the contained http searcher.. - */ - @SuppressWarnings("deprecation") - public HttpProvider(ChainSpecification specWithoutInnerSearchers, FederationOptions federationOptions, com.yahoo.search.searchchain.model.federation.HttpProviderSpec providerSpec) { - super(specWithoutInnerSearchers, federationOptions); - this.providerSpec = providerSpec; - } - - @Override - public void getConfig(ProviderConfig.Builder builder) { - if (providerSpec.path != null) - builder.path(providerSpec.path); - if (providerSpec.connectionParameters.readTimeout != null) - builder.readTimeout(providerSpec.connectionParameters.readTimeout ); - if (providerSpec.connectionParameters.connectionTimeout != null) - builder.connectionTimeout(providerSpec.connectionParameters.connectionTimeout); - if (providerSpec.connectionParameters.connectionPoolTimeout != null) - builder.connectionPoolTimeout(providerSpec.connectionParameters.connectionPoolTimeout); - if (providerSpec.connectionParameters.retries != null) - builder.retries(providerSpec.connectionParameters.retries); - - builder.node(getNodes(providerSpec.nodes)); - - if (providerSpec.ycaApplicationId != null) { - builder.yca(getCertificate(providerSpec)); - } - } - - @SuppressWarnings("deprecation") - private static Yca.Builder getCertificate(com.yahoo.search.searchchain.model.federation.HttpProviderSpec providerSpec) { - Yca.Builder certificate = new Yca.Builder() - .applicationId(providerSpec.ycaApplicationId); - - if (providerSpec.ycaProxy != null) { - certificate.useProxy(true); - if (providerSpec.ycaProxy.host != null) { - certificate.host(providerSpec.ycaProxy.host) - .port(providerSpec.ycaProxy.port); - } - } - if (providerSpec.ycaCertificateTtl != null) certificate.ttl(providerSpec.ycaCertificateTtl); - if (providerSpec.ycaRetryWait != null) certificate.ttl(providerSpec.ycaRetryWait); - return certificate; - } - - @SuppressWarnings("deprecation") - private static List<Node.Builder> getNodes(List<com.yahoo.search.searchchain.model.federation.HttpProviderSpec.Node> nodeSpecs) { - ArrayList<Node.Builder> nodes = new ArrayList<>(); - for (com.yahoo.search.searchchain.model.federation.HttpProviderSpec.Node node : nodeSpecs) { - nodes.add( - new Node.Builder() - .host(node.host) - .port(node.port)); - } - return nodes; - } - - public int cacheSizeMB() { - return providerSpec.cacheSizeMB != null ? providerSpec.cacheSizeMB : 0; - } - - @Override - public void getConfig(QrBinaryCacheConfig.Builder builder) { - builder.cache_size(cacheSizeMB()); - } - - @Override - public void getConfig(QrBinaryCacheRegionConfig.Builder builder) { - builder.region_size(cacheSizeMB()); - } -} diff --git a/config-model/src/main/java/com/yahoo/vespa/model/container/search/searchchain/HttpProviderSearcher.java b/config-model/src/main/java/com/yahoo/vespa/model/container/search/searchchain/HttpProviderSearcher.java deleted file mode 100644 index 8c74496c895..00000000000 --- a/config-model/src/main/java/com/yahoo/vespa/model/container/search/searchchain/HttpProviderSearcher.java +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -package com.yahoo.vespa.model.container.search.searchchain; - -import com.yahoo.component.chain.model.ChainedComponentModel; - -/** - * @author Tony Vaagenes - * @deprecated - */ -// TODO: Remove on Vespa 7 -@Deprecated -public class HttpProviderSearcher extends Searcher<ChainedComponentModel> { - - public HttpProviderSearcher(ChainedComponentModel model) { - super(model); - } - - -} diff --git a/config-model/src/main/java/com/yahoo/vespa/model/container/search/searchchain/SearchChains.java b/config-model/src/main/java/com/yahoo/vespa/model/container/search/searchchain/SearchChains.java index 42d81e19496..24ff885f131 100644 --- a/config-model/src/main/java/com/yahoo/vespa/model/container/search/searchchain/SearchChains.java +++ b/config-model/src/main/java/com/yahoo/vespa/model/container/search/searchchain/SearchChains.java @@ -74,11 +74,6 @@ public class SearchChains extends Chains<SearchChain> { return CollectionUtil.filter(allChains().allComponents(), LocalProvider.class); } - - public Collection<HttpProvider> httpProviders() { - return CollectionUtil.filter(allChains().allComponents(), HttpProvider.class); - } - /* * If searchChain is a provider, its sources must already have been attached. */ diff --git a/config-model/src/main/java/com/yahoo/vespa/model/container/xml/AccessLogBuilder.java b/config-model/src/main/java/com/yahoo/vespa/model/container/xml/AccessLogBuilder.java index ddea1a189bc..0eb34ead7bf 100644 --- a/config-model/src/main/java/com/yahoo/vespa/model/container/xml/AccessLogBuilder.java +++ b/config-model/src/main/java/com/yahoo/vespa/model/container/xml/AccessLogBuilder.java @@ -59,7 +59,6 @@ public class AccessLogBuilder { accessLogType, fileNamePattern(spec), rotationInterval(spec), - rotationScheme(spec), compressOnRotation(spec), isHostedVespa, symlinkName(spec)); @@ -74,10 +73,6 @@ public class AccessLogBuilder { return (compress.isEmpty() ? null : Boolean.parseBoolean(compress)); } - private AccessLogConfig.FileHandler.RotateScheme.Enum rotationScheme(Element spec) { - return AccessLogComponent.rotateScheme(nullIfEmpty(spec.getAttribute("rotationScheme"))); - } - private String rotationInterval(Element spec) { return nullIfEmpty(spec.getAttribute("rotationInterval")); } @@ -106,7 +101,7 @@ public class AccessLogBuilder { AccessLogTypeLiteral typeLiteral = getOptionalAttribute(accessLogSpec, "type"). map(AccessLogTypeLiteral::fromAttributeValue). - orElse(AccessLogTypeLiteral.VESPA); + orElse(AccessLogTypeLiteral.JSON); AccessLogType logType = logTypeFor(typeLiteral); if (logType == null) { return Optional.empty(); diff --git a/config-model/src/main/java/com/yahoo/vespa/model/container/xml/BundleMapper.java b/config-model/src/main/java/com/yahoo/vespa/model/container/xml/BundleMapper.java index 13dfc3ae745..11d467a61d5 100644 --- a/config-model/src/main/java/com/yahoo/vespa/model/container/xml/BundleMapper.java +++ b/config-model/src/main/java/com/yahoo/vespa/model/container/xml/BundleMapper.java @@ -57,7 +57,6 @@ public class BundleMapper { bundleFromClass.put("com.yahoo.prelude.fastsearch.VespaBackEndSearcher", searchAndDocprocBundle); bundleFromClass.put("com.yahoo.prelude.querytransform.CJKSearcher", searchAndDocprocBundle); bundleFromClass.put("com.yahoo.prelude.querytransform.CollapsePhraseSearcher", searchAndDocprocBundle); - bundleFromClass.put("com.yahoo.prelude.querytransform.IndexCombinatorSearcher", searchAndDocprocBundle); bundleFromClass.put("com.yahoo.prelude.querytransform.LiteralBoostSearcher", searchAndDocprocBundle); bundleFromClass.put("com.yahoo.prelude.querytransform.NoRankingSearcher", searchAndDocprocBundle); bundleFromClass.put("com.yahoo.prelude.querytransform.NonPhrasingSearcher", searchAndDocprocBundle); @@ -66,15 +65,12 @@ public class BundleMapper { bundleFromClass.put("com.yahoo.prelude.querytransform.RecallSearcher", searchAndDocprocBundle); bundleFromClass.put("com.yahoo.prelude.querytransform.StemmingSearcher", searchAndDocprocBundle); bundleFromClass.put("com.yahoo.prelude.searcher.BlendingSearcher", searchAndDocprocBundle); - bundleFromClass.put("com.yahoo.prelude.searcher.DocumentSourceSearcher", searchAndDocprocBundle); bundleFromClass.put("com.yahoo.prelude.searcher.FieldCollapsingSearcher", searchAndDocprocBundle); bundleFromClass.put("com.yahoo.prelude.searcher.FillSearcher", searchAndDocprocBundle); bundleFromClass.put("com.yahoo.prelude.searcher.JSONDebugSearcher", searchAndDocprocBundle); bundleFromClass.put("com.yahoo.prelude.searcher.JuniperSearcher", searchAndDocprocBundle); bundleFromClass.put("com.yahoo.prelude.searcher.MultipleResultsSearcher", searchAndDocprocBundle); bundleFromClass.put("com.yahoo.prelude.searcher.PosSearcher", searchAndDocprocBundle); - bundleFromClass.put("com.yahoo.prelude.searcher.QuerySnapshotSearcher", searchAndDocprocBundle); - bundleFromClass.put("com.yahoo.prelude.searcher.QueryValidatingSearcher", searchAndDocprocBundle); bundleFromClass.put("com.yahoo.prelude.searcher.QuotingSearcher", searchAndDocprocBundle); bundleFromClass.put("com.yahoo.prelude.searcher.ValidateSortingSearcher", searchAndDocprocBundle); bundleFromClass.put("com.yahoo.prelude.semantics.SemanticSearcher", searchAndDocprocBundle); @@ -110,10 +106,8 @@ public class BundleMapper { bundleFromClass.put("com.yahoo.search.query.rewrite.rewriters.NameRewriter", searchAndDocprocBundle); bundleFromClass.put("com.yahoo.search.querytransform.AllLowercasingSearcher", searchAndDocprocBundle); bundleFromClass.put("com.yahoo.search.querytransform.DefaultPositionSearcher", searchAndDocprocBundle); - bundleFromClass.put("com.yahoo.search.querytransform.LegacyCombinator", searchAndDocprocBundle); bundleFromClass.put("com.yahoo.search.querytransform.LowercasingSearcher", searchAndDocprocBundle); bundleFromClass.put("com.yahoo.search.querytransform.NGramSearcher", searchAndDocprocBundle); - bundleFromClass.put("com.yahoo.search.querytransform.QueryCombinator", searchAndDocprocBundle); bundleFromClass.put("com.yahoo.search.querytransform.VespaLowercasingSearcher", searchAndDocprocBundle); bundleFromClass.put("com.yahoo.search.rendering.Renderer", searchAndDocprocBundle); bundleFromClass.put("com.yahoo.search.rendering.SectionedRenderer", searchAndDocprocBundle); diff --git a/config-model/src/main/java/com/yahoo/vespa/model/container/xml/ContainerModelBuilder.java b/config-model/src/main/java/com/yahoo/vespa/model/container/xml/ContainerModelBuilder.java index b5c1b1e1496..4401bfa08dd 100644 --- a/config-model/src/main/java/com/yahoo/vespa/model/container/xml/ContainerModelBuilder.java +++ b/config-model/src/main/java/com/yahoo/vespa/model/container/xml/ContainerModelBuilder.java @@ -25,7 +25,6 @@ import com.yahoo.config.provision.RegionName; import com.yahoo.config.provision.Rotation; import com.yahoo.config.provision.SystemName; import com.yahoo.config.provision.Zone; -import com.yahoo.container.jdisc.config.MetricDefaultsConfig; import com.yahoo.search.rendering.RendererRegistry; import com.yahoo.searchdefinition.derived.RankProfileList; import com.yahoo.text.XML; @@ -174,7 +173,6 @@ public class ContainerModelBuilder extends ConfigModelBuilder<ContainerModel> { addDefaultHandlers(cluster); addStatusHandlers(cluster, context); - setDefaultMetricConsumerFactory(cluster); addHttp(deployState, spec, cluster); @@ -184,7 +182,6 @@ public class ContainerModelBuilder extends ConfigModelBuilder<ContainerModel> { addClientProviders(deployState, spec, cluster); addServerProviders(deployState, spec, cluster); - addLegacyFilters(deployState, spec, cluster); // TODO: Remove for Vespa 7 addAthensCopperArgos(cluster, context); // Must be added after nodes. } @@ -256,10 +253,6 @@ public class ContainerModelBuilder extends ConfigModelBuilder<ContainerModel> { addConfiguredComponents(deployState, cluster, spec, "component"); } - private void setDefaultMetricConsumerFactory(ContainerCluster cluster) { - cluster.setDefaultMetricConsumerFactory(MetricDefaultsConfig.Factory.Enum.STATE_MONITOR); - } - private void addDefaultHandlers(ContainerCluster cluster) { addDefaultHandlersExceptStatus(cluster); } @@ -301,21 +294,6 @@ public class ContainerModelBuilder extends ConfigModelBuilder<ContainerModel> { addConfiguredComponents(deployState, cluster, spec, "server"); } - private void addLegacyFilters(DeployState deployState, Element spec, ContainerCluster cluster) { - for (Component component : buildLegacyFilters(deployState, cluster, spec)) { - cluster.addComponent(component); - } - } - - private List<Component> buildLegacyFilters(DeployState deployState, AbstractConfigProducer ancestor, Element spec) { - List<Component> components = new ArrayList<>(); - - for (Element node : XML.getChildren(spec, "filter")) { - components.add(new DomFilterBuilder().build(deployState, ancestor, node)); - } - return components; - } - private void addAccessLogs(DeployState deployState, ContainerCluster cluster, Element spec) { List<Element> accessLogElements = getAccessLogElements(spec); @@ -464,7 +442,7 @@ public class ContainerModelBuilder extends ConfigModelBuilder<ContainerModel> { } else if ((zone.system() == SystemName.dev) || isHostedVespa) { return null; } else { - return ContainerCluster.CMS; + return ContainerCluster.G1GC; } } private static String getJvmOptions(ContainerCluster cluster, Element nodesElement, DeployLogger deployLogger) { @@ -480,7 +458,7 @@ public class ContainerModelBuilder extends ConfigModelBuilder<ContainerModel> { jvmOptions = nodesElement.getAttribute(VespaDomBuilder.JVMARGS_ATTRIB_NAME); if (incompatibleGCOptions(jvmOptions)) { deployLogger.log(Level.WARNING, "You need to move out your GC related options from 'jvmargs' to 'jvm-gc-options'"); - cluster.setJvmGCOptions(ContainerCluster.CMS); + cluster.setJvmGCOptions(ContainerCluster.G1GC); } } return jvmOptions; @@ -849,7 +827,7 @@ public class ContainerModelBuilder extends ConfigModelBuilder<ContainerModel> { /** - * Disallow renderers named "DefaultRenderer" or "JsonRenderer" + * Disallow renderers named "XmlRenderer" or "JsonRenderer" */ private static void validateRendererElement(Element element) { String idAttr = element.getAttribute("id"); diff --git a/config-model/src/main/java/com/yahoo/vespa/model/content/Content.java b/config-model/src/main/java/com/yahoo/vespa/model/content/Content.java index 8d0824f89e5..79619ac0c1f 100644 --- a/config-model/src/main/java/com/yahoo/vespa/model/content/Content.java +++ b/config-model/src/main/java/com/yahoo/vespa/model/content/Content.java @@ -238,10 +238,8 @@ public class Content extends ConfigModel { IndexedSearchCluster indexedSearchCluster = content.getCluster().getSearch().getIndexed(); if (indexedSearchCluster.hasExplicitIndexingCluster()) { setExistingIndexingCluster(indexedSearchCluster, content.containers); - } else if (content.isHosted) { - setContainerAsIndexingCluster(indexedSearchCluster, content, modelContext, root); } else { - createImplicitIndexingCluster(indexedSearchCluster, content, modelContext, root); + setContainerAsIndexingCluster(indexedSearchCluster, content, modelContext, root); } } diff --git a/config-model/src/main/java/com/yahoo/vespa/model/content/cluster/ContentCluster.java b/config-model/src/main/java/com/yahoo/vespa/model/content/cluster/ContentCluster.java index fb3af7f3652..67e33d7b87a 100644 --- a/config-model/src/main/java/com/yahoo/vespa/model/content/cluster/ContentCluster.java +++ b/config-model/src/main/java/com/yahoo/vespa/model/content/cluster/ContentCluster.java @@ -716,17 +716,6 @@ public class ContentCluster extends AbstractConfigProducer implements addedmetrics("*"). removedtags("thread"). tags("disk")); - - Map<String, MetricsConsumer> consumers = getRoot().getAdmin().getLegacyUserMetricsConsumers(); - if (consumers != null) { - for (Map.Entry<String, MetricsConsumer> e : consumers.entrySet()) { - MetricsmanagerConfig.Consumer.Builder b = getMetricBuilder(e.getKey(), builder); - for (Metric m : e.getValue().getMetrics().values()) { - b.addedmetrics(m.name); - } - } - } - } private static final String DEFAULT_BUCKET_SPACE = "default"; diff --git a/config-model/src/main/java/com/yahoo/vespa/model/package-info.java b/config-model/src/main/java/com/yahoo/vespa/model/package-info.java index e5f76dd398e..f88eda4e7a2 100644 --- a/config-model/src/main/java/com/yahoo/vespa/model/package-info.java +++ b/config-model/src/main/java/com/yahoo/vespa/model/package-info.java @@ -99,7 +99,7 @@ com.yahoo.config.model.producer.AbstractConfigProducer </p> - <h3><a name="plugin_loading">Plugin Loading</a></h3> + <h3 id="plugin_loading">Plugin Loading</h3> <p>Each highest-level node in the setup file from the user's application specification corresponds to a {@link @@ -138,7 +138,7 @@ com.yahoo.config.model.producer.AbstractConfigProducer </ul> - <h3><a name="port_allocation">Port Allocation</a></h3> + <h3 id="port_allocation">Port Allocation</h3> <p>Each {@link com.yahoo.vespa.model.Host Host} has an available dynamic port range running from {@link diff --git a/config-model/src/main/java/com/yahoo/vespa/model/search/Tuning.java b/config-model/src/main/java/com/yahoo/vespa/model/search/Tuning.java index 2e3c0681f75..8e8192b74fa 100644 --- a/config-model/src/main/java/com/yahoo/vespa/model/search/Tuning.java +++ b/config-model/src/main/java/com/yahoo/vespa/model/search/Tuning.java @@ -282,14 +282,12 @@ public class Tuning extends AbstractConfigProducer implements PartitionsConfig.P public static class LogStore { public Long maxFileSize = null; - public Integer numThreads = null; public Component chunk = null; public Double minFileSizeFactor = null; public void getConfig(ProtonConfig.Summary.Log.Builder log) { if (maxFileSize!=null) log.maxfilesize(maxFileSize); if (minFileSizeFactor!=null) log.minfilesizefactor(minFileSizeFactor); - if (numThreads != null) log.numthreads(numThreads); if (chunk != null) { chunk.getConfig(log.chunk); } diff --git a/config-model/src/main/javacc/SDParser.jj b/config-model/src/main/javacc/SDParser.jj index e50cbabeb9f..883dfc7ac72 100644 --- a/config-model/src/main/javacc/SDParser.jj +++ b/config-model/src/main/javacc/SDParser.jj @@ -114,7 +114,7 @@ public class SDParser { */ @SuppressWarnings("deprecation") private IndexingOperation newIndexingOperation(boolean multiline) throws ParseException { - return newIndexingOperation(multiline, new SimpleLinguistics(false)); + return newIndexingOperation(multiline, new SimpleLinguistics()); } /** @@ -221,7 +221,6 @@ TOKEN : | < WEIGHT: "weight" > | < TYPE: "type" > | < INDEX: "index" > -| < RISE: "rise" > | < MTOKEN: "token" > | < TEXT: "text" > | < WORD: "word" > @@ -298,8 +297,6 @@ TOKEN : | < MUTABLE: "mutable" > | < FASTSEARCH: "fast-search" > | < HUGE: "huge" > -| < PREFETCH: "prefetch" > -| < NOPREFETCH: "no-prefetch" > | < TENSOR_TYPE: "tensor(" (~["(",")"])+ ")" > | < TENSOR_VALUE_SL: "value" (" ")* ":" (" ")* ("{"<BRACE_SL_LEVEL_1>) ("\n")? > | < TENSOR_VALUE_ML: "value" (<SEARCHLIB_SKIP>)? "{" (["\n"," "])* ("{"<BRACE_ML_LEVEL_1>) (["\n"," "])* "}" ("\n")? > @@ -1209,15 +1206,6 @@ Object attributeSetting(FieldOperationContainer field, AttributeOperation attrib | <MUTABLE> { attribute.setMutable(true); } | <ENABLEBITVECTORS> { attribute.setEnableBitVectors(true); } | <ENABLEONLYBITVECTOR> { attribute.setEnableOnlyBitVector(true); } - - | <NOPREFETCH> { - deployLogger.log(Level.WARNING, field + ": 'attribute : no-prefetch' is deprecated and has no effect."); - attribute.setPrefetch(false); - } - | <PREFETCH> { - deployLogger.log(Level.WARNING, field + ": 'attribute : prefetch' is deprecated and has no effect."); - attribute.setPrefetch(true); - } | sorting(field, attributeName) | <ALIAS> { String alias; String aliasedName=attributeName; } [aliasedName = identifier()] <COLON> alias = identifier() { attribute.setDoAlias(true); @@ -1517,8 +1505,6 @@ void body(SDField field) : { } <BODY> { deployLogger.log(Level.WARNING, field + ": 'header/body' is deprecated and has no effect."); - field.setHeader(false); - field.setHeaderOrBodyDefined(true); } } @@ -1532,8 +1518,6 @@ void header(SDField field) : { } <HEADER> { deployLogger.log(Level.WARNING, field + ": 'header/body' is deprecated and has no effect."); - field.setHeader(true); - field.setHeaderOrBodyDefined(true); } } @@ -1715,8 +1699,7 @@ Object documentSummary(Search search) : DocumentSummary summary; } { - ( ( <DOCUMENTSUMMARY> | - <SUMMARY> { deployLogger.log(Level.WARNING, "Directive 'summary' is deprecated, use 'document-summary' instead."); } ) // TODO: Remove on Vespa 7 + ( <DOCUMENTSUMMARY> name = identifier() { search.addSummary(summary = new DocumentSummary(name)); } lbrace() ( @@ -1793,11 +1776,6 @@ Object indexBody(IndexOperation index) : ( <PREFIX> { index.setPrefix(true); } | <ALIAS> <COLON> str = identifier() { index.addAlias(str); } | <STEMMING> <COLON> str = identifier() { index.setStemming(str); } - | <RISE> { - if (true) throw new ParseException("'index:rise' is no longer an option. Use 'indexing:attribute' instead. " + - "If it is a weighted set field you should also add 'attribute:fast-search'." + - "This change will require refeeding."); - } | <ARITY> <COLON> arity = integer() { index.setArity(arity); } | <LOWERBOUND> <COLON> num = consumeLong() { index.setLowerBound(num); } | <UPPERBOUND> <COLON> num = consumeLong() { index.setUpperBound(num); } @@ -2551,14 +2529,12 @@ String identifier() : { } | <MUTABLE> | <NEVER> | <NONE> - | <NOPREFETCH> | <NORMAL> | <NORMALIZING> | <OFF> | <ON> | <ONDEMAND> | <ORDER> - | <PREFETCH> | <PREFIX> | <PRIMARY> | <PROPERTIES> @@ -2573,7 +2549,6 @@ String identifier() : { } | <REFERENCE> | <REMOVEIFZERO> | <RERANKCOUNT> - | <RISE> | <SEARCH> | <SECONDARY> | <SECONDPHASE> diff --git a/config-model/src/main/resources/schema/.gitignore b/config-model/src/main/resources/schema/.gitignore index b60c856f91a..e8bf39e2289 100644 --- a/config-model/src/main/resources/schema/.gitignore +++ b/config-model/src/main/resources/schema/.gitignore @@ -1,2 +1,2 @@ -*.rng *.xsd +*.rng diff --git a/config-model/src/main/resources/schema/admin.rnc b/config-model/src/main/resources/schema/admin.rnc index 37cd6476399..3729f3ab57c 100644 --- a/config-model/src/main/resources/schema/admin.rnc +++ b/config-model/src/main/resources/schema/admin.rnc @@ -10,8 +10,8 @@ AdminV2 = (ConfigServer | ConfigServers)? & FileDistribution? & AdminSlobroks? & - (LegacyAdminMonitoring | AdminMonitoring)? & - (LegacyMetricConsumers | Metrics)? & + AdminMonitoring? & + Metrics? & ClusterControllers? & LogForwarding? } @@ -29,8 +29,8 @@ AdminV4 = AdminV4Slobroks? & AdminV4LogServers? & GenericConfig* & - (LegacyAdminMonitoring | AdminMonitoring)? & - (LegacyMetricConsumers | Metrics)? & + AdminMonitoring? & + Metrics? & LogForwarding? } @@ -58,14 +58,6 @@ AdminMonitoring = attribute systemname { xsd:string }? } -# TODO: Alternative name for the 'monitoring' tag. Remove on Vespa 7 -LegacyAdminMonitoring = - element yamas { - attribute interval { xsd:int }?, - attribute systemname { xsd:string }? - } - - ConfigServer = element configserver { service.attlist } @@ -94,17 +86,6 @@ Metrics = element metrics { }+ } -# TODO: Remove on Vespa 7 -LegacyMetricConsumers = element metric-consumers { - element consumer { - attribute name { xsd:string { pattern = "[a-zA-Z][_a-zA-Z0-9]*" } }& - element metric { - attribute name{xsd:Name} & - attribute output-name{xsd:Name}? - }+ - }+ -} - ClusterControllers = element cluster-controllers { attribute standalone-zookeeper { xsd:string }? & element cluster-controller { diff --git a/config-model/src/main/resources/schema/clients-v2.rnc b/config-model/src/main/resources/schema/clients-v2.rnc index 1076d332dd5..5e50135edee 100644 --- a/config-model/src/main/resources/schema/clients-v2.rnc +++ b/config-model/src/main/resources/schema/clients-v2.rnc @@ -1,8 +1,7 @@ # Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. Clients20 = attribute version { "2.0" } & - LoadTypes? & - Spoolers20? + LoadTypes? LoadTypes = element load-types { element type { @@ -11,38 +10,6 @@ LoadTypes = element load-types { }* } -Spoolers20 = element spoolers { - attribute jvmargs { text }? & - SpoolMaster20* & - FeederOptions20? & - Spooler20+ -} - -Spooler20 = element spooler { - service.attlist? & - attribute id { xsd:string }? & - attribute directory { xsd:string }? & - attribute keepsuccess { xsd:boolean }? & - attribute maxfailuresize { xsd:integer }? & - attribute maxfatalfailuresize { xsd:integer }? & - attribute threads { xsd:integer }? & - attribute maxretries { xsd:integer }? & - FeederOptionsOpts20? & - element parsers { - element parser { - attribute type { text } & - element parameter { - attribute key { xsd:string { minLength = "1" } } & - attribute value { xsd:string { minLength = "1" } } - }* - }+ - }? -} - -SpoolMaster20 = element spoolmaster { - service.attlist? -} - FeederOptions20 = element feederoptions { FeederOptionsOpts20 & DocProcChain? diff --git a/config-model/src/main/resources/schema/containercluster.rnc b/config-model/src/main/resources/schema/containercluster.rnc index 5dbcffce736..a30f61809ad 100644 --- a/config-model/src/main/resources/schema/containercluster.rnc +++ b/config-model/src/main/resources/schema/containercluster.rnc @@ -24,7 +24,6 @@ ContainerServices = Client* & Server* & Http? & - HttpFilter? & AccessLog* & SecretStore? & GenericConfig* @@ -73,8 +72,7 @@ AccessLog = element accesslog { attribute compressOnRotation { xsd:boolean }? & attribute symlinkName { string }? & - attribute rotationInterval { string }? & - attribute rotationScheme { string "date" | string "sequence" }? + attribute rotationInterval { string }? } SecretStore = element secret-store { diff --git a/config-model/src/main/resources/schema/content.rnc b/config-model/src/main/resources/schema/content.rnc index c0313cd50ef..ae2af6618d7 100644 --- a/config-model/src/main/resources/schema/content.rnc +++ b/config-model/src/main/resources/schema/content.rnc @@ -302,7 +302,6 @@ Tuning = element tuning { element maxage { xsd:nonNegativeInteger }? }? & element transactionlog { - element maxentries { xsd:nonNegativeInteger }? & element maxsize { xsd:nonNegativeInteger }? }? & element conservative { @@ -336,16 +335,13 @@ Tuning = element tuning { element maxsize { xsd:nonNegativeInteger }? & element maxsize-percent { xsd:double { minInclusive = "0.0" maxInclusive = "50.0" } }? & element initialentries { xsd:nonNegativeInteger }? & - element maxentries { xsd:nonNegativeInteger }? & TuningCompression? }? & element logstore { element maxfilesize { xsd:nonNegativeInteger }? & - element maxdiskbloatfactor { xsd:double { minInclusive = "0.0" } }? & element minfilesizefactor { xsd:double { minInclusive = "0.10" maxInclusive = "1.0" } }? & element chunk { element maxsize { xsd:nonNegativeInteger }? & - element maxentries { xsd:nonNegativeInteger }? & TuningCompression? }? }? diff --git a/config-model/src/main/resources/schema/deployment.rnc b/config-model/src/main/resources/schema/deployment.rnc index 4fc34862365..b2c3dcf7b5a 100644 --- a/config-model/src/main/resources/schema/deployment.rnc +++ b/config-model/src/main/resources/schema/deployment.rnc @@ -12,7 +12,6 @@ start = element deployment { Notifications? & Test? & Staging? & - BlockUpgrade* & Prod* } @@ -28,12 +27,6 @@ BlockChange = element block-change { attribute time-zone { xsd:string }? } -BlockUpgrade = element block-upgrade { # Legacy name - remove on Vespa 7 - attribute days { xsd:string } & - attribute hours { xsd:string } & - attribute time-zone { xsd:string }? -} - Notifications = element notifications { attribute when { xsd:string }? & Email* diff --git a/config-model/src/main/resources/schema/services.rnc b/config-model/src/main/resources/schema/services.rnc index c4eb7435ca6..fe728506124 100644 --- a/config-model/src/main/resources/schema/services.rnc +++ b/config-model/src/main/resources/schema/services.rnc @@ -11,7 +11,6 @@ include "legacygenericcluster.rnc" start = element services { attribute version { "1.0" }? & - attribute major-version { text }? & # TODO: Remove on Vespa 7 attribute application-type { "hosted-infrastructure" }? & LegacyGenericCluster* & GenericCluster* & diff --git a/config-model/src/test/cfg/admin/metricconfig/services.xml b/config-model/src/test/cfg/admin/metricconfig/services.xml index a2a03ca0b08..b4858b1b1bf 100644 --- a/config-model/src/test/cfg/admin/metricconfig/services.xml +++ b/config-model/src/test/cfg/admin/metricconfig/services.xml @@ -5,20 +5,20 @@ <adminserver hostalias="node1"/> <logserver hostalias="node1"/> <monitoring interval="60"/> - <metric-consumers> - <consumer name="fooConsumer"> - <metric name="some.foo.metric" output-name="someFooMetric"/> - <metric name="some.foo.metric2" output-name="someFooMetric2"/> - <metric name="proton.numdocs.average" output-name="tull"/> + <metrics> + <consumer id="fooConsumer"> + <metric id="some.foo.metric" display-name="someFooMetric"/> + <metric id="some.foo.metric2" display-name="someFooMetric2"/> + <metric id="proton.numdocs.average" display-name="tull"/> </consumer> - <consumer name="fooConsumer2"> - <metric name="some.foo.metric3" output-name="someFooMetric3"/> + <consumer id="fooConsumer2"> + <metric id="some.foo.metric3" display-name="someFooMetric3"/> </consumer> - <consumer name="yamas"> - <metric name="vds.distributor.bytesstored.average" output-name="tullball"/> - <metric name="proton.numdocs.average" output-name="overridden"/> + <consumer id="yamas"> + <metric id="vds.distributor.bytesstored.average" display-name="tullball"/> + <metric id="proton.numdocs.average" display-name="overridden"/> </consumer> - </metric-consumers> + </metrics> </admin> <container version="1.0"> diff --git a/config-model/src/test/cfg/application/metricsconfig/services.xml b/config-model/src/test/cfg/application/metricsconfig/services.xml index 868173bc00e..fc3c6e8ce06 100644 --- a/config-model/src/test/cfg/application/metricsconfig/services.xml +++ b/config-model/src/test/cfg/application/metricsconfig/services.xml @@ -3,20 +3,7 @@ <services> <simple version="1.0"> - <simpleservice hostalias="host2"> - <metric-consumers> - <consumer name="yamas"> - <metric name="onlyMine" output-name="user"/> - </consumer> - </metric-consumers> - </simpleservice> - - <simpleservice hostalias="host2"> - <metric-consumers> - <consumer name="yamas"> - <metric name="test" output-name="user"/> - </consumer> - </metric-consumers> - </simpleservice> + <simpleservice hostalias="host2" /> + <simpleservice hostalias="host2" /> </simple> </services> diff --git a/config-model/src/test/cfg/clients/advancedconfig.v2/hosts.xml b/config-model/src/test/cfg/clients/advancedconfig.v2/hosts.xml deleted file mode 100644 index 9eafb2106cb..00000000000 --- a/config-model/src/test/cfg/clients/advancedconfig.v2/hosts.xml +++ /dev/null @@ -1,7 +0,0 @@ -<?xml version="1.0" encoding="utf-8" ?> -<!-- Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. --> -<hosts> - <host name="localhost"> - <alias>node1</alias> - </host> -</hosts> diff --git a/config-model/src/test/cfg/clients/advancedconfig.v2/searchdefinitions/music.sd b/config-model/src/test/cfg/clients/advancedconfig.v2/searchdefinitions/music.sd deleted file mode 100644 index da9e2d14c55..00000000000 --- a/config-model/src/test/cfg/clients/advancedconfig.v2/searchdefinitions/music.sd +++ /dev/null @@ -1,13 +0,0 @@ -# Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -search music { - document music { - field f1 type string { - indexing: summary | index - # index-to: f1, all - } - field f2 type string { - indexing: summary | index - # index-to: f2, all - } - } -} diff --git a/config-model/src/test/cfg/clients/advancedconfig.v2/services.xml b/config-model/src/test/cfg/clients/advancedconfig.v2/services.xml deleted file mode 100644 index e6102b6f8fd..00000000000 --- a/config-model/src/test/cfg/clients/advancedconfig.v2/services.xml +++ /dev/null @@ -1,70 +0,0 @@ -<?xml version="1.0" encoding="utf-8" ?> -<!-- Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. --> -<services xmlns=""> - <admin version="2.0"> - <adminserver hostalias="node1" /> - <logserver hostalias="node1" /> - <slobroks> - <slobrok hostalias="node1" /> - </slobroks> - </admin> - - <clients version="2.0"> - <spoolers> - <feederoptions> - <timeout>90</timeout> - </feederoptions> - - <spooler hostalias="node1" keepsuccess="true"> - <abortondocumenterror>false</abortondocumenterror> - <maxpendingbytes>8000</maxpendingbytes> - <parsers> - <parser type="com.yahoo.vespaspooler.XMLFileParser"/> - <parser type="com.yahoo.vespaspooler.MusicFileParser"/> - <parser type="com.yahoo.vespaspooler.MusicParser"> - <parameter key="route" value="default"/> - </parser> - </parsers> - </spooler> - - <spooler hostalias="node1"> - <abortondocumenterror>false</abortondocumenterror> - <maxpendingbytes>4000</maxpendingbytes> - <timeout>50</timeout> - <parsers> - <parser type="com.yahoo.vespaspooler.MusicParser"> - <parameter key="route" value="othercluster"/> - </parser> - </parsers> - </spooler> - - <spooler id="plan9"> - <route>myroute</route> - <mbusport>14064</mbusport> - - <parsers> - <parser type="com.yahoo.vespaspooler.MusicFileParser" /> - </parsers> - </spooler> - - </spoolers> - </clients> - - <container version="1.0"> - <search/> - <nodes> - <node hostalias="node1"/> - </nodes> - </container> - - <content version="1.0" id="music"> - <redundancy>2</redundancy> - <documents> - <document type="music" mode="index"/> - </documents> - <nodes> - <node hostalias="node1" distribution-key="0" /> - </nodes> - </content> - -</services> diff --git a/config-model/src/test/cfg/clients/simpleconfig.v2.docprocv3/hosts.xml b/config-model/src/test/cfg/clients/simpleconfig.v2.docprocv3/hosts.xml deleted file mode 100644 index 9eafb2106cb..00000000000 --- a/config-model/src/test/cfg/clients/simpleconfig.v2.docprocv3/hosts.xml +++ /dev/null @@ -1,7 +0,0 @@ -<?xml version="1.0" encoding="utf-8" ?> -<!-- Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. --> -<hosts> - <host name="localhost"> - <alias>node1</alias> - </host> -</hosts> diff --git a/config-model/src/test/cfg/clients/simpleconfig.v2.docprocv3/searchdefinitions/music.sd b/config-model/src/test/cfg/clients/simpleconfig.v2.docprocv3/searchdefinitions/music.sd deleted file mode 100644 index da9e2d14c55..00000000000 --- a/config-model/src/test/cfg/clients/simpleconfig.v2.docprocv3/searchdefinitions/music.sd +++ /dev/null @@ -1,13 +0,0 @@ -# Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -search music { - document music { - field f1 type string { - indexing: summary | index - # index-to: f1, all - } - field f2 type string { - indexing: summary | index - # index-to: f2, all - } - } -} diff --git a/config-model/src/test/cfg/clients/simpleconfig.v2.docprocv3/services.xml b/config-model/src/test/cfg/clients/simpleconfig.v2.docprocv3/services.xml deleted file mode 100644 index ded66571026..00000000000 --- a/config-model/src/test/cfg/clients/simpleconfig.v2.docprocv3/services.xml +++ /dev/null @@ -1,63 +0,0 @@ -<?xml version="1.0" encoding="utf-8" ?> -<!-- Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. --> -<services> - - <admin version="2.0"> - <adminserver hostalias="node1" /> - <logserver hostalias="node1" /> - <slobroks> - <slobrok hostalias="node1" /> - </slobroks> - </admin> - - <clients version="2.0"> - <spoolers> - <spooler hostalias="node1" maxfailuresize="100000" maxfatalfailuresize="1000000" threads="5"> - <abortondocumenterror>false</abortondocumenterror> - <maxpendingbytes>8000</maxpendingbytes> - <tracelevel>7</tracelevel> - <parsers> - <parser type="com.yahoo.vespaspooler.XMLFileParser"/> - <parser type="com.yahoo.vespaspooler.MusicFileParser"/> - <parser type="com.yahoo.vespaspooler.MusicParser"> - <parameter key="route" value="default"/> - <parameter key="foo" value="bar"/> - </parser> - </parsers> - </spooler> - </spoolers> - </clients> - - <container version="1.0"> - - <nodes> - <node hostalias="node1"/> - </nodes> - - <document-api/> - - <document-processing> - <chain id="main"> - <documentprocessor id="com.yahoo.docprocs.FoobarDocumentProcessor" /> - </chain> - </document-processing> - - <search/> - - </container> - - <content version="1.0" id="music"> - - <redundancy>2</redundancy> - - <documents> - <document type="music" mode="index"/> - </documents> - - <nodes> - <node hostalias="node1" distribution-key="0" /> - </nodes> - - </content> - -</services> diff --git a/config-model/src/test/cfg/clients/simpleconfig.v2/searchdefinitions/.gitignore b/config-model/src/test/cfg/clients/simpleconfig.v2/searchdefinitions/.gitignore deleted file mode 100644 index e69de29bb2d..00000000000 --- a/config-model/src/test/cfg/clients/simpleconfig.v2/searchdefinitions/.gitignore +++ /dev/null diff --git a/config-model/src/test/configmodel/types/documentmanager.cfg b/config-model/src/test/configmodel/types/documentmanager.cfg index aaaebccecfd..a6a56bf65c1 100644 --- a/config-model/src/test/configmodel/types/documentmanager.cfg +++ b/config-model/src/test/configmodel/types/documentmanager.cfg @@ -110,113 +110,116 @@ datatype[19].id -794985308 datatype[19].arraytype[0].datatype 1707615575 datatype[20].id 69621385 datatype[20].arraytype[0].datatype 339965458 -datatype[21].id 1901258752 +datatype[21].id -372512406 datatype[21].maptype[0].keytype 0 -datatype[21].maptype[0].valtype -2092985853 -datatype[22].id 759956026 -datatype[22].arraytype[0].datatype -2092985853 -datatype[23].id -389833101 +datatype[21].maptype[0].valtype 1707615575 +datatype[22].id 1416345047 +datatype[22].arraytype[0].datatype -372512406 +datatype[23].id 1901258752 datatype[23].maptype[0].keytype 0 -datatype[23].maptype[0].valtype 294108848 -datatype[24].id 1328581348 -datatype[24].structtype[0].name "types.header" -datatype[24].structtype[0].version 0 -datatype[24].structtype[0].compresstype NONE -datatype[24].structtype[0].compresslevel 0 -datatype[24].structtype[0].compressthreshold 95 -datatype[24].structtype[0].compressminsize 800 -datatype[24].structtype[0].field[0].name "abyte" -datatype[24].structtype[0].field[0].datatype 16 -datatype[24].structtype[0].field[0].detailedtype "" -datatype[24].structtype[0].field[1].name "along" -datatype[24].structtype[0].field[1].datatype 4 -datatype[24].structtype[0].field[1].detailedtype "" -datatype[24].structtype[0].field[2].name "arrayfield" -datatype[24].structtype[0].field[2].datatype -1245117006 -datatype[24].structtype[0].field[2].detailedtype "" -datatype[24].structtype[0].field[3].name "setfield" -datatype[24].structtype[0].field[3].datatype 1328286588 -datatype[24].structtype[0].field[3].detailedtype "" -datatype[24].structtype[0].field[4].name "pos" -datatype[24].structtype[0].field[4].datatype 1381038251 -datatype[24].structtype[0].field[4].detailedtype "" -datatype[24].structtype[0].field[5].name "setfield2" -datatype[24].structtype[0].field[5].datatype 18 -datatype[24].structtype[0].field[5].detailedtype "" -datatype[24].structtype[0].field[6].name "setfield3" -datatype[24].structtype[0].field[6].datatype 2125328771 -datatype[24].structtype[0].field[6].detailedtype "" -datatype[24].structtype[0].field[7].name "setfield4" -datatype[24].structtype[0].field[7].datatype 2065577986 -datatype[24].structtype[0].field[7].detailedtype "" -datatype[24].structtype[0].field[8].name "tagfield" -datatype[24].structtype[0].field[8].datatype 18 -datatype[24].structtype[0].field[8].detailedtype "" -datatype[24].structtype[0].field[9].name "structfield" -datatype[24].structtype[0].field[9].datatype 109267174 -datatype[24].structtype[0].field[9].detailedtype "" -datatype[24].structtype[0].field[10].name "structarrayfield" -datatype[24].structtype[0].field[10].datatype -1244829667 -datatype[24].structtype[0].field[10].detailedtype "" -datatype[24].structtype[0].field[11].name "stringmapfield" -datatype[24].structtype[0].field[11].datatype 339965458 -datatype[24].structtype[0].field[11].detailedtype "" -datatype[24].structtype[0].field[12].name "intmapfield" -datatype[24].structtype[0].field[12].datatype -1584287606 -datatype[24].structtype[0].field[12].detailedtype "" -datatype[24].structtype[0].field[13].name "floatmapfield" -datatype[24].structtype[0].field[13].datatype 2125154557 -datatype[24].structtype[0].field[13].detailedtype "" -datatype[24].structtype[0].field[14].name "longmapfield" -datatype[24].structtype[0].field[14].datatype -1715531035 -datatype[24].structtype[0].field[14].detailedtype "" -datatype[24].structtype[0].field[15].name "doublemapfield" -datatype[24].structtype[0].field[15].datatype 2138385264 -datatype[24].structtype[0].field[15].detailedtype "" -datatype[24].structtype[0].field[16].name "arraymapfield" -datatype[24].structtype[0].field[16].datatype 435886609 -datatype[24].structtype[0].field[16].detailedtype "" -datatype[24].structtype[0].field[17].name "arrarr" -datatype[24].structtype[0].field[17].datatype -794985308 -datatype[24].structtype[0].field[17].detailedtype "" -datatype[24].structtype[0].field[18].name "maparr" -datatype[24].structtype[0].field[18].datatype 69621385 -datatype[24].structtype[0].field[18].detailedtype "" -datatype[24].structtype[0].field[19].name "mystructfield" -datatype[24].structtype[0].field[19].datatype -2092985853 -datatype[24].structtype[0].field[19].detailedtype "" -datatype[24].structtype[0].field[20].name "mystructmap" -datatype[24].structtype[0].field[20].datatype 1901258752 -datatype[24].structtype[0].field[20].detailedtype "" -datatype[24].structtype[0].field[21].name "mystructarr" -datatype[24].structtype[0].field[21].datatype 759956026 -datatype[24].structtype[0].field[21].detailedtype "" -datatype[24].structtype[0].field[22].name "Folders" -datatype[24].structtype[0].field[22].datatype -389833101 -datatype[24].structtype[0].field[22].detailedtype "" -datatype[24].structtype[0].field[23].name "juletre" -datatype[24].structtype[0].field[23].datatype 4 -datatype[24].structtype[0].field[23].detailedtype "" -datatype[24].structtype[0].field[24].name "album0" -datatype[24].structtype[0].field[24].datatype 18 -datatype[24].structtype[0].field[24].detailedtype "" -datatype[24].structtype[0].field[25].name "album1" -datatype[24].structtype[0].field[25].datatype 18 -datatype[24].structtype[0].field[25].detailedtype "" -datatype[24].structtype[0].field[26].name "other" -datatype[24].structtype[0].field[26].datatype 4 -datatype[24].structtype[0].field[26].detailedtype "" -datatype[24].structtype[0].field[27].name "rankfeatures" -datatype[24].structtype[0].field[27].datatype 2 -datatype[24].structtype[0].field[27].detailedtype "" -datatype[24].structtype[0].field[28].name "summaryfeatures" -datatype[24].structtype[0].field[28].datatype 2 -datatype[24].structtype[0].field[28].detailedtype "" -datatype[25].id -372512406 +datatype[23].maptype[0].valtype -2092985853 +datatype[24].id 759956026 +datatype[24].arraytype[0].datatype -2092985853 +datatype[25].id -389833101 datatype[25].maptype[0].keytype 0 -datatype[25].maptype[0].valtype 1707615575 -datatype[26].id 1416345047 -datatype[26].arraytype[0].datatype -372512406 +datatype[25].maptype[0].valtype 294108848 +datatype[26].id 1328581348 +datatype[26].structtype[0].name "types.header" +datatype[26].structtype[0].version 0 +datatype[26].structtype[0].compresstype NONE +datatype[26].structtype[0].compresslevel 0 +datatype[26].structtype[0].compressthreshold 95 +datatype[26].structtype[0].compressminsize 800 +datatype[26].structtype[0].field[0].name "abyte" +datatype[26].structtype[0].field[0].datatype 16 +datatype[26].structtype[0].field[0].detailedtype "" +datatype[26].structtype[0].field[1].name "along" +datatype[26].structtype[0].field[1].datatype 4 +datatype[26].structtype[0].field[1].detailedtype "" +datatype[26].structtype[0].field[2].name "arrayfield" +datatype[26].structtype[0].field[2].datatype -1245117006 +datatype[26].structtype[0].field[2].detailedtype "" +datatype[26].structtype[0].field[3].name "setfield" +datatype[26].structtype[0].field[3].datatype 1328286588 +datatype[26].structtype[0].field[3].detailedtype "" +datatype[26].structtype[0].field[4].name "pos" +datatype[26].structtype[0].field[4].datatype 1381038251 +datatype[26].structtype[0].field[4].detailedtype "" +datatype[26].structtype[0].field[5].name "setfield2" +datatype[26].structtype[0].field[5].datatype 18 +datatype[26].structtype[0].field[5].detailedtype "" +datatype[26].structtype[0].field[6].name "setfield3" +datatype[26].structtype[0].field[6].datatype 2125328771 +datatype[26].structtype[0].field[6].detailedtype "" +datatype[26].structtype[0].field[7].name "setfield4" +datatype[26].structtype[0].field[7].datatype 2065577986 +datatype[26].structtype[0].field[7].detailedtype "" +datatype[26].structtype[0].field[8].name "tagfield" +datatype[26].structtype[0].field[8].datatype 18 +datatype[26].structtype[0].field[8].detailedtype "" +datatype[26].structtype[0].field[9].name "structfield" +datatype[26].structtype[0].field[9].datatype 109267174 +datatype[26].structtype[0].field[9].detailedtype "" +datatype[26].structtype[0].field[10].name "structarrayfield" +datatype[26].structtype[0].field[10].datatype -1244829667 +datatype[26].structtype[0].field[10].detailedtype "" +datatype[26].structtype[0].field[11].name "stringmapfield" +datatype[26].structtype[0].field[11].datatype 339965458 +datatype[26].structtype[0].field[11].detailedtype "" +datatype[26].structtype[0].field[12].name "intmapfield" +datatype[26].structtype[0].field[12].datatype -1584287606 +datatype[26].structtype[0].field[12].detailedtype "" +datatype[26].structtype[0].field[13].name "floatmapfield" +datatype[26].structtype[0].field[13].datatype 2125154557 +datatype[26].structtype[0].field[13].detailedtype "" +datatype[26].structtype[0].field[14].name "longmapfield" +datatype[26].structtype[0].field[14].datatype -1715531035 +datatype[26].structtype[0].field[14].detailedtype "" +datatype[26].structtype[0].field[15].name "doublemapfield" +datatype[26].structtype[0].field[15].datatype 2138385264 +datatype[26].structtype[0].field[15].detailedtype "" +datatype[26].structtype[0].field[16].name "arraymapfield" +datatype[26].structtype[0].field[16].datatype 435886609 +datatype[26].structtype[0].field[16].detailedtype "" +datatype[26].structtype[0].field[17].name "arrarr" +datatype[26].structtype[0].field[17].datatype -794985308 +datatype[26].structtype[0].field[17].detailedtype "" +datatype[26].structtype[0].field[18].name "maparr" +datatype[26].structtype[0].field[18].datatype 69621385 +datatype[26].structtype[0].field[18].detailedtype "" +datatype[26].structtype[0].field[19].name "complexarray" +datatype[26].structtype[0].field[19].datatype 1416345047 +datatype[26].structtype[0].field[19].detailedtype "" +datatype[26].structtype[0].field[20].name "mystructfield" +datatype[26].structtype[0].field[20].datatype -2092985853 +datatype[26].structtype[0].field[20].detailedtype "" +datatype[26].structtype[0].field[21].name "mystructmap" +datatype[26].structtype[0].field[21].datatype 1901258752 +datatype[26].structtype[0].field[21].detailedtype "" +datatype[26].structtype[0].field[22].name "mystructarr" +datatype[26].structtype[0].field[22].datatype 759956026 +datatype[26].structtype[0].field[22].detailedtype "" +datatype[26].structtype[0].field[23].name "Folders" +datatype[26].structtype[0].field[23].datatype -389833101 +datatype[26].structtype[0].field[23].detailedtype "" +datatype[26].structtype[0].field[24].name "juletre" +datatype[26].structtype[0].field[24].datatype 4 +datatype[26].structtype[0].field[24].detailedtype "" +datatype[26].structtype[0].field[25].name "album0" +datatype[26].structtype[0].field[25].datatype 18 +datatype[26].structtype[0].field[25].detailedtype "" +datatype[26].structtype[0].field[26].name "album1" +datatype[26].structtype[0].field[26].datatype 18 +datatype[26].structtype[0].field[26].detailedtype "" +datatype[26].structtype[0].field[27].name "other" +datatype[26].structtype[0].field[27].datatype 4 +datatype[26].structtype[0].field[27].detailedtype "" +datatype[26].structtype[0].field[28].name "rankfeatures" +datatype[26].structtype[0].field[28].datatype 2 +datatype[26].structtype[0].field[28].detailedtype "" +datatype[26].structtype[0].field[29].name "summaryfeatures" +datatype[26].structtype[0].field[29].datatype 2 +datatype[26].structtype[0].field[29].detailedtype "" datatype[27].id 348447225 datatype[27].structtype[0].name "types.body" datatype[27].structtype[0].version 0 @@ -224,9 +227,6 @@ datatype[27].structtype[0].compresstype NONE datatype[27].structtype[0].compresslevel 0 datatype[27].structtype[0].compressthreshold 95 datatype[27].structtype[0].compressminsize 800 -datatype[27].structtype[0].field[0].name "complexarray" -datatype[27].structtype[0].field[0].datatype 1416345047 -datatype[27].structtype[0].field[0].detailedtype "" datatype[28].id -853072901 datatype[28].documenttype[0].name "types" datatype[28].documenttype[0].version 0 @@ -260,4 +260,4 @@ datatype[28].documenttype[0].fieldsets{[document]}.fields[22] "setfield4" datatype[28].documenttype[0].fieldsets{[document]}.fields[23] "stringmapfield" datatype[28].documenttype[0].fieldsets{[document]}.fields[24] "structarrayfield" datatype[28].documenttype[0].fieldsets{[document]}.fields[25] "structfield" -datatype[28].documenttype[0].fieldsets{[document]}.fields[26] "tagfield"
\ No newline at end of file +datatype[28].documenttype[0].fieldsets{[document]}.fields[26] "tagfield" diff --git a/config-model/src/test/configmodel/types/documenttypes.cfg b/config-model/src/test/configmodel/types/documenttypes.cfg index 97785618e8e..7ff795bc33c 100644 --- a/config-model/src/test/configmodel/types/documenttypes.cfg +++ b/config-model/src/test/configmodel/types/documenttypes.cfg @@ -355,11 +355,11 @@ documenttype[0].datatype[19].sstruct.compression.type NONE documenttype[0].datatype[19].sstruct.compression.level 0 documenttype[0].datatype[19].sstruct.compression.threshold 95 documenttype[0].datatype[19].sstruct.compression.minsize 200 -documenttype[0].datatype[20].id 1901258752 +documenttype[0].datatype[20].id -372512406 documenttype[0].datatype[20].type MAP documenttype[0].datatype[20].array.element.id 0 documenttype[0].datatype[20].map.key.id 0 -documenttype[0].datatype[20].map.value.id -2092985853 +documenttype[0].datatype[20].map.value.id 1707615575 documenttype[0].datatype[20].wset.key.id 0 documenttype[0].datatype[20].wset.createifnonexistent false documenttype[0].datatype[20].wset.removeifzero false @@ -370,9 +370,9 @@ documenttype[0].datatype[20].sstruct.compression.type NONE documenttype[0].datatype[20].sstruct.compression.level 0 documenttype[0].datatype[20].sstruct.compression.threshold 95 documenttype[0].datatype[20].sstruct.compression.minsize 200 -documenttype[0].datatype[21].id 759956026 +documenttype[0].datatype[21].id 1416345047 documenttype[0].datatype[21].type ARRAY -documenttype[0].datatype[21].array.element.id -2092985853 +documenttype[0].datatype[21].array.element.id -372512406 documenttype[0].datatype[21].map.key.id 0 documenttype[0].datatype[21].map.value.id 0 documenttype[0].datatype[21].wset.key.id 0 @@ -385,11 +385,11 @@ documenttype[0].datatype[21].sstruct.compression.type NONE documenttype[0].datatype[21].sstruct.compression.level 0 documenttype[0].datatype[21].sstruct.compression.threshold 95 documenttype[0].datatype[21].sstruct.compression.minsize 200 -documenttype[0].datatype[22].id -389833101 +documenttype[0].datatype[22].id 1901258752 documenttype[0].datatype[22].type MAP documenttype[0].datatype[22].array.element.id 0 documenttype[0].datatype[22].map.key.id 0 -documenttype[0].datatype[22].map.value.id 294108848 +documenttype[0].datatype[22].map.value.id -2092985853 documenttype[0].datatype[22].wset.key.id 0 documenttype[0].datatype[22].wset.createifnonexistent false documenttype[0].datatype[22].wset.removeifzero false @@ -400,171 +400,26 @@ documenttype[0].datatype[22].sstruct.compression.type NONE documenttype[0].datatype[22].sstruct.compression.level 0 documenttype[0].datatype[22].sstruct.compression.threshold 95 documenttype[0].datatype[22].sstruct.compression.minsize 200 -documenttype[0].datatype[23].id 1328581348 -documenttype[0].datatype[23].type STRUCT -documenttype[0].datatype[23].array.element.id 0 +documenttype[0].datatype[23].id 759956026 +documenttype[0].datatype[23].type ARRAY +documenttype[0].datatype[23].array.element.id -2092985853 documenttype[0].datatype[23].map.key.id 0 documenttype[0].datatype[23].map.value.id 0 documenttype[0].datatype[23].wset.key.id 0 documenttype[0].datatype[23].wset.createifnonexistent false documenttype[0].datatype[23].wset.removeifzero false documenttype[0].datatype[23].annotationref.annotation.id 0 -documenttype[0].datatype[23].sstruct.name "types.header" +documenttype[0].datatype[23].sstruct.name "" documenttype[0].datatype[23].sstruct.version 0 documenttype[0].datatype[23].sstruct.compression.type NONE documenttype[0].datatype[23].sstruct.compression.level 0 documenttype[0].datatype[23].sstruct.compression.threshold 95 documenttype[0].datatype[23].sstruct.compression.minsize 200 -documenttype[0].datatype[23].sstruct.field[0].name "abyte" -documenttype[0].datatype[23].sstruct.field[0].id 110138156 -documenttype[0].datatype[23].sstruct.field[0].id_v6 1369099343 -documenttype[0].datatype[23].sstruct.field[0].datatype 16 -documenttype[0].datatype[23].sstruct.field[0].detailedtype "" -documenttype[0].datatype[23].sstruct.field[1].name "along" -documenttype[0].datatype[23].sstruct.field[1].id 1206464520 -documenttype[0].datatype[23].sstruct.field[1].id_v6 871280609 -documenttype[0].datatype[23].sstruct.field[1].datatype 4 -documenttype[0].datatype[23].sstruct.field[1].detailedtype "" -documenttype[0].datatype[23].sstruct.field[2].name "arrayfield" -documenttype[0].datatype[23].sstruct.field[2].id 965790107 -documenttype[0].datatype[23].sstruct.field[2].id_v6 1010955705 -documenttype[0].datatype[23].sstruct.field[2].datatype -1245117006 -documenttype[0].datatype[23].sstruct.field[2].detailedtype "" -documenttype[0].datatype[23].sstruct.field[3].name "setfield" -documenttype[0].datatype[23].sstruct.field[3].id 761581914 -documenttype[0].datatype[23].sstruct.field[3].id_v6 1762943268 -documenttype[0].datatype[23].sstruct.field[3].datatype 1328286588 -documenttype[0].datatype[23].sstruct.field[3].detailedtype "" -documenttype[0].datatype[23].sstruct.field[4].name "pos" -documenttype[0].datatype[23].sstruct.field[4].id 1041567475 -documenttype[0].datatype[23].sstruct.field[4].id_v6 26353693 -documenttype[0].datatype[23].sstruct.field[4].datatype 1381038251 -documenttype[0].datatype[23].sstruct.field[4].detailedtype "" -documenttype[0].datatype[23].sstruct.field[5].name "setfield2" -documenttype[0].datatype[23].sstruct.field[5].id 1066659198 -documenttype[0].datatype[23].sstruct.field[5].id_v6 813038565 -documenttype[0].datatype[23].sstruct.field[5].datatype 18 -documenttype[0].datatype[23].sstruct.field[5].detailedtype "" -documenttype[0].datatype[23].sstruct.field[6].name "setfield3" -documenttype[0].datatype[23].sstruct.field[6].id 1180155772 -documenttype[0].datatype[23].sstruct.field[6].id_v6 1697232199 -documenttype[0].datatype[23].sstruct.field[6].datatype 2125328771 -documenttype[0].datatype[23].sstruct.field[6].detailedtype "" -documenttype[0].datatype[23].sstruct.field[7].name "setfield4" -documenttype[0].datatype[23].sstruct.field[7].id 1254131631 -documenttype[0].datatype[23].sstruct.field[7].id_v6 119755202 -documenttype[0].datatype[23].sstruct.field[7].datatype 2065577986 -documenttype[0].datatype[23].sstruct.field[7].detailedtype "" -documenttype[0].datatype[23].sstruct.field[8].name "tagfield" -documenttype[0].datatype[23].sstruct.field[8].id 1653562069 -documenttype[0].datatype[23].sstruct.field[8].id_v6 938523246 -documenttype[0].datatype[23].sstruct.field[8].datatype 18 -documenttype[0].datatype[23].sstruct.field[8].detailedtype "" -documenttype[0].datatype[23].sstruct.field[9].name "structfield" -documenttype[0].datatype[23].sstruct.field[9].id 486207386 -documenttype[0].datatype[23].sstruct.field[9].id_v6 418303145 -documenttype[0].datatype[23].sstruct.field[9].datatype 109267174 -documenttype[0].datatype[23].sstruct.field[9].detailedtype "" -documenttype[0].datatype[23].sstruct.field[10].name "structarrayfield" -documenttype[0].datatype[23].sstruct.field[10].id 335048518 -documenttype[0].datatype[23].sstruct.field[10].id_v6 607034174 -documenttype[0].datatype[23].sstruct.field[10].datatype -1244829667 -documenttype[0].datatype[23].sstruct.field[10].detailedtype "" -documenttype[0].datatype[23].sstruct.field[11].name "stringmapfield" -documenttype[0].datatype[23].sstruct.field[11].id 117465687 -documenttype[0].datatype[23].sstruct.field[11].id_v6 1492788095 -documenttype[0].datatype[23].sstruct.field[11].datatype 339965458 -documenttype[0].datatype[23].sstruct.field[11].detailedtype "" -documenttype[0].datatype[23].sstruct.field[12].name "intmapfield" -documenttype[0].datatype[23].sstruct.field[12].id 121004462 -documenttype[0].datatype[23].sstruct.field[12].id_v6 1642487905 -documenttype[0].datatype[23].sstruct.field[12].datatype -1584287606 -documenttype[0].datatype[23].sstruct.field[12].detailedtype "" -documenttype[0].datatype[23].sstruct.field[13].name "floatmapfield" -documenttype[0].datatype[23].sstruct.field[13].id 1239120925 -documenttype[0].datatype[23].sstruct.field[13].id_v6 1609437589 -documenttype[0].datatype[23].sstruct.field[13].datatype 2125154557 -documenttype[0].datatype[23].sstruct.field[13].detailedtype "" -documenttype[0].datatype[23].sstruct.field[14].name "longmapfield" -documenttype[0].datatype[23].sstruct.field[14].id 477718745 -documenttype[0].datatype[23].sstruct.field[14].id_v6 920341968 -documenttype[0].datatype[23].sstruct.field[14].datatype -1715531035 -documenttype[0].datatype[23].sstruct.field[14].detailedtype "" -documenttype[0].datatype[23].sstruct.field[15].name "doublemapfield" -documenttype[0].datatype[23].sstruct.field[15].id 877047192 -documenttype[0].datatype[23].sstruct.field[15].id_v6 957317090 -documenttype[0].datatype[23].sstruct.field[15].datatype 2138385264 -documenttype[0].datatype[23].sstruct.field[15].detailedtype "" -documenttype[0].datatype[23].sstruct.field[16].name "arraymapfield" -documenttype[0].datatype[23].sstruct.field[16].id 1670805928 -documenttype[0].datatype[23].sstruct.field[16].id_v6 1940354311 -documenttype[0].datatype[23].sstruct.field[16].datatype 435886609 -documenttype[0].datatype[23].sstruct.field[16].detailedtype "" -documenttype[0].datatype[23].sstruct.field[17].name "arrarr" -documenttype[0].datatype[23].sstruct.field[17].id 1962567166 -documenttype[0].datatype[23].sstruct.field[17].id_v6 885141301 -documenttype[0].datatype[23].sstruct.field[17].datatype -794985308 -documenttype[0].datatype[23].sstruct.field[17].detailedtype "" -documenttype[0].datatype[23].sstruct.field[18].name "maparr" -documenttype[0].datatype[23].sstruct.field[18].id 904375219 -documenttype[0].datatype[23].sstruct.field[18].id_v6 63700074 -documenttype[0].datatype[23].sstruct.field[18].datatype 69621385 -documenttype[0].datatype[23].sstruct.field[18].detailedtype "" -documenttype[0].datatype[23].sstruct.field[19].name "mystructfield" -documenttype[0].datatype[23].sstruct.field[19].id 1348513378 -documenttype[0].datatype[23].sstruct.field[19].id_v6 2033170300 -documenttype[0].datatype[23].sstruct.field[19].datatype -2092985853 -documenttype[0].datatype[23].sstruct.field[19].detailedtype "" -documenttype[0].datatype[23].sstruct.field[20].name "mystructmap" -documenttype[0].datatype[23].sstruct.field[20].id 1511423250 -documenttype[0].datatype[23].sstruct.field[20].id_v6 449602635 -documenttype[0].datatype[23].sstruct.field[20].datatype 1901258752 -documenttype[0].datatype[23].sstruct.field[20].detailedtype "" -documenttype[0].datatype[23].sstruct.field[21].name "mystructarr" -documenttype[0].datatype[23].sstruct.field[21].id 595856991 -documenttype[0].datatype[23].sstruct.field[21].id_v6 764861972 -documenttype[0].datatype[23].sstruct.field[21].datatype 759956026 -documenttype[0].datatype[23].sstruct.field[21].detailedtype "" -documenttype[0].datatype[23].sstruct.field[22].name "Folders" -documenttype[0].datatype[23].sstruct.field[22].id 34575524 -documenttype[0].datatype[23].sstruct.field[22].id_v6 280569744 -documenttype[0].datatype[23].sstruct.field[22].datatype -389833101 -documenttype[0].datatype[23].sstruct.field[22].detailedtype "" -documenttype[0].datatype[23].sstruct.field[23].name "juletre" -documenttype[0].datatype[23].sstruct.field[23].id 1039981530 -documenttype[0].datatype[23].sstruct.field[23].id_v6 2073084146 -documenttype[0].datatype[23].sstruct.field[23].datatype 4 -documenttype[0].datatype[23].sstruct.field[23].detailedtype "" -documenttype[0].datatype[23].sstruct.field[24].name "album0" -documenttype[0].datatype[23].sstruct.field[24].id 764312262 -documenttype[0].datatype[23].sstruct.field[24].id_v6 1409364160 -documenttype[0].datatype[23].sstruct.field[24].datatype 18 -documenttype[0].datatype[23].sstruct.field[24].detailedtype "" -documenttype[0].datatype[23].sstruct.field[25].name "album1" -documenttype[0].datatype[23].sstruct.field[25].id 1967160809 -documenttype[0].datatype[23].sstruct.field[25].id_v6 1833811264 -documenttype[0].datatype[23].sstruct.field[25].datatype 18 -documenttype[0].datatype[23].sstruct.field[25].detailedtype "" -documenttype[0].datatype[23].sstruct.field[26].name "other" -documenttype[0].datatype[23].sstruct.field[26].id 2443357 -documenttype[0].datatype[23].sstruct.field[26].id_v6 903806222 -documenttype[0].datatype[23].sstruct.field[26].datatype 4 -documenttype[0].datatype[23].sstruct.field[26].detailedtype "" -documenttype[0].datatype[23].sstruct.field[27].name "rankfeatures" -documenttype[0].datatype[23].sstruct.field[27].id 1883197392 -documenttype[0].datatype[23].sstruct.field[27].id_v6 699950698 -documenttype[0].datatype[23].sstruct.field[27].datatype 2 -documenttype[0].datatype[23].sstruct.field[27].detailedtype "" -documenttype[0].datatype[23].sstruct.field[28].name "summaryfeatures" -documenttype[0].datatype[23].sstruct.field[28].id 1840337115 -documenttype[0].datatype[23].sstruct.field[28].id_v6 1981648971 -documenttype[0].datatype[23].sstruct.field[28].datatype 2 -documenttype[0].datatype[23].sstruct.field[28].detailedtype "" -documenttype[0].datatype[24].id -372512406 +documenttype[0].datatype[24].id -389833101 documenttype[0].datatype[24].type MAP documenttype[0].datatype[24].array.element.id 0 documenttype[0].datatype[24].map.key.id 0 -documenttype[0].datatype[24].map.value.id 1707615575 +documenttype[0].datatype[24].map.value.id 294108848 documenttype[0].datatype[24].wset.key.id 0 documenttype[0].datatype[24].wset.createifnonexistent false documenttype[0].datatype[24].wset.removeifzero false @@ -575,21 +430,171 @@ documenttype[0].datatype[24].sstruct.compression.type NONE documenttype[0].datatype[24].sstruct.compression.level 0 documenttype[0].datatype[24].sstruct.compression.threshold 95 documenttype[0].datatype[24].sstruct.compression.minsize 200 -documenttype[0].datatype[25].id 1416345047 -documenttype[0].datatype[25].type ARRAY -documenttype[0].datatype[25].array.element.id -372512406 +documenttype[0].datatype[25].id 1328581348 +documenttype[0].datatype[25].type STRUCT +documenttype[0].datatype[25].array.element.id 0 documenttype[0].datatype[25].map.key.id 0 documenttype[0].datatype[25].map.value.id 0 documenttype[0].datatype[25].wset.key.id 0 documenttype[0].datatype[25].wset.createifnonexistent false documenttype[0].datatype[25].wset.removeifzero false documenttype[0].datatype[25].annotationref.annotation.id 0 -documenttype[0].datatype[25].sstruct.name "" +documenttype[0].datatype[25].sstruct.name "types.header" documenttype[0].datatype[25].sstruct.version 0 documenttype[0].datatype[25].sstruct.compression.type NONE documenttype[0].datatype[25].sstruct.compression.level 0 documenttype[0].datatype[25].sstruct.compression.threshold 95 documenttype[0].datatype[25].sstruct.compression.minsize 200 +documenttype[0].datatype[25].sstruct.field[0].name "abyte" +documenttype[0].datatype[25].sstruct.field[0].id 110138156 +documenttype[0].datatype[25].sstruct.field[0].id_v6 1369099343 +documenttype[0].datatype[25].sstruct.field[0].datatype 16 +documenttype[0].datatype[25].sstruct.field[0].detailedtype "" +documenttype[0].datatype[25].sstruct.field[1].name "along" +documenttype[0].datatype[25].sstruct.field[1].id 1206464520 +documenttype[0].datatype[25].sstruct.field[1].id_v6 871280609 +documenttype[0].datatype[25].sstruct.field[1].datatype 4 +documenttype[0].datatype[25].sstruct.field[1].detailedtype "" +documenttype[0].datatype[25].sstruct.field[2].name "arrayfield" +documenttype[0].datatype[25].sstruct.field[2].id 965790107 +documenttype[0].datatype[25].sstruct.field[2].id_v6 1010955705 +documenttype[0].datatype[25].sstruct.field[2].datatype -1245117006 +documenttype[0].datatype[25].sstruct.field[2].detailedtype "" +documenttype[0].datatype[25].sstruct.field[3].name "setfield" +documenttype[0].datatype[25].sstruct.field[3].id 761581914 +documenttype[0].datatype[25].sstruct.field[3].id_v6 1762943268 +documenttype[0].datatype[25].sstruct.field[3].datatype 1328286588 +documenttype[0].datatype[25].sstruct.field[3].detailedtype "" +documenttype[0].datatype[25].sstruct.field[4].name "pos" +documenttype[0].datatype[25].sstruct.field[4].id 1041567475 +documenttype[0].datatype[25].sstruct.field[4].id_v6 26353693 +documenttype[0].datatype[25].sstruct.field[4].datatype 1381038251 +documenttype[0].datatype[25].sstruct.field[4].detailedtype "" +documenttype[0].datatype[25].sstruct.field[5].name "setfield2" +documenttype[0].datatype[25].sstruct.field[5].id 1066659198 +documenttype[0].datatype[25].sstruct.field[5].id_v6 813038565 +documenttype[0].datatype[25].sstruct.field[5].datatype 18 +documenttype[0].datatype[25].sstruct.field[5].detailedtype "" +documenttype[0].datatype[25].sstruct.field[6].name "setfield3" +documenttype[0].datatype[25].sstruct.field[6].id 1180155772 +documenttype[0].datatype[25].sstruct.field[6].id_v6 1697232199 +documenttype[0].datatype[25].sstruct.field[6].datatype 2125328771 +documenttype[0].datatype[25].sstruct.field[6].detailedtype "" +documenttype[0].datatype[25].sstruct.field[7].name "setfield4" +documenttype[0].datatype[25].sstruct.field[7].id 1254131631 +documenttype[0].datatype[25].sstruct.field[7].id_v6 119755202 +documenttype[0].datatype[25].sstruct.field[7].datatype 2065577986 +documenttype[0].datatype[25].sstruct.field[7].detailedtype "" +documenttype[0].datatype[25].sstruct.field[8].name "tagfield" +documenttype[0].datatype[25].sstruct.field[8].id 1653562069 +documenttype[0].datatype[25].sstruct.field[8].id_v6 938523246 +documenttype[0].datatype[25].sstruct.field[8].datatype 18 +documenttype[0].datatype[25].sstruct.field[8].detailedtype "" +documenttype[0].datatype[25].sstruct.field[9].name "structfield" +documenttype[0].datatype[25].sstruct.field[9].id 486207386 +documenttype[0].datatype[25].sstruct.field[9].id_v6 418303145 +documenttype[0].datatype[25].sstruct.field[9].datatype 109267174 +documenttype[0].datatype[25].sstruct.field[9].detailedtype "" +documenttype[0].datatype[25].sstruct.field[10].name "structarrayfield" +documenttype[0].datatype[25].sstruct.field[10].id 335048518 +documenttype[0].datatype[25].sstruct.field[10].id_v6 607034174 +documenttype[0].datatype[25].sstruct.field[10].datatype -1244829667 +documenttype[0].datatype[25].sstruct.field[10].detailedtype "" +documenttype[0].datatype[25].sstruct.field[11].name "stringmapfield" +documenttype[0].datatype[25].sstruct.field[11].id 117465687 +documenttype[0].datatype[25].sstruct.field[11].id_v6 1492788095 +documenttype[0].datatype[25].sstruct.field[11].datatype 339965458 +documenttype[0].datatype[25].sstruct.field[11].detailedtype "" +documenttype[0].datatype[25].sstruct.field[12].name "intmapfield" +documenttype[0].datatype[25].sstruct.field[12].id 121004462 +documenttype[0].datatype[25].sstruct.field[12].id_v6 1642487905 +documenttype[0].datatype[25].sstruct.field[12].datatype -1584287606 +documenttype[0].datatype[25].sstruct.field[12].detailedtype "" +documenttype[0].datatype[25].sstruct.field[13].name "floatmapfield" +documenttype[0].datatype[25].sstruct.field[13].id 1239120925 +documenttype[0].datatype[25].sstruct.field[13].id_v6 1609437589 +documenttype[0].datatype[25].sstruct.field[13].datatype 2125154557 +documenttype[0].datatype[25].sstruct.field[13].detailedtype "" +documenttype[0].datatype[25].sstruct.field[14].name "longmapfield" +documenttype[0].datatype[25].sstruct.field[14].id 477718745 +documenttype[0].datatype[25].sstruct.field[14].id_v6 920341968 +documenttype[0].datatype[25].sstruct.field[14].datatype -1715531035 +documenttype[0].datatype[25].sstruct.field[14].detailedtype "" +documenttype[0].datatype[25].sstruct.field[15].name "doublemapfield" +documenttype[0].datatype[25].sstruct.field[15].id 877047192 +documenttype[0].datatype[25].sstruct.field[15].id_v6 957317090 +documenttype[0].datatype[25].sstruct.field[15].datatype 2138385264 +documenttype[0].datatype[25].sstruct.field[15].detailedtype "" +documenttype[0].datatype[25].sstruct.field[16].name "arraymapfield" +documenttype[0].datatype[25].sstruct.field[16].id 1670805928 +documenttype[0].datatype[25].sstruct.field[16].id_v6 1940354311 +documenttype[0].datatype[25].sstruct.field[16].datatype 435886609 +documenttype[0].datatype[25].sstruct.field[16].detailedtype "" +documenttype[0].datatype[25].sstruct.field[17].name "arrarr" +documenttype[0].datatype[25].sstruct.field[17].id 1962567166 +documenttype[0].datatype[25].sstruct.field[17].id_v6 885141301 +documenttype[0].datatype[25].sstruct.field[17].datatype -794985308 +documenttype[0].datatype[25].sstruct.field[17].detailedtype "" +documenttype[0].datatype[25].sstruct.field[18].name "maparr" +documenttype[0].datatype[25].sstruct.field[18].id 904375219 +documenttype[0].datatype[25].sstruct.field[18].id_v6 63700074 +documenttype[0].datatype[25].sstruct.field[18].datatype 69621385 +documenttype[0].datatype[25].sstruct.field[18].detailedtype "" +documenttype[0].datatype[25].sstruct.field[19].name "complexarray" +documenttype[0].datatype[25].sstruct.field[19].id 795629533 +documenttype[0].datatype[25].sstruct.field[19].id_v6 658530305 +documenttype[0].datatype[25].sstruct.field[19].datatype 1416345047 +documenttype[0].datatype[25].sstruct.field[19].detailedtype "" +documenttype[0].datatype[25].sstruct.field[20].name "mystructfield" +documenttype[0].datatype[25].sstruct.field[20].id 1348513378 +documenttype[0].datatype[25].sstruct.field[20].id_v6 2033170300 +documenttype[0].datatype[25].sstruct.field[20].datatype -2092985853 +documenttype[0].datatype[25].sstruct.field[20].detailedtype "" +documenttype[0].datatype[25].sstruct.field[21].name "mystructmap" +documenttype[0].datatype[25].sstruct.field[21].id 1511423250 +documenttype[0].datatype[25].sstruct.field[21].id_v6 449602635 +documenttype[0].datatype[25].sstruct.field[21].datatype 1901258752 +documenttype[0].datatype[25].sstruct.field[21].detailedtype "" +documenttype[0].datatype[25].sstruct.field[22].name "mystructarr" +documenttype[0].datatype[25].sstruct.field[22].id 595856991 +documenttype[0].datatype[25].sstruct.field[22].id_v6 764861972 +documenttype[0].datatype[25].sstruct.field[22].datatype 759956026 +documenttype[0].datatype[25].sstruct.field[22].detailedtype "" +documenttype[0].datatype[25].sstruct.field[23].name "Folders" +documenttype[0].datatype[25].sstruct.field[23].id 34575524 +documenttype[0].datatype[25].sstruct.field[23].id_v6 280569744 +documenttype[0].datatype[25].sstruct.field[23].datatype -389833101 +documenttype[0].datatype[25].sstruct.field[23].detailedtype "" +documenttype[0].datatype[25].sstruct.field[24].name "juletre" +documenttype[0].datatype[25].sstruct.field[24].id 1039981530 +documenttype[0].datatype[25].sstruct.field[24].id_v6 2073084146 +documenttype[0].datatype[25].sstruct.field[24].datatype 4 +documenttype[0].datatype[25].sstruct.field[24].detailedtype "" +documenttype[0].datatype[25].sstruct.field[25].name "album0" +documenttype[0].datatype[25].sstruct.field[25].id 764312262 +documenttype[0].datatype[25].sstruct.field[25].id_v6 1409364160 +documenttype[0].datatype[25].sstruct.field[25].datatype 18 +documenttype[0].datatype[25].sstruct.field[25].detailedtype "" +documenttype[0].datatype[25].sstruct.field[26].name "album1" +documenttype[0].datatype[25].sstruct.field[26].id 1967160809 +documenttype[0].datatype[25].sstruct.field[26].id_v6 1833811264 +documenttype[0].datatype[25].sstruct.field[26].datatype 18 +documenttype[0].datatype[25].sstruct.field[26].detailedtype "" +documenttype[0].datatype[25].sstruct.field[27].name "other" +documenttype[0].datatype[25].sstruct.field[27].id 2443357 +documenttype[0].datatype[25].sstruct.field[27].id_v6 903806222 +documenttype[0].datatype[25].sstruct.field[27].datatype 4 +documenttype[0].datatype[25].sstruct.field[27].detailedtype "" +documenttype[0].datatype[25].sstruct.field[28].name "rankfeatures" +documenttype[0].datatype[25].sstruct.field[28].id 1883197392 +documenttype[0].datatype[25].sstruct.field[28].id_v6 699950698 +documenttype[0].datatype[25].sstruct.field[28].datatype 2 +documenttype[0].datatype[25].sstruct.field[28].detailedtype "" +documenttype[0].datatype[25].sstruct.field[29].name "summaryfeatures" +documenttype[0].datatype[25].sstruct.field[29].id 1840337115 +documenttype[0].datatype[25].sstruct.field[29].id_v6 1981648971 +documenttype[0].datatype[25].sstruct.field[29].datatype 2 +documenttype[0].datatype[25].sstruct.field[29].detailedtype "" documenttype[0].datatype[26].id 348447225 documenttype[0].datatype[26].type STRUCT documenttype[0].datatype[26].array.element.id 0 @@ -605,11 +610,6 @@ documenttype[0].datatype[26].sstruct.compression.type NONE documenttype[0].datatype[26].sstruct.compression.level 0 documenttype[0].datatype[26].sstruct.compression.threshold 95 documenttype[0].datatype[26].sstruct.compression.minsize 200 -documenttype[0].datatype[26].sstruct.field[0].name "complexarray" -documenttype[0].datatype[26].sstruct.field[0].id 795629533 -documenttype[0].datatype[26].sstruct.field[0].id_v6 658530305 -documenttype[0].datatype[26].sstruct.field[0].datatype 1416345047 -documenttype[0].datatype[26].sstruct.field[0].detailedtype "" documenttype[0].fieldsets{[document]}.fields[0] "Folders" documenttype[0].fieldsets{[document]}.fields[1] "abyte" documenttype[0].fieldsets{[document]}.fields[2] "album0" @@ -636,4 +636,4 @@ documenttype[0].fieldsets{[document]}.fields[22] "setfield4" documenttype[0].fieldsets{[document]}.fields[23] "stringmapfield" documenttype[0].fieldsets{[document]}.fields[24] "structarrayfield" documenttype[0].fieldsets{[document]}.fields[25] "structfield" -documenttype[0].fieldsets{[document]}.fields[26] "tagfield"
\ No newline at end of file +documenttype[0].fieldsets{[document]}.fields[26] "tagfield" diff --git a/config-model/src/test/derived/advanced/ilscripts.cfg b/config-model/src/test/derived/advanced/ilscripts.cfg index faf39ddc4d9..b78cb892501 100644 --- a/config-model/src/test/derived/advanced/ilscripts.cfg +++ b/config-model/src/test/derived/advanced/ilscripts.cfg @@ -12,9 +12,9 @@ ilscript[].content[] "clear_state | guard { 1 | set_var superdupermod; 2 | set_v ilscript[].content[] "clear_state | guard { 0 | set_var superduperus | set_var superdupereu | set_var superduperasia; input debug_src | lowercase | tokenize normalize | summary debug | index debug | split \";\" | for_each { switch { case \"superduperus\": 10 | set_var superduperus; case \"superdupereu\": 10 | set_var superdupereu; case \"superduperasia\": 10 | set_var superduperasia; } }; }" ilscript[].content[] "clear_state | guard { input location_str | to_pos | zcurve | attribute location_zcurve; }" ilscript[].content[] "clear_state | guard { input title_src | summary mysummary; }" -ilscript[].content[] "clear_state | guard { input product_src | switch { case \"\": \"myweb\" | tokenize stem:\"SHORTEST\" | index product | summary product; default: input product_src | tokenize stem:\"SHORTEST\" | index product | summary product; }; }" -ilscript[].content[] "clear_state | guard { if (input product2_src == \"foo\") { \"bar\" | tokenize stem:\"SHORTEST\" | index product2; } else { \"baz\" | tokenize stem:\"SHORTEST\" | index product2; }; }" -ilscript[].content[] "clear_state | guard { input product3_src | switch { case \"\": \"myweb\" | tokenize stem:\"SHORTEST\" | index product3 | summary product3; default: input product3_src | tokenize stem:\"SHORTEST\" | index product3 | summary product3; }; }" +ilscript[].content[] "clear_state | guard { input product_src | switch { case \"\": \"myweb\" | tokenize stem:\"BEST\" | index product | summary product; default: input product_src | tokenize stem:\"BEST\" | index product | summary product; }; }" +ilscript[].content[] "clear_state | guard { if (input product2_src == \"foo\") { \"bar\" | tokenize stem:\"BEST\" | index product2; } else { \"baz\" | tokenize stem:\"BEST\" | index product2; }; }" +ilscript[].content[] "clear_state | guard { input product3_src | switch { case \"\": \"myweb\" | tokenize stem:\"BEST\" | index product3 | summary product3; default: input product3_src | tokenize stem:\"BEST\" | index product3 | summary product3; }; }" ilscript[].content[] "clear_state | guard { input title_src | tokenize normalize | index title; }" ilscript[].content[] "clear_state | guard { input title_src | summary title_s; }" ilscript[].content[] "input attributes_src | passthrough attributes_src" diff --git a/config-model/src/test/derived/advanced/index-info.cfg b/config-model/src/test/derived/advanced/index-info.cfg index a927e9635a3..07b58814ea3 100644 --- a/config-model/src/test/derived/advanced/index-info.cfg +++ b/config-model/src/test/derived/advanced/index-info.cfg @@ -60,7 +60,7 @@ indexinfo[].command[].command "index" indexinfo[].command[].indexname "product" indexinfo[].command[].command "lowercase" indexinfo[].command[].indexname "product" -indexinfo[].command[].command "stem:SHORTEST" +indexinfo[].command[].command "stem:BEST" indexinfo[].command[].indexname "product" indexinfo[].command[].command "plain-tokens" indexinfo[].command[].indexname "product2" @@ -68,7 +68,7 @@ indexinfo[].command[].command "index" indexinfo[].command[].indexname "product2" indexinfo[].command[].command "lowercase" indexinfo[].command[].indexname "product2" -indexinfo[].command[].command "stem:SHORTEST" +indexinfo[].command[].command "stem:BEST" indexinfo[].command[].indexname "product2" indexinfo[].command[].command "plain-tokens" indexinfo[].command[].indexname "product3" @@ -76,7 +76,7 @@ indexinfo[].command[].command "index" indexinfo[].command[].indexname "product3" indexinfo[].command[].command "lowercase" indexinfo[].command[].indexname "product3" -indexinfo[].command[].command "stem:SHORTEST" +indexinfo[].command[].command "stem:BEST" indexinfo[].command[].indexname "product3" indexinfo[].command[].command "plain-tokens" indexinfo[].command[].indexname "rankfeatures" diff --git a/config-model/src/test/derived/arrays/ilscripts.cfg b/config-model/src/test/derived/arrays/ilscripts.cfg index c48f4a22ce7..0490835db33 100644 --- a/config-model/src/test/derived/arrays/ilscripts.cfg +++ b/config-model/src/test/derived/arrays/ilscripts.cfg @@ -6,8 +6,8 @@ ilscript[].docfield[] "ratings" ilscript[].docfield[] "a" ilscript[].docfield[] "b" ilscript[].docfield[] "c" -ilscript[].content[] "clear_state | guard { input tags | for_each { tokenize normalize stem:\"SHORTEST\" } | summary tags | index tags; }" +ilscript[].content[] "clear_state | guard { input tags | for_each { tokenize normalize stem:\"BEST\" } | summary tags | index tags; }" ilscript[].content[] "clear_state | guard { input ratings | summary ratings | attribute ratings; }" -ilscript[].content[] "clear_state | guard { input a | tokenize normalize stem:\"SHORTEST\" | index a; }" -ilscript[].content[] "clear_state | guard { input b | for_each { tokenize normalize stem:\"SHORTEST\" } | index b | attribute b; }" -ilscript[].content[] "clear_state | guard { input c | for_each { tokenize normalize stem:\"SHORTEST\" } | summary c | index c; }" +ilscript[].content[] "clear_state | guard { input a | tokenize normalize stem:\"BEST\" | index a; }" +ilscript[].content[] "clear_state | guard { input b | for_each { tokenize normalize stem:\"BEST\" } | index b | attribute b; }" +ilscript[].content[] "clear_state | guard { input c | for_each { tokenize normalize stem:\"BEST\" } | summary c | index c; }" diff --git a/config-model/src/test/derived/arrays/index-info.cfg b/config-model/src/test/derived/arrays/index-info.cfg index abd5fef2ba9..b18f1eaf55f 100644 --- a/config-model/src/test/derived/arrays/index-info.cfg +++ b/config-model/src/test/derived/arrays/index-info.cfg @@ -10,7 +10,7 @@ indexinfo[].command[].command "lowercase" indexinfo[].command[].indexname "tags" indexinfo[].command[].command "multivalue" indexinfo[].command[].indexname "tags" -indexinfo[].command[].command "stem:SHORTEST" +indexinfo[].command[].command "stem:BEST" indexinfo[].command[].indexname "tags" indexinfo[].command[].command "normalize" indexinfo[].command[].indexname "tags" @@ -26,7 +26,7 @@ indexinfo[].command[].command "index" indexinfo[].command[].indexname "a" indexinfo[].command[].command "lowercase" indexinfo[].command[].indexname "a" -indexinfo[].command[].command "stem:SHORTEST" +indexinfo[].command[].command "stem:BEST" indexinfo[].command[].indexname "a" indexinfo[].command[].command "normalize" indexinfo[].command[].indexname "a" @@ -38,7 +38,7 @@ indexinfo[].command[].command "lowercase" indexinfo[].command[].indexname "b" indexinfo[].command[].command "multivalue" indexinfo[].command[].indexname "b" -indexinfo[].command[].command "stem:SHORTEST" +indexinfo[].command[].command "stem:BEST" indexinfo[].command[].indexname "b" indexinfo[].command[].command "normalize" indexinfo[].command[].indexname "b" @@ -50,7 +50,7 @@ indexinfo[].command[].command "lowercase" indexinfo[].command[].indexname "c" indexinfo[].command[].command "multivalue" indexinfo[].command[].indexname "c" -indexinfo[].command[].command "stem:SHORTEST" +indexinfo[].command[].command "stem:BEST" indexinfo[].command[].indexname "c" indexinfo[].command[].command "normalize" indexinfo[].command[].indexname "c" @@ -68,6 +68,6 @@ indexinfo[].command[].command "index" indexinfo[].command[].indexname "default" indexinfo[].command[].command "plain-tokens" indexinfo[].command[].indexname "default" -indexinfo[].command[].command "stem:SHORTEST" +indexinfo[].command[].command "stem:BEST" indexinfo[].command[].indexname "default" indexinfo[].command[].command "normalize" diff --git a/config-model/src/test/derived/attributeprefetch/attributeprefetch.sd b/config-model/src/test/derived/attributeprefetch/attributeprefetch.sd index 0bf6b7a037d..ef3755e90d7 100644 --- a/config-model/src/test/derived/attributeprefetch/attributeprefetch.sd +++ b/config-model/src/test/derived/attributeprefetch/attributeprefetch.sd @@ -3,81 +3,63 @@ search prefetch { document prefetch { field singlebyte type byte { indexing: attribute - attribute: prefetch } field multibyte type array<byte> { indexing: attribute - attribute: prefetch } field wsbyte type weightedset<byte> { indexing: attribute - attribute: prefetch } field singleint type int { indexing: attribute - attribute: prefetch } field multiint type array<int> { indexing: attribute - attribute: prefetch } field wsint type weightedset<int> { indexing: attribute - attribute: prefetch } field singlelong type long { indexing: attribute - attribute: prefetch } field multilong type array<long> { indexing: attribute - attribute: prefetch } field wslong type weightedset<long> { indexing: attribute - attribute: prefetch } field singlefloat type float { indexing: attribute - attribute: prefetch } field multifloat type array<float> { indexing: attribute - attribute: prefetch } field wsfloat type weightedset<float> { indexing: attribute - attribute: prefetch } field singledouble type double { indexing: attribute - attribute: prefetch } field multidouble type array<double> { indexing: attribute - attribute: prefetch } field wsdouble type weightedset<double> { indexing: attribute - attribute: prefetch } field singlestring type string { indexing: attribute - attribute: prefetch match { token } } field multistring type array<string> { indexing: attribute - attribute: prefetch match { token } } field wsstring type weightedset<string> { indexing: attribute - attribute: prefetch match { token } diff --git a/config-model/src/test/derived/attributeprefetch/summary.cfg b/config-model/src/test/derived/attributeprefetch/summary.cfg index a0d7bc11662..13b17464946 100644 --- a/config-model/src/test/derived/attributeprefetch/summary.cfg +++ b/config-model/src/test/derived/attributeprefetch/summary.cfg @@ -1,51 +1,27 @@ defaultsummaryid 1151071433 -classes[].id 1151071433 -classes[].name "default" -classes[].fields[].name "rankfeatures" -classes[].fields[].type "featuredata" -classes[].fields[].name "summaryfeatures" -classes[].fields[].type "featuredata" -classes[].fields[].name "documentid" -classes[].fields[].type "longstring" -classes[].id 1279606967 -classes[].name "attributeprefetch" -classes[].fields[].name "singlebyte" -classes[].fields[].type "byte" -classes[].fields[].name "multibyte" -classes[].fields[].type "jsonstring" -classes[].fields[].name "wsbyte" -classes[].fields[].type "jsonstring" -classes[].fields[].name "singleint" -classes[].fields[].type "integer" -classes[].fields[].name "multiint" -classes[].fields[].type "jsonstring" -classes[].fields[].name "wsint" -classes[].fields[].type "jsonstring" -classes[].fields[].name "singlelong" -classes[].fields[].type "int64" -classes[].fields[].name "multilong" -classes[].fields[].type "jsonstring" -classes[].fields[].name "wslong" -classes[].fields[].type "jsonstring" -classes[].fields[].name "singlefloat" -classes[].fields[].type "float" -classes[].fields[].name "multifloat" -classes[].fields[].type "jsonstring" -classes[].fields[].name "wsfloat" -classes[].fields[].type "jsonstring" -classes[].fields[].name "singledouble" -classes[].fields[].type "double" -classes[].fields[].name "multidouble" -classes[].fields[].type "jsonstring" -classes[].fields[].name "wsdouble" -classes[].fields[].type "jsonstring" -classes[].fields[].name "singlestring" -classes[].fields[].type "longstring" -classes[].fields[].name "multistring" -classes[].fields[].type "jsonstring" -classes[].fields[].name "wsstring" -classes[].fields[].type "jsonstring" -classes[].fields[].name "rankfeatures" -classes[].fields[].type "featuredata" -classes[].fields[].name "summaryfeatures" -classes[].fields[].type "featuredata" +classes[0].id 1151071433 +classes[0].name "default" +classes[0].fields[0].name "rankfeatures" +classes[0].fields[0].type "featuredata" +classes[0].fields[1].name "summaryfeatures" +classes[0].fields[1].type "featuredata" +classes[0].fields[2].name "documentid" +classes[0].fields[2].type "longstring" +classes[1].id 1980470965 +classes[1].name "attributeprefetch" +classes[1].fields[0].name "singlebyte" +classes[1].fields[0].type "byte" +classes[1].fields[1].name "singleint" +classes[1].fields[1].type "integer" +classes[1].fields[2].name "singlelong" +classes[1].fields[2].type "int64" +classes[1].fields[3].name "singlefloat" +classes[1].fields[3].type "float" +classes[1].fields[4].name "singledouble" +classes[1].fields[4].type "double" +classes[1].fields[5].name "singlestring" +classes[1].fields[5].type "longstring" +classes[1].fields[6].name "rankfeatures" +classes[1].fields[6].type "featuredata" +classes[1].fields[7].name "summaryfeatures" +classes[1].fields[7].type "featuredata"
\ No newline at end of file diff --git a/config-model/src/test/derived/attributeprefetch/summarymap.cfg b/config-model/src/test/derived/attributeprefetch/summarymap.cfg index ca1cff1b640..28bc686a266 100644 --- a/config-model/src/test/derived/attributeprefetch/summarymap.cfg +++ b/config-model/src/test/derived/attributeprefetch/summarymap.cfg @@ -1,61 +1,25 @@ defaultoutputclass -1 -override[].field "rankfeatures" -override[].command "rankfeatures" -override[].arguments "" -override[].field "summaryfeatures" -override[].command "summaryfeatures" -override[].arguments "" -override[].field "singlebyte" -override[].command "attribute" -override[].arguments "singlebyte" -override[].field "multibyte" -override[].command "attribute" -override[].arguments "multibyte" -override[].field "wsbyte" -override[].command "attribute" -override[].arguments "wsbyte" -override[].field "singleint" -override[].command "attribute" -override[].arguments "singleint" -override[].field "multiint" -override[].command "attribute" -override[].arguments "multiint" -override[].field "wsint" -override[].command "attribute" -override[].arguments "wsint" -override[].field "singlelong" -override[].command "attribute" -override[].arguments "singlelong" -override[].field "multilong" -override[].command "attribute" -override[].arguments "multilong" -override[].field "wslong" -override[].command "attribute" -override[].arguments "wslong" -override[].field "singlefloat" -override[].command "attribute" -override[].arguments "singlefloat" -override[].field "multifloat" -override[].command "attribute" -override[].arguments "multifloat" -override[].field "wsfloat" -override[].command "attribute" -override[].arguments "wsfloat" -override[].field "singledouble" -override[].command "attribute" -override[].arguments "singledouble" -override[].field "multidouble" -override[].command "attribute" -override[].arguments "multidouble" -override[].field "wsdouble" -override[].command "attribute" -override[].arguments "wsdouble" -override[].field "singlestring" -override[].command "attribute" -override[].arguments "singlestring" -override[].field "multistring" -override[].command "attribute" -override[].arguments "multistring" -override[].field "wsstring" -override[].command "attribute" -override[].arguments "wsstring" +override[0].field "rankfeatures" +override[0].command "rankfeatures" +override[0].arguments "" +override[1].field "summaryfeatures" +override[1].command "summaryfeatures" +override[1].arguments "" +override[2].field "singlebyte" +override[2].command "attribute" +override[2].arguments "singlebyte" +override[3].field "singleint" +override[3].command "attribute" +override[3].arguments "singleint" +override[4].field "singlelong" +override[4].command "attribute" +override[4].arguments "singlelong" +override[5].field "singlefloat" +override[5].command "attribute" +override[5].arguments "singlefloat" +override[6].field "singledouble" +override[6].command "attribute" +override[6].arguments "singledouble" +override[7].field "singlestring" +override[7].command "attribute" +override[7].arguments "singlestring"
\ No newline at end of file diff --git a/config-model/src/test/derived/attributes/ilscripts.cfg b/config-model/src/test/derived/attributes/ilscripts.cfg index 08bf52021d7..536394ab11d 100644 --- a/config-model/src/test/derived/attributes/ilscripts.cfg +++ b/config-model/src/test/derived/attributes/ilscripts.cfg @@ -26,13 +26,13 @@ ilscript[].content[] "clear_state | guard { input a1 | attribute a1 | summary a1 ilscript[].content[] "clear_state | guard { input a2 | attribute a2 | summary a2; }" ilscript[].content[] "clear_state | guard { input a3 | attribute a3 | summary a3; }" ilscript[].content[] "clear_state | guard { input a4 | summary a4; }" -ilscript[].content[] "clear_state | guard { input a5 | tokenize normalize stem:\"SHORTEST\" | attribute a5 | summary a5 | index a5; }" -ilscript[].content[] "clear_state | guard { input a6 | tokenize normalize stem:\"SHORTEST\" | attribute a6 | summary a6 | index a6; }" +ilscript[].content[] "clear_state | guard { input a5 | tokenize normalize stem:\"BEST\" | attribute a5 | summary a5 | index a5; }" +ilscript[].content[] "clear_state | guard { input a6 | tokenize normalize stem:\"BEST\" | attribute a6 | summary a6 | index a6; }" ilscript[].content[] "clear_state | guard { input a7 | summary a7; }" ilscript[].content[] "clear_state | guard { input a8 | summary a8; }" ilscript[].content[] "clear_state | guard { input b1 | attribute b1 | summary b1; }" -ilscript[].content[] "clear_state | guard { input b2 | tokenize normalize stem:\"SHORTEST\" | attribute b2 | summary b2 | index b2; }" -ilscript[].content[] "clear_state | guard { input b3 | tokenize normalize stem:\"SHORTEST\" | attribute b3 | summary b3 | index b3; }" +ilscript[].content[] "clear_state | guard { input b2 | tokenize normalize stem:\"BEST\" | attribute b2 | summary b2 | index b2; }" +ilscript[].content[] "clear_state | guard { input b3 | tokenize normalize stem:\"BEST\" | attribute b3 | summary b3 | index b3; }" ilscript[].content[] "clear_state | guard { input b4 | attribute b4 | summary b4; }" ilscript[].content[] "clear_state | guard { input b5 | summary b5 | attribute b5; }" ilscript[].content[] "clear_state | guard { input b6 | summary b6 | attribute b6; }" diff --git a/config-model/src/test/derived/attributes/index-info.cfg b/config-model/src/test/derived/attributes/index-info.cfg index ef96a1dd310..df33a41b066 100644 --- a/config-model/src/test/derived/attributes/index-info.cfg +++ b/config-model/src/test/derived/attributes/index-info.cfg @@ -22,7 +22,7 @@ indexinfo[].command[].command "index" indexinfo[].command[].indexname "a5" indexinfo[].command[].command "lowercase" indexinfo[].command[].indexname "a5" -indexinfo[].command[].command "stem:SHORTEST" +indexinfo[].command[].command "stem:BEST" indexinfo[].command[].indexname "a5" indexinfo[].command[].command "normalize" indexinfo[].command[].indexname "a5" @@ -32,7 +32,7 @@ indexinfo[].command[].command "index" indexinfo[].command[].indexname "a6" indexinfo[].command[].command "lowercase" indexinfo[].command[].indexname "a6" -indexinfo[].command[].command "stem:SHORTEST" +indexinfo[].command[].command "stem:BEST" indexinfo[].command[].indexname "a6" indexinfo[].command[].command "normalize" indexinfo[].command[].indexname "a6" @@ -52,7 +52,7 @@ indexinfo[].command[].command "index" indexinfo[].command[].indexname "b2" indexinfo[].command[].command "lowercase" indexinfo[].command[].indexname "b2" -indexinfo[].command[].command "stem:SHORTEST" +indexinfo[].command[].command "stem:BEST" indexinfo[].command[].indexname "b2" indexinfo[].command[].command "normalize" indexinfo[].command[].indexname "b2" @@ -62,7 +62,7 @@ indexinfo[].command[].command "index" indexinfo[].command[].indexname "b3" indexinfo[].command[].command "lowercase" indexinfo[].command[].indexname "b3" -indexinfo[].command[].command "stem:SHORTEST" +indexinfo[].command[].command "stem:BEST" indexinfo[].command[].indexname "b3" indexinfo[].command[].command "normalize" indexinfo[].command[].indexname "b3" @@ -144,7 +144,7 @@ indexinfo[].command[].command "index" indexinfo[].command[].indexname "default" indexinfo[].command[].command "plain-tokens" indexinfo[].command[].indexname "default" -indexinfo[].command[].command "stem:SHORTEST" +indexinfo[].command[].command "stem:BEST" indexinfo[].command[].indexname "default" indexinfo[].command[].command "normalize" indexinfo[].alias[].alias "date" diff --git a/config-model/src/test/derived/combinedattributeandindexsearch/index-info.cfg b/config-model/src/test/derived/combinedattributeandindexsearch/index-info.cfg index 85939113adf..d34b6557e3b 100644 --- a/config-model/src/test/derived/combinedattributeandindexsearch/index-info.cfg +++ b/config-model/src/test/derived/combinedattributeandindexsearch/index-info.cfg @@ -8,7 +8,7 @@ indexinfo[].command[].command "index" indexinfo[].command[].indexname "index1" indexinfo[].command[].command "lowercase" indexinfo[].command[].indexname "index1" -indexinfo[].command[].command "stem:SHORTEST" +indexinfo[].command[].command "stem:BEST" indexinfo[].command[].indexname "index1" indexinfo[].command[].command "normalize" indexinfo[].command[].indexname "index1" @@ -18,7 +18,7 @@ indexinfo[].command[].command "index" indexinfo[].command[].indexname "index2" indexinfo[].command[].command "lowercase" indexinfo[].command[].indexname "index2" -indexinfo[].command[].command "stem:SHORTEST" +indexinfo[].command[].command "stem:BEST" indexinfo[].command[].indexname "index2" indexinfo[].command[].command "normalize" indexinfo[].command[].indexname "index2" @@ -42,6 +42,6 @@ indexinfo[].command[].command "index" indexinfo[].command[].indexname "default" indexinfo[].command[].command "plain-tokens" indexinfo[].command[].indexname "default" -indexinfo[].command[].command "stem:SHORTEST" +indexinfo[].command[].command "stem:BEST" indexinfo[].command[].indexname "default" indexinfo[].command[].command "normalize" diff --git a/config-model/src/test/derived/complex/ilscripts.cfg b/config-model/src/test/derived/complex/ilscripts.cfg index dfef7058936..f7f6c9dd720 100644 --- a/config-model/src/test/derived/complex/ilscripts.cfg +++ b/config-model/src/test/derived/complex/ilscripts.cfg @@ -23,11 +23,11 @@ ilscript[].docfield[] "combineda" ilscript[].docfield[] "combinedb" ilscript[].docfield[] "category" ilscript[].content[] "clear_state | guard { input title . input category | tokenize | summary exact | index exact; }" -ilscript[].content[] "clear_state | guard { input location | tokenize normalize stem:\"SHORTEST\" | summary woe | index woe; }" +ilscript[].content[] "clear_state | guard { input location | tokenize normalize stem:\"BEST\" | summary woe | index woe; }" ilscript[].content[] "clear_state | guard { input yEaR | to_array | attribute year_arr; }" ilscript[].content[] "clear_state | guard { input yEaR - 1900 | attribute year_sub; }" -ilscript[].content[] "clear_state | guard { input title | tokenize normalize stem:\"SHORTEST\" | index title | summary title; }" -ilscript[].content[] "clear_state | guard { input dyntitle | tokenize normalize stem:\"SHORTEST\" | summary dyntitle; }" +ilscript[].content[] "clear_state | guard { input title | tokenize normalize stem:\"BEST\" | index title | summary title; }" +ilscript[].content[] "clear_state | guard { input dyntitle | tokenize normalize stem:\"BEST\" | summary dyntitle; }" ilscript[].content[] "clear_state | guard { input special1 | tokenize normalize | index special1; }" ilscript[].content[] "clear_state | guard { input special2 | tokenize normalize | index special2; }" ilscript[].content[] "clear_state | guard { input special3 | tokenize normalize | index special3; }" @@ -38,12 +38,12 @@ ilscript[].content[] "clear_state | guard { input fleeting | attribute fleeting; ilscript[].content[] "clear_state | guard { input fleeting2 | attribute fleeting2; }" ilscript[].content[] "clear_state | guard { input foundat | attribute foundat; }" ilscript[].content[] "clear_state | guard { input collapseby | attribute collapseby; }" -ilscript[].content[] "clear_state | guard { input stringfield | tokenize normalize stem:\"SHORTEST\" | summary stringfield | index stringfield; }" -ilscript[].content[] "clear_state | guard { input exactemento | tokenize normalize stem:\"SHORTEST\" | index exactemento; }" -ilscript[].content[] "clear_state | guard { input exactagain | tokenize normalize stem:\"SHORTEST\" | index exactagain; }" +ilscript[].content[] "clear_state | guard { input stringfield | tokenize normalize stem:\"BEST\" | summary stringfield | index stringfield; }" +ilscript[].content[] "clear_state | guard { input exactemento | tokenize normalize stem:\"BEST\" | index exactemento; }" +ilscript[].content[] "clear_state | guard { input exactagain | tokenize normalize stem:\"BEST\" | index exactagain; }" ilscript[].content[] "clear_state | guard { input ts | attribute ts; }" ilscript[].content[] "clear_state | guard { input combineda | attribute combineda; }" -ilscript[].content[] "clear_state | guard { input combinedb | tokenize normalize stem:\"SHORTEST\" | index combinedb; }" +ilscript[].content[] "clear_state | guard { input combinedb | tokenize normalize stem:\"BEST\" | index combinedb; }" ilscript[].content[] "input category | passthrough category" ilscript[].content[] "input location | passthrough location" ilscript[].content[] "input yEaR | passthrough yEaR" diff --git a/config-model/src/test/derived/emptydefault/ilscripts.cfg b/config-model/src/test/derived/emptydefault/ilscripts.cfg index 66dbf01d214..b17920fcaab 100644 --- a/config-model/src/test/derived/emptydefault/ilscripts.cfg +++ b/config-model/src/test/derived/emptydefault/ilscripts.cfg @@ -3,5 +3,5 @@ fieldmatchmaxlength 1000000 ilscript[].doctype "emptydefault" ilscript[].docfield[] "one" ilscript[].docfield[] "two" -ilscript[].content[] "clear_state | guard { input one | tokenize normalize stem:\"SHORTEST\" | index one; }" -ilscript[].content[] "clear_state | guard { input two | tokenize normalize stem:\"SHORTEST\" | index two; }" +ilscript[].content[] "clear_state | guard { input one | tokenize normalize stem:\"BEST\" | index one; }" +ilscript[].content[] "clear_state | guard { input two | tokenize normalize stem:\"BEST\" | index two; }" diff --git a/config-model/src/test/derived/emptydefault/index-info.cfg b/config-model/src/test/derived/emptydefault/index-info.cfg index d773f544abb..fbb4c3ebbea 100644 --- a/config-model/src/test/derived/emptydefault/index-info.cfg +++ b/config-model/src/test/derived/emptydefault/index-info.cfg @@ -8,7 +8,7 @@ indexinfo[].command[].command "index" indexinfo[].command[].indexname "one" indexinfo[].command[].command "lowercase" indexinfo[].command[].indexname "one" -indexinfo[].command[].command "stem:SHORTEST" +indexinfo[].command[].command "stem:BEST" indexinfo[].command[].indexname "one" indexinfo[].command[].command "normalize" indexinfo[].command[].indexname "one" @@ -18,7 +18,7 @@ indexinfo[].command[].command "index" indexinfo[].command[].indexname "two" indexinfo[].command[].command "lowercase" indexinfo[].command[].indexname "two" -indexinfo[].command[].command "stem:SHORTEST" +indexinfo[].command[].command "stem:BEST" indexinfo[].command[].indexname "two" indexinfo[].command[].command "normalize" indexinfo[].command[].indexname "two" diff --git a/config-model/src/test/derived/imported_position_field/imported-fields.cfg b/config-model/src/test/derived/imported_position_field/imported-fields.cfg index 51b371827c5..5ce853e17f2 100644 --- a/config-model/src/test/derived/imported_position_field/imported-fields.cfg +++ b/config-model/src/test/derived/imported_position_field/imported-fields.cfg @@ -1,5 +1,3 @@ attribute[0].name "my_pos_zcurve" attribute[0].referencefield "parent_ref" attribute[0].targetfield "pos_zcurve" -attribute[0].datatype NONE -attribute[0].collectiontype SINGLE
\ No newline at end of file diff --git a/config-model/src/test/derived/imported_struct_fields/imported-fields.cfg b/config-model/src/test/derived/imported_struct_fields/imported-fields.cfg index 772e5cffec9..699a3045075 100644 --- a/config-model/src/test/derived/imported_struct_fields/imported-fields.cfg +++ b/config-model/src/test/derived/imported_struct_fields/imported-fields.cfg @@ -1,35 +1,21 @@ attribute[0].name "my_elem_array.name" attribute[0].referencefield "parent_ref" attribute[0].targetfield "elem_array.name" -attribute[0].datatype NONE -attribute[0].collectiontype SINGLE attribute[1].name "my_elem_array.weight" attribute[1].referencefield "parent_ref" attribute[1].targetfield "elem_array.weight" -attribute[1].datatype NONE -attribute[1].collectiontype SINGLE attribute[2].name "my_elem_map.key" attribute[2].referencefield "parent_ref" attribute[2].targetfield "elem_map.key" -attribute[2].datatype NONE -attribute[2].collectiontype SINGLE attribute[3].name "my_elem_map.value.name" attribute[3].referencefield "parent_ref" attribute[3].targetfield "elem_map.value.name" -attribute[3].datatype NONE -attribute[3].collectiontype SINGLE attribute[4].name "my_elem_map.value.weight" attribute[4].referencefield "parent_ref" attribute[4].targetfield "elem_map.value.weight" -attribute[4].datatype NONE -attribute[4].collectiontype SINGLE attribute[5].name "my_str_int_map.key" attribute[5].referencefield "parent_ref" attribute[5].targetfield "str_int_map.key" -attribute[5].datatype NONE -attribute[5].collectiontype SINGLE attribute[6].name "my_str_int_map.value" attribute[6].referencefield "parent_ref" attribute[6].targetfield "str_int_map.value" -attribute[6].datatype NONE -attribute[6].collectiontype SINGLE
\ No newline at end of file diff --git a/config-model/src/test/derived/importedfields/imported-fields.cfg b/config-model/src/test/derived/importedfields/imported-fields.cfg index d1895d02290..c8de7d4fb7e 100644 --- a/config-model/src/test/derived/importedfields/imported-fields.cfg +++ b/config-model/src/test/derived/importedfields/imported-fields.cfg @@ -1,25 +1,15 @@ attribute[].name "my_int_field" attribute[].referencefield "a_ref" attribute[].targetfield "int_field" -attribute[].datatype NONE -attribute[].collectiontype SINGLE attribute[].name "my_string_field" attribute[].referencefield "b_ref" attribute[].targetfield "string_field" -attribute[].datatype NONE -attribute[].collectiontype SINGLE attribute[].name "my_int_array_field" attribute[].referencefield "a_ref" attribute[].targetfield "int_array_field" -attribute[].datatype NONE -attribute[].collectiontype SINGLE attribute[].name "my_int_wset_field" attribute[].referencefield "a_ref" attribute[].targetfield "int_wset_field" -attribute[].datatype NONE -attribute[].collectiontype SINGLE attribute[].name "my_ancient_int_field" attribute[].referencefield "a_ref" attribute[].targetfield "ancient_int_field" -attribute[].datatype NONE -attribute[].collectiontype SINGLE diff --git a/config-model/src/test/derived/indexinfo_fieldsets/index-info.cfg b/config-model/src/test/derived/indexinfo_fieldsets/index-info.cfg index aad17d1dbf2..3e0bad5e172 100644 --- a/config-model/src/test/derived/indexinfo_fieldsets/index-info.cfg +++ b/config-model/src/test/derived/indexinfo_fieldsets/index-info.cfg @@ -24,7 +24,7 @@ indexinfo[].command[].command "index" indexinfo[].command[].indexname "nonormalizing1" indexinfo[].command[].command "lowercase" indexinfo[].command[].indexname "nonormalizing1" -indexinfo[].command[].command "stem:SHORTEST" +indexinfo[].command[].command "stem:BEST" indexinfo[].command[].indexname "nonormalizing1" indexinfo[].command[].command "plain-tokens" indexinfo[].command[].indexname "nonormalizing2" @@ -32,7 +32,7 @@ indexinfo[].command[].command "index" indexinfo[].command[].indexname "nonormalizing2" indexinfo[].command[].command "lowercase" indexinfo[].command[].indexname "nonormalizing2" -indexinfo[].command[].command "stem:SHORTEST" +indexinfo[].command[].command "stem:BEST" indexinfo[].command[].indexname "nonormalizing2" indexinfo[].command[].command "plain-tokens" indexinfo[].command[].indexname "exact1" @@ -66,7 +66,7 @@ indexinfo[].command[].command "index" indexinfo[].command[].indexname "nonormalizing" indexinfo[].command[].command "plain-tokens" indexinfo[].command[].indexname "nonormalizing" -indexinfo[].command[].command "stem:SHORTEST" +indexinfo[].command[].command "stem:BEST" indexinfo[].command[].indexname "exact" indexinfo[].command[].command "lowercase" indexinfo[].command[].indexname "exact" diff --git a/config-model/src/test/derived/indexinfo_lowercase/index-info.cfg b/config-model/src/test/derived/indexinfo_lowercase/index-info.cfg index f78daad6f58..d397e37804c 100644 --- a/config-model/src/test/derived/indexinfo_lowercase/index-info.cfg +++ b/config-model/src/test/derived/indexinfo_lowercase/index-info.cfg @@ -20,7 +20,7 @@ indexinfo[].command[].command "index" indexinfo[].command[].indexname "nc_index" indexinfo[].command[].command "lowercase" indexinfo[].command[].indexname "nc_index" -indexinfo[].command[].command "stem:SHORTEST" +indexinfo[].command[].command "stem:BEST" indexinfo[].command[].indexname "nc_index" indexinfo[].command[].command "normalize" indexinfo[].command[].indexname "nc_index" @@ -40,7 +40,7 @@ indexinfo[].command[].command "index" indexinfo[].command[].indexname "lc_index" indexinfo[].command[].command "lowercase" indexinfo[].command[].indexname "lc_index" -indexinfo[].command[].command "stem:SHORTEST" +indexinfo[].command[].command "stem:BEST" indexinfo[].command[].indexname "lc_index" indexinfo[].command[].command "normalize" indexinfo[].command[].indexname "lc_index" @@ -68,7 +68,7 @@ indexinfo[].command[].command "index" indexinfo[].command[].indexname "lc_set2" indexinfo[].command[].command "plain-tokens" indexinfo[].command[].indexname "lc_set2" -indexinfo[].command[].command "stem:SHORTEST" +indexinfo[].command[].command "stem:BEST" indexinfo[].command[].indexname "lc_set2" indexinfo[].command[].command "normalize" indexinfo[].command[].indexname "lc_set3" @@ -84,7 +84,7 @@ indexinfo[].command[].command "index" indexinfo[].command[].indexname "lc_set4" indexinfo[].command[].command "plain-tokens" indexinfo[].command[].indexname "lc_set4" -indexinfo[].command[].command "stem:SHORTEST" +indexinfo[].command[].command "stem:BEST" indexinfo[].command[].indexname "lc_set4" indexinfo[].command[].command "normalize" indexinfo[].command[].indexname "lc_set5" @@ -102,7 +102,7 @@ indexinfo[].command[].command "index" indexinfo[].command[].indexname "lc_set6" indexinfo[].command[].command "plain-tokens" indexinfo[].command[].indexname "lc_set6" -indexinfo[].command[].command "stem:SHORTEST" +indexinfo[].command[].command "stem:BEST" indexinfo[].command[].indexname "lc_set6" indexinfo[].command[].command "normalize" indexinfo[].command[].indexname "lc_set7" @@ -112,7 +112,7 @@ indexinfo[].command[].command "index" indexinfo[].command[].indexname "lc_set7" indexinfo[].command[].command "plain-tokens" indexinfo[].command[].indexname "lc_set7" -indexinfo[].command[].command "stem:SHORTEST" +indexinfo[].command[].command "stem:BEST" indexinfo[].command[].indexname "lc_set7" indexinfo[].command[].command "normalize" indexinfo[].command[].indexname "nc_set1" @@ -128,7 +128,7 @@ indexinfo[].command[].command "index" indexinfo[].command[].indexname "nc_set2" indexinfo[].command[].command "plain-tokens" indexinfo[].command[].indexname "nc_set2" -indexinfo[].command[].command "stem:SHORTEST" +indexinfo[].command[].command "stem:BEST" indexinfo[].command[].indexname "nc_set2" indexinfo[].command[].command "normalize" indexinfo[].command[].indexname "nc_set3" @@ -142,7 +142,7 @@ indexinfo[].command[].command "index" indexinfo[].command[].indexname "nc_set4" indexinfo[].command[].command "plain-tokens" indexinfo[].command[].indexname "nc_set4" -indexinfo[].command[].command "stem:SHORTEST" +indexinfo[].command[].command "stem:BEST" indexinfo[].command[].indexname "nc_set4" indexinfo[].command[].command "normalize" indexinfo[].command[].indexname "nc_set5" @@ -158,7 +158,7 @@ indexinfo[].command[].command "index" indexinfo[].command[].indexname "nc_set6" indexinfo[].command[].command "plain-tokens" indexinfo[].command[].indexname "nc_set6" -indexinfo[].command[].command "stem:SHORTEST" +indexinfo[].command[].command "stem:BEST" indexinfo[].command[].indexname "nc_set6" indexinfo[].command[].command "normalize" indexinfo[].command[].indexname "nc_set7" @@ -168,7 +168,7 @@ indexinfo[].command[].command "index" indexinfo[].command[].indexname "nc_set7" indexinfo[].command[].command "plain-tokens" indexinfo[].command[].indexname "nc_set7" -indexinfo[].command[].command "stem:SHORTEST" +indexinfo[].command[].command "stem:BEST" indexinfo[].command[].indexname "nc_set7" indexinfo[].command[].command "normalize" indexinfo[].command[].indexname "nc_set8" @@ -178,7 +178,7 @@ indexinfo[].command[].command "index" indexinfo[].command[].indexname "nc_set8" indexinfo[].command[].command "plain-tokens" indexinfo[].command[].indexname "nc_set8" -indexinfo[].command[].command "stem:SHORTEST" +indexinfo[].command[].command "stem:BEST" indexinfo[].command[].indexname "nc_set8" indexinfo[].command[].command "normalize" indexinfo[].command[].indexname "nc_set9" @@ -188,7 +188,7 @@ indexinfo[].command[].command "index" indexinfo[].command[].indexname "nc_set9" indexinfo[].command[].command "plain-tokens" indexinfo[].command[].indexname "nc_set9" -indexinfo[].command[].command "stem:SHORTEST" +indexinfo[].command[].command "stem:BEST" indexinfo[].command[].indexname "nc_set9" indexinfo[].command[].command "normalize" indexinfo[].command[].indexname "nc_set10" @@ -214,7 +214,7 @@ indexinfo[].command[].command "index" indexinfo[].command[].indexname "nc_set12" indexinfo[].command[].command "plain-tokens" indexinfo[].command[].indexname "nc_set12" -indexinfo[].command[].command "stem:SHORTEST" +indexinfo[].command[].command "stem:BEST" indexinfo[].command[].indexname "nc_set12" indexinfo[].command[].command "normalize" indexinfo[].command[].indexname "nc_set13" @@ -224,7 +224,7 @@ indexinfo[].command[].command "index" indexinfo[].command[].indexname "nc_set13" indexinfo[].command[].command "plain-tokens" indexinfo[].command[].indexname "nc_set13" -indexinfo[].command[].command "stem:SHORTEST" +indexinfo[].command[].command "stem:BEST" indexinfo[].command[].indexname "nc_set13" indexinfo[].command[].command "normalize" indexinfo[].command[].indexname "nc_set14" @@ -234,7 +234,7 @@ indexinfo[].command[].command "index" indexinfo[].command[].indexname "nc_set14" indexinfo[].command[].command "plain-tokens" indexinfo[].command[].indexname "nc_set14" -indexinfo[].command[].command "stem:SHORTEST" +indexinfo[].command[].command "stem:BEST" indexinfo[].command[].indexname "nc_set14" indexinfo[].command[].command "normalize" indexinfo[].command[].indexname "nc_set15" @@ -244,7 +244,7 @@ indexinfo[].command[].command "index" indexinfo[].command[].indexname "nc_set15" indexinfo[].command[].command "plain-tokens" indexinfo[].command[].indexname "nc_set15" -indexinfo[].command[].command "stem:SHORTEST" +indexinfo[].command[].command "stem:BEST" indexinfo[].command[].indexname "nc_set15" indexinfo[].command[].command "normalize" indexinfo[].command[].indexname "nc_set16" @@ -254,7 +254,7 @@ indexinfo[].command[].command "index" indexinfo[].command[].indexname "nc_set16" indexinfo[].command[].command "plain-tokens" indexinfo[].command[].indexname "nc_set16" -indexinfo[].command[].command "stem:SHORTEST" +indexinfo[].command[].command "stem:BEST" indexinfo[].command[].indexname "nc_set16" indexinfo[].command[].command "normalize" indexinfo[].command[].indexname "nc_set17" @@ -264,7 +264,7 @@ indexinfo[].command[].command "index" indexinfo[].command[].indexname "nc_set17" indexinfo[].command[].command "plain-tokens" indexinfo[].command[].indexname "nc_set17" -indexinfo[].command[].command "stem:SHORTEST" +indexinfo[].command[].command "stem:BEST" indexinfo[].command[].indexname "nc_set17" indexinfo[].command[].command "normalize" indexinfo[].command[].indexname "nc_set18" @@ -274,7 +274,7 @@ indexinfo[].command[].command "index" indexinfo[].command[].indexname "nc_set18" indexinfo[].command[].command "plain-tokens" indexinfo[].command[].indexname "nc_set18" -indexinfo[].command[].command "stem:SHORTEST" +indexinfo[].command[].command "stem:BEST" indexinfo[].command[].indexname "nc_set18" indexinfo[].command[].command "normalize" indexinfo[].command[].indexname "nc_set19" @@ -284,6 +284,6 @@ indexinfo[].command[].command "index" indexinfo[].command[].indexname "nc_set19" indexinfo[].command[].command "plain-tokens" indexinfo[].command[].indexname "nc_set19" -indexinfo[].command[].command "stem:SHORTEST" +indexinfo[].command[].command "stem:BEST" indexinfo[].command[].indexname "nc_set19" indexinfo[].command[].command "normalize" diff --git a/config-model/src/test/derived/indexschema/index-info.cfg b/config-model/src/test/derived/indexschema/index-info.cfg index 6b05a34f2bd..2ba3a5a99ee 100644 --- a/config-model/src/test/derived/indexschema/index-info.cfg +++ b/config-model/src/test/derived/indexschema/index-info.cfg @@ -8,7 +8,7 @@ indexinfo[].command[].command "index" indexinfo[].command[].indexname "sa" indexinfo[].command[].command "lowercase" indexinfo[].command[].indexname "sa" -indexinfo[].command[].command "stem:SHORTEST" +indexinfo[].command[].command "stem:BEST" indexinfo[].command[].indexname "sa" indexinfo[].command[].command "normalize" indexinfo[].command[].indexname "sa" @@ -18,7 +18,7 @@ indexinfo[].command[].command "index" indexinfo[].command[].indexname "sb" indexinfo[].command[].command "lowercase" indexinfo[].command[].indexname "sb" -indexinfo[].command[].command "stem:SHORTEST" +indexinfo[].command[].command "stem:BEST" indexinfo[].command[].indexname "sb" indexinfo[].command[].command "normalize" indexinfo[].command[].indexname "sb" @@ -28,7 +28,7 @@ indexinfo[].command[].command "index" indexinfo[].command[].indexname "sc" indexinfo[].command[].command "lowercase" indexinfo[].command[].indexname "sc" -indexinfo[].command[].command "stem:SHORTEST" +indexinfo[].command[].command "stem:BEST" indexinfo[].command[].indexname "sc" indexinfo[].command[].command "normalize" indexinfo[].command[].indexname "sc" @@ -38,7 +38,7 @@ indexinfo[].command[].command "index" indexinfo[].command[].indexname "sd" indexinfo[].command[].command "lowercase" indexinfo[].command[].indexname "sd" -indexinfo[].command[].command "stem:SHORTEST" +indexinfo[].command[].command "stem:BEST" indexinfo[].command[].indexname "sd" indexinfo[].command[].command "normalize" indexinfo[].command[].indexname "sd" @@ -70,7 +70,7 @@ indexinfo[].command[].command "lowercase" indexinfo[].command[].indexname "sf" indexinfo[].command[].command "multivalue" indexinfo[].command[].indexname "sf" -indexinfo[].command[].command "stem:SHORTEST" +indexinfo[].command[].command "stem:BEST" indexinfo[].command[].indexname "sf" indexinfo[].command[].command "normalize" indexinfo[].command[].indexname "sf" @@ -82,7 +82,7 @@ indexinfo[].command[].command "lowercase" indexinfo[].command[].indexname "sg" indexinfo[].command[].command "multivalue" indexinfo[].command[].indexname "sg" -indexinfo[].command[].command "stem:SHORTEST" +indexinfo[].command[].command "stem:BEST" indexinfo[].command[].indexname "sg" indexinfo[].command[].command "normalize" indexinfo[].command[].indexname "sg" @@ -116,7 +116,7 @@ indexinfo[].command[].command "index" indexinfo[].command[].indexname "si" indexinfo[].command[].command "lowercase" indexinfo[].command[].indexname "si" -indexinfo[].command[].command "stem:SHORTEST" +indexinfo[].command[].command "stem:BEST" indexinfo[].command[].indexname "si" indexinfo[].command[].command "normalize" indexinfo[].command[].indexname "si" @@ -188,7 +188,7 @@ indexinfo[].command[].command "index" indexinfo[].command[].indexname "fs9" indexinfo[].command[].command "lowercase" indexinfo[].command[].indexname "fs9" -indexinfo[].command[].command "stem:SHORTEST" +indexinfo[].command[].command "stem:BEST" indexinfo[].command[].indexname "fs9" indexinfo[].command[].command "normalize" indexinfo[].command[].indexname "fs9" @@ -198,7 +198,7 @@ indexinfo[].command[].command "index" indexinfo[].command[].indexname "f10.text" indexinfo[].command[].command "lowercase" indexinfo[].command[].indexname "f10.text" -indexinfo[].command[].command "stem:SHORTEST" +indexinfo[].command[].command "stem:BEST" indexinfo[].command[].indexname "f10.text" indexinfo[].command[].command "normalize" indexinfo[].command[].indexname "f10.text" @@ -266,7 +266,7 @@ indexinfo[].command[].command "index" indexinfo[].command[].indexname "fs1" indexinfo[].command[].command "plain-tokens" indexinfo[].command[].indexname "fs1" -indexinfo[].command[].command "stem:SHORTEST" +indexinfo[].command[].command "stem:BEST" indexinfo[].command[].indexname "fs1" indexinfo[].command[].command "normalize" indexinfo[].command[].indexname "fs2" @@ -276,7 +276,7 @@ indexinfo[].command[].command "index" indexinfo[].command[].indexname "fs2" indexinfo[].command[].command "plain-tokens" indexinfo[].command[].indexname "fs2" -indexinfo[].command[].command "stem:SHORTEST" +indexinfo[].command[].command "stem:BEST" indexinfo[].command[].indexname "fs2" indexinfo[].command[].command "normalize" indexinfo[].command[].indexname "fs3" @@ -290,7 +290,7 @@ indexinfo[].command[].command "index" indexinfo[].command[].indexname "fs4" indexinfo[].command[].command "plain-tokens" indexinfo[].command[].indexname "fs4" -indexinfo[].command[].command "stem:SHORTEST" +indexinfo[].command[].command "stem:BEST" indexinfo[].command[].indexname "fs4" indexinfo[].command[].command "normalize" indexinfo[].command[].indexname "onlyattrib" @@ -320,7 +320,7 @@ indexinfo[].command[].command "lowercase" indexinfo[].command[].indexname "gram" indexinfo[].command[].command "index" indexinfo[].command[].indexname "gram" -indexinfo[].command[].command "stem:SHORTEST" +indexinfo[].command[].command "stem:BEST" indexinfo[].command[].indexname "gram" indexinfo[].command[].command "normalize" indexinfo[].command[].indexname "gram" @@ -348,6 +348,6 @@ indexinfo[].command[].command "index" indexinfo[].command[].indexname "default" indexinfo[].command[].command "plain-tokens" indexinfo[].command[].indexname "default" -indexinfo[].command[].command "stem:SHORTEST" +indexinfo[].command[].command "stem:BEST" indexinfo[].command[].indexname "default" indexinfo[].command[].command "normalize" diff --git a/config-model/src/test/derived/indexschema/indexschema.cfg b/config-model/src/test/derived/indexschema/indexschema.cfg index 7d081869b22..d1f43c4a81e 100644 --- a/config-model/src/test/derived/indexschema/indexschema.cfg +++ b/config-model/src/test/derived/indexschema/indexschema.cfg @@ -1,5 +1,4 @@ indexfield[].name "sa" -indexfield[].indextype VESPA indexfield[].datatype STRING indexfield[].collectiontype SINGLE indexfield[].prefix false @@ -7,7 +6,6 @@ indexfield[].phrases false indexfield[].positions true indexfield[].averageelementlen 512 indexfield[].name "sb" -indexfield[].indextype VESPA indexfield[].datatype STRING indexfield[].collectiontype SINGLE indexfield[].prefix false @@ -15,7 +13,6 @@ indexfield[].phrases false indexfield[].positions true indexfield[].averageelementlen 512 indexfield[].name "sc" -indexfield[].indextype VESPA indexfield[].datatype STRING indexfield[].collectiontype SINGLE indexfield[].prefix false @@ -23,7 +20,6 @@ indexfield[].phrases false indexfield[].positions true indexfield[].averageelementlen 512 indexfield[].name "sd" -indexfield[].indextype VESPA indexfield[].datatype STRING indexfield[].collectiontype SINGLE indexfield[].prefix false @@ -31,7 +27,6 @@ indexfield[].phrases false indexfield[].positions true indexfield[].averageelementlen 512 indexfield[].name "sf" -indexfield[].indextype VESPA indexfield[].datatype STRING indexfield[].collectiontype ARRAY indexfield[].prefix false @@ -39,7 +34,6 @@ indexfield[].phrases false indexfield[].positions true indexfield[].averageelementlen 512 indexfield[].name "sg" -indexfield[].indextype VESPA indexfield[].datatype STRING indexfield[].collectiontype WEIGHTEDSET indexfield[].prefix false @@ -47,7 +41,6 @@ indexfield[].phrases false indexfield[].positions true indexfield[].averageelementlen 512 indexfield[].name "sh" -indexfield[].indextype VESPA indexfield[].datatype STRING indexfield[].collectiontype SINGLE indexfield[].prefix false @@ -55,7 +48,6 @@ indexfield[].phrases false indexfield[].positions true indexfield[].averageelementlen 512 indexfield[].name "si" -indexfield[].indextype VESPA indexfield[].datatype STRING indexfield[].collectiontype SINGLE indexfield[].prefix true @@ -63,7 +55,6 @@ indexfield[].phrases false indexfield[].positions true indexfield[].averageelementlen 512 indexfield[].name "exact1" -indexfield[].indextype VESPA indexfield[].datatype STRING indexfield[].collectiontype SINGLE indexfield[].prefix false @@ -71,7 +62,6 @@ indexfield[].phrases false indexfield[].positions true indexfield[].averageelementlen 512 indexfield[].name "exact2" -indexfield[].indextype VESPA indexfield[].datatype STRING indexfield[].collectiontype SINGLE indexfield[].prefix false @@ -79,7 +69,6 @@ indexfield[].phrases false indexfield[].positions true indexfield[].averageelementlen 512 indexfield[].name "nostemstring1" -indexfield[].indextype VESPA indexfield[].datatype STRING indexfield[].collectiontype SINGLE indexfield[].prefix false @@ -87,7 +76,6 @@ indexfield[].phrases false indexfield[].positions true indexfield[].averageelementlen 512 indexfield[].name "nostemstring2" -indexfield[].indextype VESPA indexfield[].datatype STRING indexfield[].collectiontype SINGLE indexfield[].prefix false @@ -95,7 +83,6 @@ indexfield[].phrases false indexfield[].positions true indexfield[].averageelementlen 512 indexfield[].name "nostemstring3" -indexfield[].indextype VESPA indexfield[].datatype STRING indexfield[].collectiontype SINGLE indexfield[].prefix false @@ -103,7 +90,6 @@ indexfield[].phrases false indexfield[].positions true indexfield[].averageelementlen 512 indexfield[].name "nostemstring4" -indexfield[].indextype VESPA indexfield[].datatype STRING indexfield[].collectiontype SINGLE indexfield[].prefix false @@ -111,7 +97,6 @@ indexfield[].phrases false indexfield[].positions true indexfield[].averageelementlen 512 indexfield[].name "fs9" -indexfield[].indextype VESPA indexfield[].datatype STRING indexfield[].collectiontype SINGLE indexfield[].prefix false @@ -119,7 +104,6 @@ indexfield[].phrases false indexfield[].positions true indexfield[].averageelementlen 512 indexfield[].name "sd_literal" -indexfield[].indextype VESPA indexfield[].datatype STRING indexfield[].collectiontype SINGLE indexfield[].prefix false @@ -127,7 +111,6 @@ indexfield[].phrases false indexfield[].positions true indexfield[].averageelementlen 512 indexfield[].name "sh.fragment" -indexfield[].indextype VESPA indexfield[].datatype STRING indexfield[].collectiontype SINGLE indexfield[].prefix false @@ -135,7 +118,6 @@ indexfield[].phrases false indexfield[].positions true indexfield[].averageelementlen 512 indexfield[].name "sh.host" -indexfield[].indextype VESPA indexfield[].datatype STRING indexfield[].collectiontype SINGLE indexfield[].prefix false @@ -143,7 +125,6 @@ indexfield[].phrases false indexfield[].positions true indexfield[].averageelementlen 512 indexfield[].name "sh.hostname" -indexfield[].indextype VESPA indexfield[].datatype STRING indexfield[].collectiontype SINGLE indexfield[].prefix false @@ -151,7 +132,6 @@ indexfield[].phrases false indexfield[].positions true indexfield[].averageelementlen 512 indexfield[].name "sh.path" -indexfield[].indextype VESPA indexfield[].datatype STRING indexfield[].collectiontype SINGLE indexfield[].prefix false @@ -159,7 +139,6 @@ indexfield[].phrases false indexfield[].positions true indexfield[].averageelementlen 512 indexfield[].name "sh.port" -indexfield[].indextype VESPA indexfield[].datatype STRING indexfield[].collectiontype SINGLE indexfield[].prefix false @@ -167,7 +146,6 @@ indexfield[].phrases false indexfield[].positions true indexfield[].averageelementlen 512 indexfield[].name "sh.query" -indexfield[].indextype VESPA indexfield[].datatype STRING indexfield[].collectiontype SINGLE indexfield[].prefix false @@ -175,7 +153,6 @@ indexfield[].phrases false indexfield[].positions true indexfield[].averageelementlen 512 indexfield[].name "sh.scheme" -indexfield[].indextype VESPA indexfield[].datatype STRING indexfield[].collectiontype SINGLE indexfield[].prefix false diff --git a/config-model/src/test/derived/indexswitches/ilscripts.cfg b/config-model/src/test/derived/indexswitches/ilscripts.cfg index 078895a8a48..77ac18e3261 100644 --- a/config-model/src/test/derived/indexswitches/ilscripts.cfg +++ b/config-model/src/test/derived/indexswitches/ilscripts.cfg @@ -5,6 +5,6 @@ ilscript[].docfield[] "title" ilscript[].docfield[] "descr" ilscript[].docfield[] "source_src" ilscript[].content[] "clear_state | guard { input source_src | switch { case \"theweb\": input source_src | tokenize normalize | summary source | index source; case \"amg\": input source_src | tokenize normalize | summary source; default: input source_src . \" partner\" | tokenize normalize | summary source | index source; }; }" -ilscript[].content[] "clear_state | guard { input title | tokenize normalize stem:\"SHORTEST\" | summary title | index title; }" -ilscript[].content[] "clear_state | guard { input descr | tokenize normalize stem:\"SHORTEST\" | summary descr | index descr; }" +ilscript[].content[] "clear_state | guard { input title | tokenize normalize stem:\"BEST\" | summary title | index title; }" +ilscript[].content[] "clear_state | guard { input descr | tokenize normalize stem:\"BEST\" | summary descr | index descr; }" ilscript[].content[] "input source_src | passthrough source_src" diff --git a/config-model/src/test/derived/indexswitches/index-info.cfg b/config-model/src/test/derived/indexswitches/index-info.cfg index eec20bdbff6..3af5f311d8b 100644 --- a/config-model/src/test/derived/indexswitches/index-info.cfg +++ b/config-model/src/test/derived/indexswitches/index-info.cfg @@ -8,7 +8,7 @@ indexinfo[].command[].command "index" indexinfo[].command[].indexname "title" indexinfo[].command[].command "lowercase" indexinfo[].command[].indexname "title" -indexinfo[].command[].command "stem:SHORTEST" +indexinfo[].command[].command "stem:BEST" indexinfo[].command[].indexname "title" indexinfo[].command[].command "normalize" indexinfo[].command[].indexname "title" @@ -18,7 +18,7 @@ indexinfo[].command[].command "index" indexinfo[].command[].indexname "descr" indexinfo[].command[].command "lowercase" indexinfo[].command[].indexname "descr" -indexinfo[].command[].command "stem:SHORTEST" +indexinfo[].command[].command "stem:BEST" indexinfo[].command[].indexname "descr" indexinfo[].command[].command "normalize" indexinfo[].command[].indexname "descr" @@ -44,6 +44,6 @@ indexinfo[].command[].command "index" indexinfo[].command[].indexname "default" indexinfo[].command[].command "plain-tokens" indexinfo[].command[].indexname "default" -indexinfo[].command[].command "stem:SHORTEST" +indexinfo[].command[].command "stem:BEST" indexinfo[].command[].indexname "default" indexinfo[].command[].command "normalize" diff --git a/config-model/src/test/derived/inheritance/ilscripts.cfg b/config-model/src/test/derived/inheritance/ilscripts.cfg index 5856da6992e..91410489de8 100644 --- a/config-model/src/test/derived/inheritance/ilscripts.cfg +++ b/config-model/src/test/derived/inheritance/ilscripts.cfg @@ -9,5 +9,5 @@ ilscript[].docfield[] "onlychild" ilscript[].content[] "clear_state | guard { input onlygrandparent | attribute onlygrandparent; }" ilscript[].content[] "clear_state | guard { input overridden | attribute overridden; }" ilscript[].content[] "clear_state | guard { input onlyfather | summary onlyfather; }" -ilscript[].content[] "clear_state | guard { input onlymother | tokenize normalize stem:\"SHORTEST\" | attribute onlymother | index onlymother; }" -ilscript[].content[] "clear_state | guard { input onlychild | tokenize normalize stem:\"SHORTEST\" | index onlychild; }" +ilscript[].content[] "clear_state | guard { input onlymother | tokenize normalize stem:\"BEST\" | attribute onlymother | index onlymother; }" +ilscript[].content[] "clear_state | guard { input onlychild | tokenize normalize stem:\"BEST\" | index onlychild; }" diff --git a/config-model/src/test/derived/inheritance/index-info.cfg b/config-model/src/test/derived/inheritance/index-info.cfg index fe7bf334fcc..e0be7b7d71f 100644 --- a/config-model/src/test/derived/inheritance/index-info.cfg +++ b/config-model/src/test/derived/inheritance/index-info.cfg @@ -22,7 +22,7 @@ indexinfo[].command[].command "index" indexinfo[].command[].indexname "onlymother" indexinfo[].command[].command "lowercase" indexinfo[].command[].indexname "onlymother" -indexinfo[].command[].command "stem:SHORTEST" +indexinfo[].command[].command "stem:BEST" indexinfo[].command[].indexname "onlymother" indexinfo[].command[].command "normalize" indexinfo[].command[].indexname "onlymother" @@ -32,7 +32,7 @@ indexinfo[].command[].command "index" indexinfo[].command[].indexname "onlychild" indexinfo[].command[].command "lowercase" indexinfo[].command[].indexname "onlychild" -indexinfo[].command[].command "stem:SHORTEST" +indexinfo[].command[].command "stem:BEST" indexinfo[].command[].indexname "onlychild" indexinfo[].command[].command "normalize" indexinfo[].command[].indexname "onlychild" diff --git a/config-model/src/test/derived/inheritstruct/index-info.cfg b/config-model/src/test/derived/inheritstruct/index-info.cfg index f0476c4bbb8..e0f3fdb5dde 100644 --- a/config-model/src/test/derived/inheritstruct/index-info.cfg +++ b/config-model/src/test/derived/inheritstruct/index-info.cfg @@ -8,7 +8,7 @@ indexinfo[].command[].command "index" indexinfo[].command[].indexname "child_struct_field.my_str" indexinfo[].command[].command "lowercase" indexinfo[].command[].indexname "child_struct_field.my_str" -indexinfo[].command[].command "stem:SHORTEST" +indexinfo[].command[].command "stem:BEST" indexinfo[].command[].indexname "child_struct_field.my_str" indexinfo[].command[].command "normalize" indexinfo[].command[].indexname "child_struct_field.my_str" diff --git a/config-model/src/test/derived/music/ilscripts.cfg b/config-model/src/test/derived/music/ilscripts.cfg index bbac0fff10c..7a02d836db5 100644 --- a/config-model/src/test/derived/music/ilscripts.cfg +++ b/config-model/src/test/derived/music/ilscripts.cfg @@ -39,39 +39,39 @@ ilscript[].docfield[] "powermetalvalue" ilscript[].docfield[] "progvalue" ilscript[].content[] "clear_state | guard { input hiphopvalue | split \";\" | attribute hiphopvalue_arr; }" ilscript[].content[] "clear_state | guard { input metalvalue | split \";\" | attribute metalvalue_arr; }" -ilscript[].content[] "clear_state | guard { input bgndata | tokenize normalize stem:\"SHORTEST\" | summary bgndata; }" +ilscript[].content[] "clear_state | guard { input bgndata | tokenize normalize stem:\"BEST\" | summary bgndata; }" ilscript[].content[] "clear_state | guard { input sales | summary sales | attribute sales; }" ilscript[].content[] "clear_state | guard { input pto | summary pto | attribute pto; }" -ilscript[].content[] "clear_state | guard { input keys | tokenize normalize stem:\"SHORTEST\" | index keys; }" +ilscript[].content[] "clear_state | guard { input keys | tokenize normalize stem:\"BEST\" | index keys; }" ilscript[].content[] "clear_state | guard { input mid | summary mid | attribute mid; }" -ilscript[].content[] "clear_state | guard { input ew | tokenize normalize stem:\"SHORTEST\" | summary ew | index ew; }" +ilscript[].content[] "clear_state | guard { input ew | tokenize normalize stem:\"BEST\" | summary ew | index ew; }" ilscript[].content[] "clear_state | guard { input surl | summary surl; }" ilscript[].content[] "clear_state | guard { input userrate | summary userrate; }" ilscript[].content[] "clear_state | guard { input pid | summary pid; }" ilscript[].content[] "clear_state | guard { input weight | summary weight | attribute weight; }" ilscript[].content[] "clear_state | guard { input url | summary url; }" ilscript[].content[] "clear_state | guard { input isbn | summary isbn; }" -ilscript[].content[] "clear_state | guard { input fmt | tokenize normalize stem:\"SHORTEST\" | summary fmt | index fmt; }" +ilscript[].content[] "clear_state | guard { input fmt | tokenize normalize stem:\"BEST\" | summary fmt | index fmt; }" ilscript[].content[] "clear_state | guard { input albumid | summary albumid; }" ilscript[].content[] "clear_state | guard { input disp_song | summary disp_song; }" -ilscript[].content[] "clear_state | guard { input song | tokenize normalize stem:\"SHORTEST\" | summary song | index song; }" +ilscript[].content[] "clear_state | guard { input song | tokenize normalize stem:\"BEST\" | summary song | index song; }" ilscript[].content[] "clear_state | guard { input pfrom | summary pfrom; }" ilscript[].content[] "clear_state | guard { input bgnpfrom | summary bgnpfrom | attribute bgnpfrom; }" -ilscript[].content[] "clear_state | guard { input categories | tokenize normalize stem:\"SHORTEST\" | summary categories | index categories; }" +ilscript[].content[] "clear_state | guard { input categories | tokenize normalize stem:\"BEST\" | summary categories | index categories; }" ilscript[].content[] "clear_state | guard { input data | summary data; }" ilscript[].content[] "clear_state | guard { input numreview | summary numreview; }" ilscript[].content[] "clear_state | guard { input bgnsellers | summary bgnsellers; }" ilscript[].content[] "clear_state | guard { input image | summary image; }" -ilscript[].content[] "clear_state | guard { input artist | tokenize normalize stem:\"SHORTEST\" | summary artist | index artist; }" +ilscript[].content[] "clear_state | guard { input artist | tokenize normalize stem:\"BEST\" | summary artist | index artist; }" ilscript[].content[] "clear_state | guard { input artistspid | summary artistspid; }" -ilscript[].content[] "clear_state | guard { input title | tokenize normalize stem:\"SHORTEST\" | summary title | index title; }" +ilscript[].content[] "clear_state | guard { input title | tokenize normalize stem:\"BEST\" | summary title | index title; }" ilscript[].content[] "clear_state | guard { input newestedition | summary newestedition | attribute newestedition; }" -ilscript[].content[] "clear_state | guard { input bgnpto | tokenize normalize stem:\"SHORTEST\" | summary bgnpto; }" +ilscript[].content[] "clear_state | guard { input bgnpto | tokenize normalize stem:\"BEST\" | summary bgnpto; }" ilscript[].content[] "clear_state | guard { input year | summary year | attribute year; }" ilscript[].content[] "clear_state | guard { input did | summary did | attribute did; }" ilscript[].content[] "clear_state | guard { input scorekey | summary scorekey; }" ilscript[].content[] "clear_state | guard { input cbid | summary cbid | attribute cbid; }" ilscript[].content[] "clear_state | guard { input metalvalue | summary metalvalue; }" ilscript[].content[] "clear_state | guard { input hiphopvalue | summary hiphopvalue; }" -ilscript[].content[] "clear_state | guard { input powermetalvalue | tokenize normalize stem:\"SHORTEST\" | index powermetalvalue | summary powermetalvalue; }" -ilscript[].content[] "clear_state | guard { input progvalue | tokenize normalize stem:\"SHORTEST\" | index progvalue | summary progvalue; }" +ilscript[].content[] "clear_state | guard { input powermetalvalue | tokenize normalize stem:\"BEST\" | index powermetalvalue | summary powermetalvalue; }" +ilscript[].content[] "clear_state | guard { input progvalue | tokenize normalize stem:\"BEST\" | index progvalue | summary progvalue; }" diff --git a/config-model/src/test/derived/music/index-info.cfg b/config-model/src/test/derived/music/index-info.cfg index b9264e81e14..5d4cb8133e5 100644 --- a/config-model/src/test/derived/music/index-info.cfg +++ b/config-model/src/test/derived/music/index-info.cfg @@ -22,7 +22,7 @@ indexinfo[].command[].command "index" indexinfo[].command[].indexname "keys" indexinfo[].command[].command "lowercase" indexinfo[].command[].indexname "keys" -indexinfo[].command[].command "stem:SHORTEST" +indexinfo[].command[].command "stem:BEST" indexinfo[].command[].indexname "keys" indexinfo[].command[].command "normalize" indexinfo[].command[].indexname "keys" @@ -38,7 +38,7 @@ indexinfo[].command[].command "index" indexinfo[].command[].indexname "ew" indexinfo[].command[].command "lowercase" indexinfo[].command[].indexname "ew" -indexinfo[].command[].command "stem:SHORTEST" +indexinfo[].command[].command "stem:BEST" indexinfo[].command[].indexname "ew" indexinfo[].command[].command "normalize" indexinfo[].command[].indexname "ew" @@ -66,7 +66,7 @@ indexinfo[].command[].command "index" indexinfo[].command[].indexname "fmt" indexinfo[].command[].command "lowercase" indexinfo[].command[].indexname "fmt" -indexinfo[].command[].command "stem:SHORTEST" +indexinfo[].command[].command "stem:BEST" indexinfo[].command[].indexname "fmt" indexinfo[].command[].command "normalize" indexinfo[].command[].indexname "fmt" @@ -80,7 +80,7 @@ indexinfo[].command[].command "index" indexinfo[].command[].indexname "song" indexinfo[].command[].command "lowercase" indexinfo[].command[].indexname "song" -indexinfo[].command[].command "stem:SHORTEST" +indexinfo[].command[].command "stem:BEST" indexinfo[].command[].indexname "song" indexinfo[].command[].command "normalize" indexinfo[].command[].indexname "song" @@ -100,7 +100,7 @@ indexinfo[].command[].command "index" indexinfo[].command[].indexname "categories" indexinfo[].command[].command "lowercase" indexinfo[].command[].indexname "categories" -indexinfo[].command[].command "stem:SHORTEST" +indexinfo[].command[].command "stem:BEST" indexinfo[].command[].indexname "categories" indexinfo[].command[].command "normalize" indexinfo[].command[].indexname "categories" @@ -122,7 +122,7 @@ indexinfo[].command[].command "index" indexinfo[].command[].indexname "artist" indexinfo[].command[].command "lowercase" indexinfo[].command[].indexname "artist" -indexinfo[].command[].command "stem:SHORTEST" +indexinfo[].command[].command "stem:BEST" indexinfo[].command[].indexname "artist" indexinfo[].command[].command "normalize" indexinfo[].command[].indexname "artist" @@ -134,7 +134,7 @@ indexinfo[].command[].command "index" indexinfo[].command[].indexname "title" indexinfo[].command[].command "lowercase" indexinfo[].command[].indexname "title" -indexinfo[].command[].command "stem:SHORTEST" +indexinfo[].command[].command "stem:BEST" indexinfo[].command[].indexname "title" indexinfo[].command[].command "normalize" indexinfo[].command[].indexname "title" @@ -178,7 +178,7 @@ indexinfo[].command[].command "index" indexinfo[].command[].indexname "powermetalvalue" indexinfo[].command[].command "lowercase" indexinfo[].command[].indexname "powermetalvalue" -indexinfo[].command[].command "stem:SHORTEST" +indexinfo[].command[].command "stem:BEST" indexinfo[].command[].indexname "powermetalvalue" indexinfo[].command[].command "normalize" indexinfo[].command[].indexname "powermetalvalue" @@ -188,7 +188,7 @@ indexinfo[].command[].command "index" indexinfo[].command[].indexname "progvalue" indexinfo[].command[].command "lowercase" indexinfo[].command[].indexname "progvalue" -indexinfo[].command[].command "stem:SHORTEST" +indexinfo[].command[].command "stem:BEST" indexinfo[].command[].indexname "progvalue" indexinfo[].command[].command "normalize" indexinfo[].command[].indexname "progvalue" @@ -230,6 +230,6 @@ indexinfo[].command[].command "index" indexinfo[].command[].indexname "default" indexinfo[].command[].command "plain-tokens" indexinfo[].command[].indexname "default" -indexinfo[].command[].command "stem:SHORTEST" +indexinfo[].command[].command "stem:BEST" indexinfo[].command[].indexname "default" indexinfo[].command[].command "normalize" diff --git a/config-model/src/test/derived/newrank/ilscripts.cfg b/config-model/src/test/derived/newrank/ilscripts.cfg index 6194e66ee33..6986f12f62a 100644 --- a/config-model/src/test/derived/newrank/ilscripts.cfg +++ b/config-model/src/test/derived/newrank/ilscripts.cfg @@ -33,34 +33,34 @@ ilscript[].docfield[] "year" ilscript[].docfield[] "did" ilscript[].docfield[] "scorekey" ilscript[].docfield[] "cbid" -ilscript[].content[] "clear_state | guard { input bgndata | tokenize normalize stem:\"SHORTEST\" | summary bgndata; }" +ilscript[].content[] "clear_state | guard { input bgndata | tokenize normalize stem:\"BEST\" | summary bgndata; }" ilscript[].content[] "clear_state | guard { input sales | summary sales | attribute sales; }" ilscript[].content[] "clear_state | guard { input pto | summary pto | attribute pto; }" -ilscript[].content[] "clear_state | guard { input keys | tokenize normalize stem:\"SHORTEST\" | index keys; }" +ilscript[].content[] "clear_state | guard { input keys | tokenize normalize stem:\"BEST\" | index keys; }" ilscript[].content[] "clear_state | guard { input mid | summary mid | attribute mid; }" -ilscript[].content[] "clear_state | guard { input ew | tokenize normalize stem:\"SHORTEST\" | summary ew | index ew; }" +ilscript[].content[] "clear_state | guard { input ew | tokenize normalize stem:\"BEST\" | summary ew | index ew; }" ilscript[].content[] "clear_state | guard { input surl | summary surl; }" ilscript[].content[] "clear_state | guard { input userrate | summary userrate; }" ilscript[].content[] "clear_state | guard { input pid | summary pid; }" ilscript[].content[] "clear_state | guard { input weight | summary weight | attribute weight; }" ilscript[].content[] "clear_state | guard { input url | summary url; }" ilscript[].content[] "clear_state | guard { input isbn | summary isbn; }" -ilscript[].content[] "clear_state | guard { input fmt | tokenize normalize stem:\"SHORTEST\" | summary fmt | index fmt; }" +ilscript[].content[] "clear_state | guard { input fmt | tokenize normalize stem:\"BEST\" | summary fmt | index fmt; }" ilscript[].content[] "clear_state | guard { input albumid | summary albumid; }" ilscript[].content[] "clear_state | guard { input disp_song | summary disp_song; }" -ilscript[].content[] "clear_state | guard { input song | tokenize normalize stem:\"SHORTEST\" | summary song | index song; }" +ilscript[].content[] "clear_state | guard { input song | tokenize normalize stem:\"BEST\" | summary song | index song; }" ilscript[].content[] "clear_state | guard { input pfrom | summary pfrom; }" ilscript[].content[] "clear_state | guard { input bgnpfrom | summary bgnpfrom | attribute bgnpfrom; }" -ilscript[].content[] "clear_state | guard { input categories | tokenize normalize stem:\"SHORTEST\" | summary categories | index categories; }" +ilscript[].content[] "clear_state | guard { input categories | tokenize normalize stem:\"BEST\" | summary categories | index categories; }" ilscript[].content[] "clear_state | guard { input data | summary data; }" ilscript[].content[] "clear_state | guard { input numreview | summary numreview; }" ilscript[].content[] "clear_state | guard { input bgnsellers | summary bgnsellers; }" ilscript[].content[] "clear_state | guard { input image | summary image; }" -ilscript[].content[] "clear_state | guard { input artist | tokenize normalize stem:\"SHORTEST\" | summary artist | index artist; }" +ilscript[].content[] "clear_state | guard { input artist | tokenize normalize stem:\"BEST\" | summary artist | index artist; }" ilscript[].content[] "clear_state | guard { input artistspid | summary artistspid; }" -ilscript[].content[] "clear_state | guard { input title | tokenize normalize stem:\"SHORTEST\" | summary title | index title; }" +ilscript[].content[] "clear_state | guard { input title | tokenize normalize stem:\"BEST\" | summary title | index title; }" ilscript[].content[] "clear_state | guard { input newestedition | summary newestedition | attribute newestedition; }" -ilscript[].content[] "clear_state | guard { input bgnpto | tokenize normalize stem:\"SHORTEST\" | summary bgnpto; }" +ilscript[].content[] "clear_state | guard { input bgnpto | tokenize normalize stem:\"BEST\" | summary bgnpto; }" ilscript[].content[] "clear_state | guard { input year | summary year | attribute year; }" ilscript[].content[] "clear_state | guard { input did | summary did | attribute did; }" ilscript[].content[] "clear_state | guard { input scorekey | summary scorekey | attribute scorekey; }" diff --git a/config-model/src/test/derived/newrank/index-info.cfg b/config-model/src/test/derived/newrank/index-info.cfg index 26d2b92fd10..96d34ee2548 100644 --- a/config-model/src/test/derived/newrank/index-info.cfg +++ b/config-model/src/test/derived/newrank/index-info.cfg @@ -22,7 +22,7 @@ indexinfo[].command[].command "index" indexinfo[].command[].indexname "keys" indexinfo[].command[].command "lowercase" indexinfo[].command[].indexname "keys" -indexinfo[].command[].command "stem:SHORTEST" +indexinfo[].command[].command "stem:BEST" indexinfo[].command[].indexname "keys" indexinfo[].command[].command "normalize" indexinfo[].command[].indexname "keys" @@ -38,7 +38,7 @@ indexinfo[].command[].command "index" indexinfo[].command[].indexname "ew" indexinfo[].command[].command "lowercase" indexinfo[].command[].indexname "ew" -indexinfo[].command[].command "stem:SHORTEST" +indexinfo[].command[].command "stem:BEST" indexinfo[].command[].indexname "ew" indexinfo[].command[].command "normalize" indexinfo[].command[].indexname "ew" @@ -66,7 +66,7 @@ indexinfo[].command[].command "index" indexinfo[].command[].indexname "fmt" indexinfo[].command[].command "lowercase" indexinfo[].command[].indexname "fmt" -indexinfo[].command[].command "stem:SHORTEST" +indexinfo[].command[].command "stem:BEST" indexinfo[].command[].indexname "fmt" indexinfo[].command[].command "normalize" indexinfo[].command[].indexname "fmt" @@ -80,7 +80,7 @@ indexinfo[].command[].command "index" indexinfo[].command[].indexname "song" indexinfo[].command[].command "lowercase" indexinfo[].command[].indexname "song" -indexinfo[].command[].command "stem:SHORTEST" +indexinfo[].command[].command "stem:BEST" indexinfo[].command[].indexname "song" indexinfo[].command[].command "normalize" indexinfo[].command[].indexname "song" @@ -100,7 +100,7 @@ indexinfo[].command[].command "index" indexinfo[].command[].indexname "categories" indexinfo[].command[].command "lowercase" indexinfo[].command[].indexname "categories" -indexinfo[].command[].command "stem:SHORTEST" +indexinfo[].command[].command "stem:BEST" indexinfo[].command[].indexname "categories" indexinfo[].command[].command "normalize" indexinfo[].command[].indexname "categories" @@ -122,7 +122,7 @@ indexinfo[].command[].command "index" indexinfo[].command[].indexname "artist" indexinfo[].command[].command "lowercase" indexinfo[].command[].indexname "artist" -indexinfo[].command[].command "stem:SHORTEST" +indexinfo[].command[].command "stem:BEST" indexinfo[].command[].indexname "artist" indexinfo[].command[].command "normalize" indexinfo[].command[].indexname "artist" @@ -134,7 +134,7 @@ indexinfo[].command[].command "index" indexinfo[].command[].indexname "title" indexinfo[].command[].command "lowercase" indexinfo[].command[].indexname "title" -indexinfo[].command[].command "stem:SHORTEST" +indexinfo[].command[].command "stem:BEST" indexinfo[].command[].indexname "title" indexinfo[].command[].command "normalize" indexinfo[].command[].indexname "title" @@ -192,6 +192,6 @@ indexinfo[].command[].command "index" indexinfo[].command[].indexname "default" indexinfo[].command[].command "plain-tokens" indexinfo[].command[].indexname "default" -indexinfo[].command[].command "stem:SHORTEST" +indexinfo[].command[].command "stem:BEST" indexinfo[].command[].indexname "default" indexinfo[].command[].command "normalize" diff --git a/config-model/src/test/derived/orderilscripts/ilscripts.cfg b/config-model/src/test/derived/orderilscripts/ilscripts.cfg index 801c7e4d790..c41939b34d1 100644 --- a/config-model/src/test/derived/orderilscripts/ilscripts.cfg +++ b/config-model/src/test/derived/orderilscripts/ilscripts.cfg @@ -3,4 +3,4 @@ fieldmatchmaxlength 1000000 ilscript[].doctype "orderilscripts" ilscript[].docfield[] "foo" ilscript[].content[] "clear_state | guard { input foo | summary bar; }" -ilscript[].content[] "clear_state | guard { input foo | tokenize normalize stem:\"SHORTEST\" | summary foo | index foo; }" +ilscript[].content[] "clear_state | guard { input foo | tokenize normalize stem:\"BEST\" | summary foo | index foo; }" diff --git a/config-model/src/test/derived/prefixexactattribute/ilscripts.cfg b/config-model/src/test/derived/prefixexactattribute/ilscripts.cfg index 4663ef92fcf..a2ada9792a0 100644 --- a/config-model/src/test/derived/prefixexactattribute/ilscripts.cfg +++ b/config-model/src/test/derived/prefixexactattribute/ilscripts.cfg @@ -6,7 +6,7 @@ ilscript[].docfield[] "attributefield1" ilscript[].docfield[] "attributefield2" ilscript[].docfield[] "indexfield1" ilscript[].docfield[] "indexfield2" -ilscript[].content[] "clear_state | guard { input indexfield0 | tokenize normalize stem:\"SHORTEST\" max-length:79 | index indexfield0; }" +ilscript[].content[] "clear_state | guard { input indexfield0 | tokenize normalize stem:\"BEST\" max-length:79 | index indexfield0; }" ilscript[].content[] "clear_state | guard { input attributefield1 | attribute attributefield1; }" ilscript[].content[] "clear_state | guard { input attributefield2 | attribute attributefield2; }" ilscript[].content[] "clear_state | guard { input indexfield1 | exact | index indexfield1; }" diff --git a/config-model/src/test/derived/prefixexactattribute/index-info.cfg b/config-model/src/test/derived/prefixexactattribute/index-info.cfg index 6429d34c5f9..7a84f0515f8 100644 --- a/config-model/src/test/derived/prefixexactattribute/index-info.cfg +++ b/config-model/src/test/derived/prefixexactattribute/index-info.cfg @@ -8,7 +8,7 @@ indexinfo[].command[].command "index" indexinfo[].command[].indexname "indexfield0" indexinfo[].command[].command "lowercase" indexinfo[].command[].indexname "indexfield0" -indexinfo[].command[].command "stem:SHORTEST" +indexinfo[].command[].command "stem:BEST" indexinfo[].command[].indexname "indexfield0" indexinfo[].command[].command "normalize" indexinfo[].command[].indexname "indexfield0" diff --git a/config-model/src/test/derived/ranktypes/ilscripts.cfg b/config-model/src/test/derived/ranktypes/ilscripts.cfg index 21fe564c922..9f82e75986c 100644 --- a/config-model/src/test/derived/ranktypes/ilscripts.cfg +++ b/config-model/src/test/derived/ranktypes/ilscripts.cfg @@ -6,7 +6,7 @@ ilscript[].docfield[] "descr" ilscript[].docfield[] "keywords" ilscript[].docfield[] "identity" ilscript[].content[] "clear_state | guard { input identity | tokenize | index identity_literal; }" -ilscript[].content[] "clear_state | guard { input title | tokenize normalize stem:\"SHORTEST\" | summary title | index title; }" -ilscript[].content[] "clear_state | guard { input descr | tokenize normalize stem:\"SHORTEST\" | summary descr | index descr; }" -ilscript[].content[] "clear_state | guard { input keywords | tokenize normalize stem:\"SHORTEST\" | index keywords; }" -ilscript[].content[] "clear_state | guard { input identity | tokenize normalize stem:\"SHORTEST\" | index identity; }" +ilscript[].content[] "clear_state | guard { input title | tokenize normalize stem:\"BEST\" | summary title | index title; }" +ilscript[].content[] "clear_state | guard { input descr | tokenize normalize stem:\"BEST\" | summary descr | index descr; }" +ilscript[].content[] "clear_state | guard { input keywords | tokenize normalize stem:\"BEST\" | index keywords; }" +ilscript[].content[] "clear_state | guard { input identity | tokenize normalize stem:\"BEST\" | index identity; }" diff --git a/config-model/src/test/derived/ranktypes/index-info.cfg b/config-model/src/test/derived/ranktypes/index-info.cfg index 3d4ee9e9239..0b9777ca488 100644 --- a/config-model/src/test/derived/ranktypes/index-info.cfg +++ b/config-model/src/test/derived/ranktypes/index-info.cfg @@ -8,7 +8,7 @@ indexinfo[].command[].command "index" indexinfo[].command[].indexname "title" indexinfo[].command[].command "lowercase" indexinfo[].command[].indexname "title" -indexinfo[].command[].command "stem:SHORTEST" +indexinfo[].command[].command "stem:BEST" indexinfo[].command[].indexname "title" indexinfo[].command[].command "normalize" indexinfo[].command[].indexname "title" @@ -18,7 +18,7 @@ indexinfo[].command[].command "index" indexinfo[].command[].indexname "descr" indexinfo[].command[].command "lowercase" indexinfo[].command[].indexname "descr" -indexinfo[].command[].command "stem:SHORTEST" +indexinfo[].command[].command "stem:BEST" indexinfo[].command[].indexname "descr" indexinfo[].command[].command "normalize" indexinfo[].command[].indexname "descr" @@ -28,7 +28,7 @@ indexinfo[].command[].command "index" indexinfo[].command[].indexname "keywords" indexinfo[].command[].command "lowercase" indexinfo[].command[].indexname "keywords" -indexinfo[].command[].command "stem:SHORTEST" +indexinfo[].command[].command "stem:BEST" indexinfo[].command[].indexname "keywords" indexinfo[].command[].command "normalize" indexinfo[].command[].indexname "keywords" @@ -38,7 +38,7 @@ indexinfo[].command[].command "index" indexinfo[].command[].indexname "identity" indexinfo[].command[].command "lowercase" indexinfo[].command[].indexname "identity" -indexinfo[].command[].command "stem:SHORTEST" +indexinfo[].command[].command "stem:BEST" indexinfo[].command[].indexname "identity" indexinfo[].command[].command "normalize" indexinfo[].command[].indexname "identity" diff --git a/config-model/src/test/derived/types/index-info.cfg b/config-model/src/test/derived/types/index-info.cfg index 576a95de06f..d6b914e5b1b 100644 --- a/config-model/src/test/derived/types/index-info.cfg +++ b/config-model/src/test/derived/types/index-info.cfg @@ -84,7 +84,7 @@ indexinfo[].command[].command "index" indexinfo[].command[].indexname "stringmapfield.key" indexinfo[].command[].command "lowercase" indexinfo[].command[].indexname "stringmapfield.key" -indexinfo[].command[].command "stem:SHORTEST" +indexinfo[].command[].command "stem:BEST" indexinfo[].command[].indexname "stringmapfield.key" indexinfo[].command[].command "normalize" indexinfo[].command[].indexname "stringmapfield.key" @@ -94,7 +94,7 @@ indexinfo[].command[].command "index" indexinfo[].command[].indexname "stringmapfield.value" indexinfo[].command[].command "lowercase" indexinfo[].command[].indexname "stringmapfield.value" -indexinfo[].command[].command "stem:SHORTEST" +indexinfo[].command[].command "stem:BEST" indexinfo[].command[].indexname "stringmapfield.value" indexinfo[].command[].command "normalize" indexinfo[].command[].indexname "stringmapfield.value" diff --git a/config-model/src/test/derived/uri_array/indexschema.cfg b/config-model/src/test/derived/uri_array/indexschema.cfg index be7bf609579..8593c594e3c 100644 --- a/config-model/src/test/derived/uri_array/indexschema.cfg +++ b/config-model/src/test/derived/uri_array/indexschema.cfg @@ -1,5 +1,4 @@ indexfield[].name "my_uri" -indexfield[].indextype VESPA indexfield[].datatype STRING indexfield[].collectiontype ARRAY indexfield[].prefix false @@ -7,7 +6,6 @@ indexfield[].phrases false indexfield[].positions true indexfield[].averageelementlen 512 indexfield[].name "my_uri.fragment" -indexfield[].indextype VESPA indexfield[].datatype STRING indexfield[].collectiontype ARRAY indexfield[].prefix false @@ -15,7 +13,6 @@ indexfield[].phrases false indexfield[].positions true indexfield[].averageelementlen 512 indexfield[].name "my_uri.host" -indexfield[].indextype VESPA indexfield[].datatype STRING indexfield[].collectiontype ARRAY indexfield[].prefix false @@ -23,7 +20,6 @@ indexfield[].phrases false indexfield[].positions true indexfield[].averageelementlen 512 indexfield[].name "my_uri.hostname" -indexfield[].indextype VESPA indexfield[].datatype STRING indexfield[].collectiontype ARRAY indexfield[].prefix false @@ -31,7 +27,6 @@ indexfield[].phrases false indexfield[].positions true indexfield[].averageelementlen 512 indexfield[].name "my_uri.path" -indexfield[].indextype VESPA indexfield[].datatype STRING indexfield[].collectiontype ARRAY indexfield[].prefix false @@ -39,7 +34,6 @@ indexfield[].phrases false indexfield[].positions true indexfield[].averageelementlen 512 indexfield[].name "my_uri.port" -indexfield[].indextype VESPA indexfield[].datatype STRING indexfield[].collectiontype ARRAY indexfield[].prefix false @@ -47,7 +41,6 @@ indexfield[].phrases false indexfield[].positions true indexfield[].averageelementlen 512 indexfield[].name "my_uri.query" -indexfield[].indextype VESPA indexfield[].datatype STRING indexfield[].collectiontype ARRAY indexfield[].prefix false @@ -55,7 +48,6 @@ indexfield[].phrases false indexfield[].positions true indexfield[].averageelementlen 512 indexfield[].name "my_uri.scheme" -indexfield[].indextype VESPA indexfield[].datatype STRING indexfield[].collectiontype ARRAY indexfield[].prefix false diff --git a/config-model/src/test/derived/uri_wset/indexschema.cfg b/config-model/src/test/derived/uri_wset/indexschema.cfg index 5997a47c48a..a432556bb6b 100644 --- a/config-model/src/test/derived/uri_wset/indexschema.cfg +++ b/config-model/src/test/derived/uri_wset/indexschema.cfg @@ -1,5 +1,4 @@ indexfield[].name "my_uri" -indexfield[].indextype VESPA indexfield[].datatype STRING indexfield[].collectiontype WEIGHTEDSET indexfield[].prefix false @@ -7,7 +6,6 @@ indexfield[].phrases false indexfield[].positions true indexfield[].averageelementlen 512 indexfield[].name "my_uri.fragment" -indexfield[].indextype VESPA indexfield[].datatype STRING indexfield[].collectiontype WEIGHTEDSET indexfield[].prefix false @@ -15,7 +13,6 @@ indexfield[].phrases false indexfield[].positions true indexfield[].averageelementlen 512 indexfield[].name "my_uri.host" -indexfield[].indextype VESPA indexfield[].datatype STRING indexfield[].collectiontype WEIGHTEDSET indexfield[].prefix false @@ -23,7 +20,6 @@ indexfield[].phrases false indexfield[].positions true indexfield[].averageelementlen 512 indexfield[].name "my_uri.hostname" -indexfield[].indextype VESPA indexfield[].datatype STRING indexfield[].collectiontype WEIGHTEDSET indexfield[].prefix false @@ -31,7 +27,6 @@ indexfield[].phrases false indexfield[].positions true indexfield[].averageelementlen 512 indexfield[].name "my_uri.path" -indexfield[].indextype VESPA indexfield[].datatype STRING indexfield[].collectiontype WEIGHTEDSET indexfield[].prefix false @@ -39,7 +34,6 @@ indexfield[].phrases false indexfield[].positions true indexfield[].averageelementlen 512 indexfield[].name "my_uri.port" -indexfield[].indextype VESPA indexfield[].datatype STRING indexfield[].collectiontype WEIGHTEDSET indexfield[].prefix false @@ -47,7 +41,6 @@ indexfield[].phrases false indexfield[].positions true indexfield[].averageelementlen 512 indexfield[].name "my_uri.query" -indexfield[].indextype VESPA indexfield[].datatype STRING indexfield[].collectiontype WEIGHTEDSET indexfield[].prefix false @@ -55,7 +48,6 @@ indexfield[].phrases false indexfield[].positions true indexfield[].averageelementlen 512 indexfield[].name "my_uri.scheme" -indexfield[].indextype VESPA indexfield[].datatype STRING indexfield[].collectiontype WEIGHTEDSET indexfield[].prefix false diff --git a/config-model/src/test/examples/disksummary.sd b/config-model/src/test/examples/disksummary.sd deleted file mode 100644 index 766f0e0d2e1..00000000000 --- a/config-model/src/test/examples/disksummary.sd +++ /dev/null @@ -1,14 +0,0 @@ -search disksummary { - - document disksummary { - - field inmemory type string { - indexing: attribute | summary - } - field ondisk type string { - indexing: index | summary - } - - } - -}
\ No newline at end of file diff --git a/config-model/src/test/examples/disksummaryexplicit.sd b/config-model/src/test/examples/disksummaryexplicit.sd deleted file mode 100644 index b0179e04801..00000000000 --- a/config-model/src/test/examples/disksummaryexplicit.sd +++ /dev/null @@ -1,18 +0,0 @@ -search disksummary { - - document disksummary { - - field inmemory type string { - indexing: attribute | summary - } - field ondisk type string { - indexing: index | summary - } - - } - - document-summary default { - from-disk - } - -}
\ No newline at end of file diff --git a/config-model/src/test/examples/indexsettings.sd b/config-model/src/test/examples/indexsettings.sd index 6832527f86e..9f6b02d9a4d 100644 --- a/config-model/src/test/examples/indexsettings.sd +++ b/config-model/src/test/examples/indexsettings.sd @@ -6,7 +6,7 @@ search indexsettings { document indexsettings { field allstemmed type string { - stemming: all + stemming: shortest } field usingdefault type string { diff --git a/config-model/src/test/examples/memorysummary.sd b/config-model/src/test/examples/memorysummary.sd deleted file mode 100644 index 79be30bc0fd..00000000000 --- a/config-model/src/test/examples/memorysummary.sd +++ /dev/null @@ -1,14 +0,0 @@ -search memorysummary { - - document memorysummary { - - field inmemory type string { - indexing: attribute | summary - } - field ondisk type string { - indexing: index # no summary, so ignored - } - - } - -}
\ No newline at end of file diff --git a/config-model/src/test/examples/stemmingsetting.sd b/config-model/src/test/examples/stemmingsetting.sd index 3780dfb3699..51864193174 100644 --- a/config-model/src/test/examples/stemmingsetting.sd +++ b/config-model/src/test/examples/stemmingsetting.sd @@ -25,7 +25,7 @@ search stemmingsetting { field backward type string { indexing: index - stemming: all + stemming: shortest } } diff --git a/config-model/src/test/java/com/yahoo/searchdefinition/CommentTestCase.java b/config-model/src/test/java/com/yahoo/searchdefinition/CommentTestCase.java index a3f3f9cccb2..8ccb1ed969a 100644 --- a/config-model/src/test/java/com/yahoo/searchdefinition/CommentTestCase.java +++ b/config-model/src/test/java/com/yahoo/searchdefinition/CommentTestCase.java @@ -15,11 +15,13 @@ import static org.junit.Assert.assertEquals; * @author bratseth */ public class CommentTestCase extends SearchDefinitionTestCase { + @Test public void testComments() throws IOException, ParseException { Search search = SearchBuilder.buildFromFile("src/test/examples/comment.sd"); SDField field = search.getConcreteField("a"); - assertEquals("{ input a | tokenize normalize stem:\"SHORTEST\" | summary a | index a; }", + assertEquals("{ input a | tokenize normalize stem:\"BEST\" | summary a | index a; }", field.getIndexingScript().toString()); } + } diff --git a/config-model/src/test/java/com/yahoo/searchdefinition/SearchImporterTestCase.java b/config-model/src/test/java/com/yahoo/searchdefinition/SearchImporterTestCase.java index 0c464d668f7..89e551fa789 100644 --- a/config-model/src/test/java/com/yahoo/searchdefinition/SearchImporterTestCase.java +++ b/config-model/src/test/java/com/yahoo/searchdefinition/SearchImporterTestCase.java @@ -55,7 +55,7 @@ public class SearchImporterTestCase extends SearchDefinitionTestCase { // First field field=(SDField) document.getField("title"); assertEquals(DataType.STRING,field.getDataType()); - assertEquals("{ input title | tokenize normalize stem:\"SHORTEST\" | summary title | index title; }", field.getIndexingScript().toString()); + assertEquals("{ input title | tokenize normalize stem:\"BEST\" | summary title | index title; }", field.getIndexingScript().toString()); assertTrue(!search.getIndex("default").isPrefix()); assertTrue(search.getIndex("title").isPrefix()); Iterator<String> titleAliases=search.getIndex("title").aliasIterator(); @@ -105,19 +105,19 @@ public class SearchImporterTestCase extends SearchDefinitionTestCase { // Seventh field field= search.getConcreteField("categories"); - assertEquals("{ input categories_src | lowercase | normalize | tokenize normalize stem:\"SHORTEST\" | index categories; }", + assertEquals("{ input categories_src | lowercase | normalize | tokenize normalize stem:\"BEST\" | index categories; }", field.getIndexingScript().toString()); - assertTrue(!field.isHeader()); + assertTrue(field.isHeader()); // Eight field field= search.getConcreteField("categoriesagain"); - assertEquals("{ input categoriesagain_src | lowercase | normalize | tokenize normalize stem:\"SHORTEST\" | index categoriesagain; }", + assertEquals("{ input categoriesagain_src | lowercase | normalize | tokenize normalize stem:\"BEST\" | index categoriesagain; }", field.getIndexingScript().toString()); assertTrue(field.isHeader()); // Ninth field field= search.getConcreteField("exactemento"); - assertEquals("{ input exactemento_src | lowercase | tokenize normalize stem:\"SHORTEST\" | index exactemento | summary exactemento; }", + assertEquals("{ input exactemento_src | lowercase | tokenize normalize stem:\"BEST\" | index exactemento | summary exactemento; }", field.getIndexingScript().toString()); // Tenth field diff --git a/config-model/src/test/java/com/yahoo/searchdefinition/StemmingSettingTestCase.java b/config-model/src/test/java/com/yahoo/searchdefinition/StemmingSettingTestCase.java index defff99d51e..9b27d338ced 100644 --- a/config-model/src/test/java/com/yahoo/searchdefinition/StemmingSettingTestCase.java +++ b/config-model/src/test/java/com/yahoo/searchdefinition/StemmingSettingTestCase.java @@ -42,10 +42,10 @@ public class StemmingSettingTestCase extends SearchDefinitionTestCase { } @Test - public void requireThatStemmingIsDefaultShortest() throws IOException, ParseException { + public void requireThatStemmingIsDefaultBest() throws IOException, ParseException { Search search = SearchBuilder.buildFromFile("src/test/examples/stemmingdefault.sd"); assertNull(search.getConcreteField("my_str").getStemming()); - assertEquals(Stemming.SHORTEST, search.getConcreteField("my_str").getStemming(search)); + assertEquals(Stemming.BEST, search.getConcreteField("my_str").getStemming(search)); } } diff --git a/config-model/src/test/java/com/yahoo/searchdefinition/SummaryTestCase.java b/config-model/src/test/java/com/yahoo/searchdefinition/SummaryTestCase.java index 6fa716d9b76..7e6eaa0683a 100644 --- a/config-model/src/test/java/com/yahoo/searchdefinition/SummaryTestCase.java +++ b/config-model/src/test/java/com/yahoo/searchdefinition/SummaryTestCase.java @@ -19,28 +19,83 @@ import static org.junit.Assert.assertTrue; public class SummaryTestCase { @Test - public void testMemorySummary() throws IOException, ParseException { + public void testMemorySummary() throws ParseException { + String sd = + "search memorysummary {\n" + + "\n" + + " document memorysummary {\n" + + "\n" + + " field inmemory type string {\n" + + " indexing: attribute | summary\n" + + " }\n" + + " field ondisk type string {\n" + + " indexing: index # no summary, so ignored\n" + + " }\n" + + "\n" + + " }\n" + + "\n" + + "}"; DeployLoggerStub logger = new DeployLoggerStub(); - SearchBuilder.createFromFile("src/test/examples/memorysummary.sd", logger); + SearchBuilder.createFromString(sd, logger); assertTrue(logger.entries.isEmpty()); } @Test - public void testDiskSummary() throws IOException, ParseException { + public void testDiskSummary() throws ParseException { + String sd = + "search disksummary {\n" + + "\n" + + " document-summary foobar {\n" + + " summary foo1 type string { source: inmemory }\n" + + " summary foo2 type string { source: ondisk }\n" + + " }\n" + + " document disksummary {\n" + + "\n" + + " field inmemory type string {\n" + + " indexing: attribute | summary\n" + + " }\n" + + " field ondisk type string {\n" + + " indexing: index | summary\n" + + " }\n" + + "\n" + + " }\n" + + "\n" + + "}"; DeployLoggerStub logger = new DeployLoggerStub(); - SearchBuilder.createFromFile("src/test/examples/disksummary.sd", logger); + SearchBuilder.createFromString(sd, logger); assertEquals(1, logger.entries.size()); - assertEquals(Level.FINE, logger.entries.get(0).level); - assertEquals("summary field 'ondisk' in document summary 'default' references source field 'ondisk', " + + assertEquals(Level.WARNING, logger.entries.get(0).level); + assertEquals("summary field 'foo2' in document summary 'foobar' references source field 'ondisk', " + "which is not an attribute: Using this summary will cause disk accesses. " + "Set 'from-disk' on this summary class to silence this warning.", logger.entries.get(0).message); } @Test - public void testDiskSummaryExplicit() throws IOException, ParseException { + public void testDiskSummaryExplicit() throws ParseException { + String sd = + "search disksummary {\n" + + "\n" + + " document disksummary {\n" + + "\n" + + " field inmemory type string {\n" + + " indexing: attribute | summary\n" + + " }\n" + + " field ondisk type string {\n" + + " indexing: index | summary\n" + + " }\n" + + "\n" + + " }\n" + + "\n" + + " document-summary foobar {\n" + + " summary foo1 type string { source: inmemory }\n" + + " summary foo2 type string { source: ondisk }\n" + + " from-disk\n" + + " }\n" + + "\n" + + "}"; DeployLoggerStub logger = new DeployLoggerStub(); - SearchBuilder.createFromFile("src/test/examples/disksummaryexplicit.sd", logger); + SearchBuilder.createFromString(sd, logger); assertTrue(logger.entries.isEmpty()); } diff --git a/config-model/src/test/java/com/yahoo/searchdefinition/derived/LiteralBoostTestCase.java b/config-model/src/test/java/com/yahoo/searchdefinition/derived/LiteralBoostTestCase.java index 21739705e30..be720cbe4dd 100644 --- a/config-model/src/test/java/com/yahoo/searchdefinition/derived/LiteralBoostTestCase.java +++ b/config-model/src/test/java/com/yahoo/searchdefinition/derived/LiteralBoostTestCase.java @@ -48,7 +48,7 @@ public class LiteralBoostTestCase extends AbstractExportingTestCase { derived.getAttributeFields(); // TODO: assert content // Check il script addition - assertIndexing(Arrays.asList("clear_state | guard { input a | tokenize normalize stem:\"SHORTEST\" | index a; }", + assertIndexing(Arrays.asList("clear_state | guard { input a | tokenize normalize stem:\"BEST\" | index a; }", "clear_state | guard { input a | tokenize | index a_literal; }"), search); @@ -76,7 +76,7 @@ public class LiteralBoostTestCase extends AbstractExportingTestCase { DerivedConfiguration derived = new DerivedConfiguration(search, rankProfileRegistry, new QueryProfileRegistry(),new ImportedMlModels()); // Check il script addition - assertIndexing(Arrays.asList("clear_state | guard { input a | tokenize normalize stem:\"SHORTEST\" | index a; }", + assertIndexing(Arrays.asList("clear_state | guard { input a | tokenize normalize stem:\"BEST\" | index a; }", "clear_state | guard { input a | tokenize | index a_literal; }"), search); @@ -101,8 +101,8 @@ public class LiteralBoostTestCase extends AbstractExportingTestCase { search = SearchBuilder.buildFromRawSearch(search, rankProfileRegistry, new QueryProfileRegistry()); new DerivedConfiguration(search, rankProfileRegistry, new QueryProfileRegistry(), new ImportedMlModels()); - assertIndexing(Arrays.asList("clear_state | guard { input title | tokenize normalize stem:\"SHORTEST\" | summary title | index title; }", - "clear_state | guard { input body | tokenize normalize stem:\"SHORTEST\" | summary body | index body; }", + assertIndexing(Arrays.asList("clear_state | guard { input title | tokenize normalize stem:\"BEST\" | summary title | index title; }", + "clear_state | guard { input body | tokenize normalize stem:\"BEST\" | summary body | index body; }", "clear_state | guard { input title | tokenize | index title_literal; }", "clear_state | guard { input body | tokenize | index body_literal; }"), search); diff --git a/config-model/src/test/java/com/yahoo/searchdefinition/derived/OrderIlscriptsTestCase.java b/config-model/src/test/java/com/yahoo/searchdefinition/derived/OrderIlscriptsTestCase.java index b678c407cf9..428522d3e05 100755 --- a/config-model/src/test/java/com/yahoo/searchdefinition/derived/OrderIlscriptsTestCase.java +++ b/config-model/src/test/java/com/yahoo/searchdefinition/derived/OrderIlscriptsTestCase.java @@ -7,11 +7,13 @@ import org.junit.Test; import java.io.IOException; /** - * @author <a href="mailto:einarmr@yahoo-inc.com">Einar M R Rosenvinge</a> + * @author Einar M R Rosenvinge */ public class OrderIlscriptsTestCase extends AbstractExportingTestCase { + @Test public void testOrderIlscripts() throws IOException, ParseException { assertCorrectDeriving("orderilscripts"); } + } diff --git a/config-model/src/test/java/com/yahoo/searchdefinition/processing/IndexingScriptRewriterTestCase.java b/config-model/src/test/java/com/yahoo/searchdefinition/processing/IndexingScriptRewriterTestCase.java index e078d91f248..d313c2391fd 100644 --- a/config-model/src/test/java/com/yahoo/searchdefinition/processing/IndexingScriptRewriterTestCase.java +++ b/config-model/src/test/java/com/yahoo/searchdefinition/processing/IndexingScriptRewriterTestCase.java @@ -46,12 +46,12 @@ public class IndexingScriptRewriterTestCase extends SearchDefinitionTestCase { public void testDynamicSummaryRewriting() { SDField field = createField("test", DataType.STRING, "{ summary }"); field.addSummaryField(createDynamicSummaryField(field, "dyn")); - assertIndexingScript("{ input test | tokenize normalize stem:\"SHORTEST\" | summary dyn; }", field); + assertIndexingScript("{ input test | tokenize normalize stem:\"BEST\" | summary dyn; }", field); } @Test public void testSummaryRewritingWithIndexing() { - assertIndexingScript("{ input test | tokenize normalize stem:\"SHORTEST\" | summary test | index test; }", + assertIndexingScript("{ input test | tokenize normalize stem:\"BEST\" | summary test | index test; }", createField("test", DataType.STRING, "{ summary | index }")); } @@ -62,7 +62,7 @@ public class IndexingScriptRewriterTestCase extends SearchDefinitionTestCase { field.addSummaryField(createStaticSummaryField(field, "test")); field.addSummaryField(createStaticSummaryField(field, "other")); field.addSummaryField(createDynamicSummaryField(field, "dyn2")); - assertIndexingScript("{ input test | tokenize normalize stem:\"SHORTEST\" | summary dyn | summary dyn2 | summary other | " + + assertIndexingScript("{ input test | tokenize normalize stem:\"BEST\" | summary dyn | summary dyn2 | summary other | " + "summary test | index test; }", field); } @@ -89,7 +89,7 @@ public class IndexingScriptRewriterTestCase extends SearchDefinitionTestCase { public void requireThatOutputDefaultsToCurrentField() { assertIndexingScript("{ input test | attribute test; }", createField("test", DataType.STRING, "{ attribute; }")); - assertIndexingScript("{ input test | tokenize normalize stem:\"SHORTEST\" | index test; }", + assertIndexingScript("{ input test | tokenize normalize stem:\"BEST\" | index test; }", createField("test", DataType.STRING, "{ index; }")); assertIndexingScript("{ input test | summary test; }", createField("test", DataType.STRING, "{ summary; }")); @@ -97,7 +97,7 @@ public class IndexingScriptRewriterTestCase extends SearchDefinitionTestCase { @Test public void testTokenizeComparisonDisregardsConfig() { - assertIndexingScript("{ input test | tokenize normalize stem:\"SHORTEST\" | summary test | index test; }", + assertIndexingScript("{ input test | tokenize normalize stem:\"BEST\" | summary test | index test; }", createField("test", DataType.STRING, "{ summary | tokenize | index; }")); } @@ -106,18 +106,18 @@ public class IndexingScriptRewriterTestCase extends SearchDefinitionTestCase { assertIndexing(Arrays.asList("clear_state | guard { input access | attribute access; }", "clear_state | guard { input category | split \";\" | attribute category_arr; }", "clear_state | guard { input category | tokenize | index category; }", - "clear_state | guard { input categories_src | lowercase | normalize | tokenize normalize stem:\"SHORTEST\" | index categories; }", - "clear_state | guard { input categoriesagain_src | lowercase | normalize | tokenize normalize stem:\"SHORTEST\" | index categoriesagain; }", - "clear_state | guard { input chatter | tokenize normalize stem:\"SHORTEST\" | index chatter; }", - "clear_state | guard { input description | tokenize normalize stem:\"SHORTEST\" | summary description | summary dyndesc | index description; }", - "clear_state | guard { input exactemento_src | lowercase | tokenize normalize stem:\"SHORTEST\" | index exactemento | summary exactemento; }", - "clear_state | guard { input longdesc | tokenize normalize stem:\"SHORTEST\" | summary dyndesc2 | summary dynlong | summary longdesc | summary longstat; }", + "clear_state | guard { input categories_src | lowercase | normalize | tokenize normalize stem:\"BEST\" | index categories; }", + "clear_state | guard { input categoriesagain_src | lowercase | normalize | tokenize normalize stem:\"BEST\" | index categoriesagain; }", + "clear_state | guard { input chatter | tokenize normalize stem:\"BEST\" | index chatter; }", + "clear_state | guard { input description | tokenize normalize stem:\"BEST\" | summary description | summary dyndesc | index description; }", + "clear_state | guard { input exactemento_src | lowercase | tokenize normalize stem:\"BEST\" | index exactemento | summary exactemento; }", + "clear_state | guard { input longdesc | tokenize normalize stem:\"BEST\" | summary dyndesc2 | summary dynlong | summary longdesc | summary longstat; }", "clear_state | guard { input measurement | attribute measurement | summary measurement; }", "clear_state | guard { input measurement | to_array | attribute measurement_arr; }", "clear_state | guard { input popularity | attribute popularity; }", "clear_state | guard { input popularity * input measurement | attribute popsiness; }", "clear_state | guard { input smallattribute | attribute smallattribute; }", - "clear_state | guard { input title | tokenize normalize stem:\"SHORTEST\" | summary title | index title; }", + "clear_state | guard { input title | tokenize normalize stem:\"BEST\" | summary title | index title; }", "clear_state | guard { input title . \" \" . input category | tokenize | summary exact | index exact; }"), SearchBuilder.buildFromFile("src/test/examples/simple.sd")); } diff --git a/config-model/src/test/java/com/yahoo/searchdefinition/processing/IndexingValidationTestCase.java b/config-model/src/test/java/com/yahoo/searchdefinition/processing/IndexingValidationTestCase.java index df323ddfe09..ad801ed50ab 100644 --- a/config-model/src/test/java/com/yahoo/searchdefinition/processing/IndexingValidationTestCase.java +++ b/config-model/src/test/java/com/yahoo/searchdefinition/processing/IndexingValidationTestCase.java @@ -63,8 +63,8 @@ public class IndexingValidationTestCase extends AbstractExportingTestCase { @Test public void testExtraField() throws IOException, ParseException { assertIndexing( - Arrays.asList("clear_state | guard { input my_index | tokenize normalize stem:\"SHORTEST\" | index my_index | summary my_index }", - "clear_state | guard { input my_input | tokenize normalize stem:\"SHORTEST\" | index my_extra | summary my_extra }"), + Arrays.asList("clear_state | guard { input my_index | tokenize normalize stem:\"BEST\" | index my_index | summary my_index }", + "clear_state | guard { input my_input | tokenize normalize stem:\"BEST\" | index my_extra | summary my_extra }"), SearchBuilder.buildFromFile("src/test/examples/indexing_extra.sd")); } diff --git a/config-model/src/test/java/com/yahoo/vespa/model/admin/AdminTestCase.java b/config-model/src/test/java/com/yahoo/vespa/model/admin/AdminTestCase.java index 9cafe6541e4..93f87ef033b 100644 --- a/config-model/src/test/java/com/yahoo/vespa/model/admin/AdminTestCase.java +++ b/config-model/src/test/java/com/yahoo/vespa/model/admin/AdminTestCase.java @@ -218,14 +218,8 @@ public class AdminTestCase { public void testContainerMetricsSnapshotInterval() { VespaModel vespaModel = getVespaModel(TESTDIR + "metricconfig"); - ContainerCluster docprocCluster = vespaModel.getContainerClusters().get("cluster.music.indexing"); - HealthMonitorConfig.Builder builder = new HealthMonitorConfig.Builder(); - docprocCluster.getConfig(builder); - HealthMonitorConfig docprocConfig = new HealthMonitorConfig(builder); - assertEquals(60, (int) docprocConfig.snapshot_interval()); - ContainerCluster qrCluster = vespaModel.getContainerClusters().get("container"); - builder = new HealthMonitorConfig.Builder(); + HealthMonitorConfig.Builder builder = new HealthMonitorConfig.Builder(); qrCluster.getConfig(builder); HealthMonitorConfig qrClusterConfig = new HealthMonitorConfig(builder); assertEquals(60, (int) qrClusterConfig.snapshot_interval()); diff --git a/config-model/src/test/java/com/yahoo/vespa/model/admin/DedicatedAdminV4Test.java b/config-model/src/test/java/com/yahoo/vespa/model/admin/DedicatedAdminV4Test.java index 27839765930..0b9aeb9f188 100644 --- a/config-model/src/test/java/com/yahoo/vespa/model/admin/DedicatedAdminV4Test.java +++ b/config-model/src/test/java/com/yahoo/vespa/model/admin/DedicatedAdminV4Test.java @@ -53,19 +53,12 @@ public class DedicatedAdminV4Test { " <admin version='4.0'>" + " <slobroks><nodes count='2' dedicated='true'/></slobroks>" + " <logservers><nodes count='1' dedicated='true'/></logservers>" + - " <yamas systemname='vespa.routing' interval='60' />" + + " <monitoring systemname='vespa.routing' interval='60' />" + " <metrics>" + " <consumer id='slingstone'>" + " <metric id='foobar.count' display-name='foobar'/>" + " </consumer>" + " </metrics>" + - " <metric-consumers>" + - " <consumer name='yamas'>" + - " <metric name='upstreams_generated' />" + - " <metric name='upstreams_nginx_reloads' />" + - " <metric name='nginx.upstreams.down.last' output-name='nginx.upstreams.down'/>" + - " </consumer>" + - " </metric-consumers>" + " <identity>" + " <domain>mydomain</domain>" + " <service>myservice</service>" + @@ -90,13 +83,6 @@ public class DedicatedAdminV4Test { Metric metric = consumer.getMetrics().get("foobar.count"); assertNotNull(metric); assertEquals("foobar", metric.outputName); - - consumer = model.getAdmin().getLegacyUserMetricsConsumers().get(VESPA_CONSUMER_ID); - assertNotNull(consumer); - assertEquals(3, consumer.getMetrics().size()); - metric = consumer.getMetrics().get("nginx.upstreams.down.last"); - assertNotNull(metric); - assertEquals("nginx.upstreams.down", metric.outputName); } @Test diff --git a/config-model/src/test/java/com/yahoo/vespa/model/application/validation/change/ConfigValueChangeValidatorTest.java b/config-model/src/test/java/com/yahoo/vespa/model/application/validation/change/ConfigValueChangeValidatorTest.java index f9944f563c4..2456113f40d 100644 --- a/config-model/src/test/java/com/yahoo/vespa/model/application/validation/change/ConfigValueChangeValidatorTest.java +++ b/config-model/src/test/java/com/yahoo/vespa/model/application/validation/change/ConfigValueChangeValidatorTest.java @@ -58,10 +58,9 @@ public class ConfigValueChangeValidatorTest { createVespaModel(createQrStartConfigSegment(true, 2096)), createVespaModel(createQrStartConfigSegment(false, 2096)) ); - assertEquals(3, changes.size()); + assertEquals(2, changes.size()); assertComponentsEquals(changes, "default/container.0", 0); assertComponentsEquals(changes, "admin/cluster-controllers/0", 1); - assertComponentsEquals(changes, "docproc/cluster.basicsearch.indexing/0", 2); } @Test diff --git a/config-model/src/test/java/com/yahoo/vespa/model/application/validation/change/search/DocumentDatabaseChangeValidatorTest.java b/config-model/src/test/java/com/yahoo/vespa/model/application/validation/change/search/DocumentDatabaseChangeValidatorTest.java index 339f8514f9f..43db1c65d37 100644 --- a/config-model/src/test/java/com/yahoo/vespa/model/application/validation/change/search/DocumentDatabaseChangeValidatorTest.java +++ b/config-model/src/test/java/com/yahoo/vespa/model/application/validation/change/search/DocumentDatabaseChangeValidatorTest.java @@ -48,7 +48,7 @@ public class DocumentDatabaseChangeValidatorTest { newRefeedAction("indexing-change", ValidationOverrides.empty, "Field 'f2' changed: add index aspect, indexing script: '{ input f2 | summary f2; }' -> " + - "'{ input f2 | tokenize normalize stem:\"SHORTEST\" | index f2 | summary f2; }'", Instant.now()), + "'{ input f2 | tokenize normalize stem:\"BEST\" | index f2 | summary f2; }'", Instant.now()), newRefeedAction("field-type-change", ValidationOverrides.empty, "Field 'f3' changed: data type: 'int' -> 'string'", Instant.now()))); diff --git a/config-model/src/test/java/com/yahoo/vespa/model/application/validation/change/search/IndexingScriptChangeValidatorTest.java b/config-model/src/test/java/com/yahoo/vespa/model/application/validation/change/search/IndexingScriptChangeValidatorTest.java index 3fe3c27a648..7a5b235737a 100644 --- a/config-model/src/test/java/com/yahoo/vespa/model/application/validation/change/search/IndexingScriptChangeValidatorTest.java +++ b/config-model/src/test/java/com/yahoo/vespa/model/application/validation/change/search/IndexingScriptChangeValidatorTest.java @@ -66,7 +66,7 @@ public class IndexingScriptChangeValidatorTest { FIELD + " { indexing: index | summary }"). assertValidation(expectedAction("add index aspect", "{ input f1 | summary f1; }", - "{ input f1 | tokenize normalize stem:\"SHORTEST\" | index f1 | summary f1; }")); + "{ input f1 | tokenize normalize stem:\"BEST\" | index f1 | summary f1; }")); } @Test @@ -74,7 +74,7 @@ public class IndexingScriptChangeValidatorTest { new Fixture(FIELD + " { indexing: index | summary }", FIELD + " { indexing: summary }"). assertValidation(expectedAction("remove index aspect", - "{ input f1 | tokenize normalize stem:\"SHORTEST\" | index f1 | summary f1; }", + "{ input f1 | tokenize normalize stem:\"BEST\" | index f1 | summary f1; }", "{ input f1 | summary f1; }")); } @@ -82,8 +82,8 @@ public class IndexingScriptChangeValidatorTest { public void requireThatChangingStemmingRequireRefeed() throws Exception { new Fixture(FIELD + " { indexing: index }", FIELD + " { indexing: index \n stemming: none }"). - assertValidation(expectedAction("stemming: 'shortest' -> 'none'", - "{ input f1 | tokenize normalize stem:\"SHORTEST\" | index f1; }", + assertValidation(expectedAction("stemming: 'best' -> 'none'", + "{ input f1 | tokenize normalize stem:\"BEST\" | index f1; }", "{ input f1 | tokenize normalize | index f1; }")); } @@ -92,8 +92,8 @@ public class IndexingScriptChangeValidatorTest { new Fixture(FIELD + " { indexing: index }", FIELD + " { indexing: index \n normalizing: none }"). assertValidation(expectedAction("normalizing: 'ACCENT' -> 'NONE'", - "{ input f1 | tokenize normalize stem:\"SHORTEST\" | index f1; }", - "{ input f1 | tokenize stem:\"SHORTEST\" | index f1; }")); + "{ input f1 | tokenize normalize stem:\"BEST\" | index f1; }", + "{ input f1 | tokenize stem:\"BEST\" | index f1; }")); } @Test @@ -111,19 +111,19 @@ public class IndexingScriptChangeValidatorTest { FIELD + " { indexing: summary \n summary: dynamic }"). assertValidation(expectedAction("summary field 'f1' transform: 'none' -> 'dynamicteaser'", "{ input f1 | summary f1; }", - "{ input f1 | tokenize normalize stem:\"SHORTEST\" | summary f1; }")); + "{ input f1 | tokenize normalize stem:\"BEST\" | summary f1; }")); } @Test public void requireThatMultipleChangesRequireRefeed() throws Exception { new Fixture(FIELD + " { indexing: index } " + FIELD_F2 + " { indexing: index }", FIELD + " { indexing: index \n stemming: none } " + FIELD_F2 + " { indexing: index \n normalizing: none }"). - assertValidation(Arrays.asList(expectedAction("f1", "stemming: 'shortest' -> 'none'", - "{ input f1 | tokenize normalize stem:\"SHORTEST\" | index f1; }", + assertValidation(Arrays.asList(expectedAction("f1", "stemming: 'best' -> 'none'", + "{ input f1 | tokenize normalize stem:\"BEST\" | index f1; }", "{ input f1 | tokenize normalize | index f1; }"), expectedAction("f2", "normalizing: 'ACCENT' -> 'NONE'", - "{ input f2 | tokenize normalize stem:\"SHORTEST\" | index f2; }", - "{ input f2 | tokenize stem:\"SHORTEST\" | index f2; }"))); + "{ input f2 | tokenize normalize stem:\"BEST\" | index f2; }", + "{ input f2 | tokenize stem:\"BEST\" | index f2; }"))); } @Test diff --git a/config-model/src/test/java/com/yahoo/vespa/model/builder/xml/dom/DomAdminV2BuilderTest.java b/config-model/src/test/java/com/yahoo/vespa/model/builder/xml/dom/DomAdminV2BuilderTest.java index 38c7547c625..d7861a6f284 100755 --- a/config-model/src/test/java/com/yahoo/vespa/model/builder/xml/dom/DomAdminV2BuilderTest.java +++ b/config-model/src/test/java/com/yahoo/vespa/model/builder/xml/dom/DomAdminV2BuilderTest.java @@ -73,7 +73,7 @@ public class DomAdminV2BuilderTest extends DomBuilderTest { " <configserver hostalias=\"mockhost\"/>" + " </configservers>" + " <adminserver hostalias=\"mockhost\"/>" + - " <yamas systemname=\"foo\"/>" + + " <monitoring systemname=\"foo\"/>" + "</admin>").getDocumentElement(); } @@ -101,7 +101,7 @@ public class DomAdminV2BuilderTest extends DomBuilderTest { " <configserver hostalias=\"mockhost\"/>" + " </configservers>" + " <adminserver hostalias=\"mockhost\"/>" + - " <yamas systemname=\"foo\" interval=\"300\"/>" + + " <monitoring systemname=\"foo\" interval=\"300\"/>" + "</admin>").getDocumentElement(); } @@ -187,7 +187,7 @@ public class DomAdminV2BuilderTest extends DomBuilderTest { Element servicesYamasIllegalInterval = XML.getDocument( "<admin version=\"2.0\">" + " <adminserver hostalias=\"mockhost\"/>" + - " <yamas interval=\"5\"/>" + + " <monitoring interval=\"5\"/>" + "</admin>").getDocumentElement(); Admin admin = buildAdmin(servicesYamasIllegalInterval); } diff --git a/config-model/src/test/java/com/yahoo/vespa/model/builder/xml/dom/DomSearchTuningBuilderTest.java b/config-model/src/test/java/com/yahoo/vespa/model/builder/xml/dom/DomSearchTuningBuilderTest.java index 2ccf048df92..145715bdc16 100644 --- a/config-model/src/test/java/com/yahoo/vespa/model/builder/xml/dom/DomSearchTuningBuilderTest.java +++ b/config-model/src/test/java/com/yahoo/vespa/model/builder/xml/dom/DomSearchTuningBuilderTest.java @@ -184,7 +184,6 @@ public class DomSearchTuningBuilderTest extends DomBuilderTest { "<logstore>", "<maxfilesize>512</maxfilesize>", "<minfilesizefactor>0.3</minfilesizefactor>", - "<numthreads>7</numthreads>", "<chunk>", "<maxsize>256</maxsize>", "<compression>", @@ -204,7 +203,6 @@ public class DomSearchTuningBuilderTest extends DomBuilderTest { assertEquals(3, t.searchNode.summary.store.cache.compression.level.intValue()); assertEquals(512, t.searchNode.summary.store.logStore.maxFileSize.longValue()); assertEquals(0.3, t.searchNode.summary.store.logStore.minFileSizeFactor, DELTA); - assertEquals(7, t.searchNode.summary.store.logStore.numThreads.intValue()); assertEquals(256, t.searchNode.summary.store.logStore.chunk.maxSize.intValue()); assertEquals(Tuning.SearchNode.Summary.Store.Compression.Type.LZ4, t.searchNode.summary.store.logStore.chunk.compression.type); diff --git a/config-model/src/test/java/com/yahoo/vespa/model/builder/xml/dom/chains/search/DomProviderBuilderTest.java b/config-model/src/test/java/com/yahoo/vespa/model/builder/xml/dom/chains/search/DomProviderBuilderTest.java deleted file mode 100755 index ff2f2054229..00000000000 --- a/config-model/src/test/java/com/yahoo/vespa/model/builder/xml/dom/chains/search/DomProviderBuilderTest.java +++ /dev/null @@ -1,104 +0,0 @@ -// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -package com.yahoo.vespa.model.builder.xml.dom.chains.search; - -import com.yahoo.config.model.builder.xml.test.DomBuilderTest; -import com.yahoo.search.federation.ProviderConfig; -import com.yahoo.vespa.model.container.search.searchchain.HttpProvider; -import com.yahoo.vespa.model.container.search.searchchain.Provider; -import org.junit.Test; -import org.w3c.dom.Element; - -import java.util.HashMap; - -import static org.hamcrest.CoreMatchers.is; -import static org.junit.Assert.assertThat; -import static org.junit.Assert.fail; - -/** - * @author gjoranv - */ -public class DomProviderBuilderTest extends DomBuilderTest { - - private static final Element noProxy = parse( - "<provider id='yca-provider' type='vespa' yca-application-id='my-app'>", - " <nodes>", - " <node host='sourcehost' port='12'/>", - " </nodes>", - "</provider>"); - - private static final Element defaultProxy = parse( - "<provider id='yca-provider' type='vespa' yca-application-id='my-app'>", - " <yca-proxy/>", - " <nodes>", - " <node host='sourcehost' port='12'/>", - " </nodes>", - "</provider>"); - - private static final Element proprietaryProxy = parse( - "<provider id='yca-provider' type='vespa' yca-application-id='my-app'>", - " <yca-proxy host='my-host' port='80'/>", - " <nodes>", - " <node host='sourcehost' port='12'/>", - " </nodes>", - "</provider>"); - - private static final Element illegal_proxyWithoutId= parse( - "<provider id='yca-provider' type='vespa'>", - " <yca-proxy host='my-host' port='80'/>", - " <nodes>", - " <node host='sourcehost' port='12'/>", - " </nodes>", - "</provider>"); - - private Provider provider; - - @Test - public void testCertificateConfig_noProxy() { - provider = new DomProviderBuilder(new HashMap<>()).doBuild(root.getDeployState(), root, noProxy); - - ProviderConfig.Builder providerBuilder = new ProviderConfig.Builder(); - ((HttpProvider)provider).getConfig(providerBuilder); - ProviderConfig providerConfig = new ProviderConfig(providerBuilder); - assertThat(providerConfig.yca().applicationId(), is("my-app")); - assertThat(providerConfig.yca().useProxy(), is(false)); - } - - @Test - public void testCertificatewConfig_defaultProxy() { - provider = new DomProviderBuilder(new HashMap<>()).doBuild(root.getDeployState(), root, defaultProxy); - - ProviderConfig.Builder providerBuilder = new ProviderConfig.Builder(); - ((HttpProvider)provider).getConfig(providerBuilder); - ProviderConfig providerConfig = new ProviderConfig(providerBuilder); - - assertThat(providerConfig.yca().applicationId(), is("my-app")); - assertThat(providerConfig.yca().useProxy(), is(true)); - assertThat(providerConfig.yca().host(), is("yca.host must be set explicitly")); // default from def-file - assertThat(providerConfig.yca().port(), is(3128)); // default from def-file - } - - @Test - public void testCertificateConfig_proprietaryProxy() { - provider = new DomProviderBuilder(new HashMap<>()).doBuild(root.getDeployState(), root, proprietaryProxy); - - ProviderConfig.Builder providerBuilder = new ProviderConfig.Builder(); - ((HttpProvider)provider).getConfig(providerBuilder); - ProviderConfig providerConfig = new ProviderConfig(providerBuilder); - - assertThat(providerConfig.yca().applicationId(), is("my-app")); - assertThat(providerConfig.yca().useProxy(), is(true)); - assertThat(providerConfig.yca().host(), is("my-host")); - assertThat(providerConfig.yca().port(), is(80)); - } - - @Test - public void testFail_ycaProxyWithoutId() { - try { - provider = new DomProviderBuilder(new HashMap<>()).doBuild(root.getDeployState(), root, illegal_proxyWithoutId); - fail("Expected exception upon illegal xml."); - } catch (IllegalArgumentException e) { - assertThat(e.getMessage(), is("Provider 'yca-provider' must have a certificate application ID, since a certificate store proxy is given")); - } - } - -} diff --git a/config-model/src/test/java/com/yahoo/vespa/model/builder/xml/dom/chains/search/DomSearchChainsBuilderTest.java b/config-model/src/test/java/com/yahoo/vespa/model/builder/xml/dom/chains/search/DomSearchChainsBuilderTest.java index cc139913536..ef09d8ff887 100644 --- a/config-model/src/test/java/com/yahoo/vespa/model/builder/xml/dom/chains/search/DomSearchChainsBuilderTest.java +++ b/config-model/src/test/java/com/yahoo/vespa/model/builder/xml/dom/chains/search/DomSearchChainsBuilderTest.java @@ -43,7 +43,7 @@ public class DomSearchChainsBuilderTest extends DomBuilderTest { "<searchchains>", " <searcher id='searcher:1'/>", - " <provider id='provider:1' type='vespa' inherits='parentChain1 parentChain2' excludes='ExcludedSearcher1 ExcludedSearcher2'", + " <provider id='provider:1' inherits='parentChain1 parentChain2' excludes='ExcludedSearcher1 ExcludedSearcher2'", " cacheweight='2.3'>", " <federationoptions optional='true' timeout='2.3 s' />", " <nodes>", @@ -155,7 +155,6 @@ public class DomSearchChainsBuilderTest extends DomBuilderTest { ChainsConfig config = new ChainsConfig(builder); checkInnerSearcherIdIsNestedInSearchChainId(config, "federationSearcher", "default"); - checkInnerSearcherIdIsNestedInSearchChainId(config, "VespaSearcher", "provider"); } private void checkInnerSearcherIdIsNestedInSearchChainId(ChainsConfig config, diff --git a/config-model/src/test/java/com/yahoo/vespa/model/clients/test/SpoolerTestCase.java b/config-model/src/test/java/com/yahoo/vespa/model/clients/test/SpoolerTestCase.java deleted file mode 100644 index 7e0c31dd998..00000000000 --- a/config-model/src/test/java/com/yahoo/vespa/model/clients/test/SpoolerTestCase.java +++ /dev/null @@ -1,145 +0,0 @@ -// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -package com.yahoo.vespa.model.clients.test; - -import com.yahoo.vespa.config.content.spooler.SpoolerConfig; -import com.yahoo.vespa.model.VespaModel; -import com.yahoo.vespa.model.test.utils.CommonVespaModelSetup; -import com.yahoo.vespaclient.config.FeederConfig; -import org.junit.Test; - -import java.util.*; - -import static org.junit.Assert.assertEquals; - -/** - * @author Thomas Gundersen - */ -public class SpoolerTestCase { - - @Test - public void testSimple() throws Exception { - VespaModel model = createModel("src/test/cfg/clients/simpleconfig.v2.docprocv3"); - - SpoolerConfig.Builder builder = new SpoolerConfig.Builder(); - SpoolerConfig.Parsers.Builder parserBuilder1 = createParserBuilder("com.yahoo.vespaspooler.XMLFileParser"); - SpoolerConfig.Parsers.Builder parserBuilder2 = createParserBuilder("com.yahoo.vespaspooler.MusicFileParser"); - LinkedHashMap<String, String> parameters = new LinkedHashMap<>(); - parameters.put("route", "default"); - parameters.put("foo", "bar"); - SpoolerConfig.Parsers.Builder parserBuilder3 = createParserBuilder("com.yahoo.vespaspooler.MusicParser", - parameters); - builder.maxfailuresize(100000). - maxfatalfailuresize(1000000). - threads(5). - parsers(Arrays.asList(parserBuilder1, parserBuilder2, parserBuilder3)); - final int spoolerIndex = 0; - testSpoolerConfigBuilder(model, spoolerIndex, builder); - - FeederConfig.Builder feederBuilder = new FeederConfig.Builder(). - abortondocumenterror(false). - maxpendingbytes(8000). - tracelevel(7); - testFeederConfigBuilder(model, spoolerIndex, feederBuilder); - } - - @Test - public void testAdvanced() throws Exception { - VespaModel model = createModel("src/test/cfg/clients/advancedconfig.v2"); - - SpoolerConfig.Builder builder = new SpoolerConfig.Builder(); - SpoolerConfig.Parsers.Builder parserBuilder1 = createParserBuilder("com.yahoo.vespaspooler.XMLFileParser"); - SpoolerConfig.Parsers.Builder parserBuilder2 = createParserBuilder("com.yahoo.vespaspooler.MusicFileParser"); - LinkedHashMap<String, String> parameters = new LinkedHashMap<>(); - parameters.put("route", "default"); - SpoolerConfig.Parsers.Builder parserBuilder3 = createParserBuilder("com.yahoo.vespaspooler.MusicParser", - parameters); - builder.keepsuccess(true). - parsers(Arrays.asList(parserBuilder1, parserBuilder2, parserBuilder3)); - int spoolerIndex = 0; - testSpoolerConfigBuilder(model, spoolerIndex, builder); - - FeederConfig.Builder feederBuilder = new FeederConfig.Builder(). - abortondocumenterror(false). - maxpendingbytes(8000). - timeout(90.0); - testFeederConfigBuilder(model, spoolerIndex, feederBuilder); - - builder = new SpoolerConfig.Builder(); - parameters = new LinkedHashMap<>(); - parameters.put("route", "othercluster"); - - parserBuilder1 = createParserBuilder("com.yahoo.vespaspooler.MusicParser", - parameters); - builder.keepsuccess(false). - parsers(parserBuilder1); - spoolerIndex = 1; - testSpoolerConfigBuilder(model, spoolerIndex, builder); - - feederBuilder = new FeederConfig.Builder(). - abortondocumenterror(false). - maxpendingbytes(4000). - timeout(50.0); - testFeederConfigBuilder(model, spoolerIndex, feederBuilder); - - builder = new SpoolerConfig.Builder(); - parserBuilder1 = new SpoolerConfig.Parsers.Builder(); - parserBuilder1.classname("com.yahoo.vespaspooler.MusicFileParser"); - builder.parsers(parserBuilder1); - String id = "plan9"; - testSpoolerConfigBuilder(model, "clients/spoolers/" + id, builder); - - feederBuilder = new FeederConfig.Builder(). - route("myroute"). - mbusport(14064). - timeout(90.0); - testFeederConfigBuilder(model, "clients/spoolers/" + id, feederBuilder); - } - - SpoolerConfig.Parsers.Builder createParserBuilder(String className) { - return createParserBuilder(className, new HashMap<String, String>()); - } - - SpoolerConfig.Parsers.Builder createParserBuilder(String className, Map<String, String> parameters) { - SpoolerConfig.Parsers.Builder builder = new SpoolerConfig.Parsers.Builder(); - builder.classname(className); - if (!parameters.isEmpty()) { - List<SpoolerConfig.Parsers.Parameters.Builder> parametersBuilders = new ArrayList<>(); - for (Map.Entry<String, String> entry : parameters.entrySet()) { - final SpoolerConfig.Parsers.Parameters.Builder parametersBuilder = new SpoolerConfig.Parsers.Parameters.Builder(); - parametersBuilder.key(entry.getKey()).value(entry.getValue()); - parametersBuilders.add(parametersBuilder); - } - builder.parameters(parametersBuilders); - } - return builder; - } - - private void testSpoolerConfigBuilder(VespaModel model, int index, SpoolerConfig.Builder expected) throws Exception { - testSpoolerConfigBuilder(model, "clients/spoolers/spooler." + index, expected); - } - - private void testSpoolerConfigBuilder(VespaModel model, String id, SpoolerConfig.Builder expected) throws Exception { - SpoolerConfig.Builder b = new SpoolerConfig.Builder(); - model.getConfig(b, id); - SpoolerConfig config = new SpoolerConfig(b); - SpoolerConfig expectedConfig = new SpoolerConfig(expected); - assertEquals(expectedConfig, config); - } - - private void testFeederConfigBuilder(VespaModel model, int index, FeederConfig.Builder expected) throws Exception { - testFeederConfigBuilder(model, "clients/spoolers/spooler." + index, expected); - } - - private void testFeederConfigBuilder(VespaModel model, String id, FeederConfig.Builder expected) throws Exception { - FeederConfig.Builder b = new FeederConfig.Builder(); - model.getConfig(b, id); - FeederConfig config = new FeederConfig(b); - FeederConfig expectedConfig = new FeederConfig(expected); - assertEquals(expectedConfig, config); - } - - private VespaModel createModel(String configFile) throws Exception { - return CommonVespaModelSetup.createVespaModelWithMusic(configFile); - } - -} diff --git a/config-model/src/test/java/com/yahoo/vespa/model/container/ContainerClusterTest.java b/config-model/src/test/java/com/yahoo/vespa/model/container/ContainerClusterTest.java index b4dea09010d..121b1cd4f4d 100755 --- a/config-model/src/test/java/com/yahoo/vespa/model/container/ContainerClusterTest.java +++ b/config-model/src/test/java/com/yahoo/vespa/model/container/ContainerClusterTest.java @@ -13,7 +13,6 @@ import com.yahoo.config.provision.RegionName; import com.yahoo.config.provision.SystemName; import com.yahoo.config.provision.Zone; import com.yahoo.container.handler.ThreadpoolConfig; -import com.yahoo.container.jdisc.config.MetricDefaultsConfig; import com.yahoo.search.config.QrStartConfig; import com.yahoo.vespa.model.Host; import com.yahoo.vespa.model.HostResource; @@ -29,6 +28,7 @@ import java.util.Collection; import java.util.Iterator; import java.util.Optional; +import static com.yahoo.vespa.model.container.ContainerCluster.G1GC; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; @@ -39,21 +39,6 @@ import static org.junit.Assert.assertTrue; public class ContainerClusterTest { @Test - public void requireThatDefaultMetricConsumerFactoryCanBeConfigured() { - ContainerCluster cluster = newContainerCluster(); - cluster.setDefaultMetricConsumerFactory(MetricDefaultsConfig.Factory.Enum.YAMAS_SCOREBOARD); - assertEquals(MetricDefaultsConfig.Factory.Enum.YAMAS_SCOREBOARD, - getMetricDefaultsConfig(cluster).factory()); - } - - @Test - public void requireThatDefaultMetricConsumerFactoryMatchesConfigDefault() { - ContainerCluster cluster = newContainerCluster(); - assertEquals(new MetricDefaultsConfig(new MetricDefaultsConfig.Builder()).factory(), - getMetricDefaultsConfig(cluster).factory()); - } - - @Test public void requireThatClusterInfoIsPopulated() { ContainerCluster cluster = newContainerCluster(); ClusterInfoConfig config = getClusterInfoConfig(cluster); @@ -227,7 +212,7 @@ public class ContainerClusterTest { MockRoot root = createRoot(false); ContainerCluster cluster = createClusterControllerCluster(root); addClusterController(root.deployLogger(), cluster, "host-c1"); - assertFalse(contains("com.yahoo.language.provider.SimpleLinguisticsProvider", cluster.getAllComponents())); + assertFalse(contains("com.yahoo.language.provider.DefaultLinguisticsProvider", cluster.getAllComponents())); } @Test @@ -235,7 +220,7 @@ public class ContainerClusterTest { MockRoot root = createRoot(false); ContainerCluster cluster = createContainerCluster(root, false); addClusterController(root.deployLogger(), cluster, "host-c1"); - assertTrue(contains("com.yahoo.language.provider.SimpleLinguisticsProvider", cluster.getAllComponents())); + assertTrue(contains("com.yahoo.language.provider.DefaultLinguisticsProvider", cluster.getAllComponents())); } private static boolean contains(String componentId, Collection<Component<?, ?>> componentList) { @@ -300,12 +285,6 @@ public class ContainerClusterTest { return cluster; } - private static MetricDefaultsConfig getMetricDefaultsConfig(ContainerCluster cluster) { - MetricDefaultsConfig.Builder builder = new MetricDefaultsConfig.Builder(); - cluster.getConfig(builder); - return new MetricDefaultsConfig(builder); - } - private static ClusterInfoConfig getClusterInfoConfig(ContainerCluster cluster) { ClusterInfoConfig.Builder builder = new ClusterInfoConfig.Builder(); cluster.getConfig(builder); diff --git a/config-model/src/test/java/com/yahoo/vespa/model/container/http/FilterBindingsTest.java b/config-model/src/test/java/com/yahoo/vespa/model/container/http/FilterBindingsTest.java index 643e65ffc61..4d04a1be614 100644 --- a/config-model/src/test/java/com/yahoo/vespa/model/container/http/FilterBindingsTest.java +++ b/config-model/src/test/java/com/yahoo/vespa/model/container/http/FilterBindingsTest.java @@ -3,7 +3,6 @@ package com.yahoo.vespa.model.container.http; import com.yahoo.config.model.deploy.DeployState; import com.yahoo.config.model.builder.xml.test.DomBuilderTest; -import com.yahoo.container.jdisc.config.HttpServerConfig; import com.yahoo.jdisc.http.ServerConfig; import com.yahoo.vespa.model.container.ContainerModel; import com.yahoo.vespa.model.container.component.chain.Chain; @@ -23,7 +22,6 @@ import static org.junit.Assert.assertNotNull; /** * @author gjoranv - * @since 5.1.25 */ public class FilterBindingsTest extends DomBuilderTest { @@ -85,7 +83,7 @@ public class FilterBindingsTest extends DomBuilderTest { @Test public void bindings_are_added_to_config_for_all_http_servers_with_jetty() throws Exception { final Element xml = parse( - "<jdisc version='1.0' jetty='true'>", + "<jdisc version='1.0'>", " <http>", " <filtering>", " <request-chain id='my-request-chain'>", diff --git a/config-model/src/test/java/com/yahoo/vespa/model/container/search/searchchain/SearchChainsTest.java b/config-model/src/test/java/com/yahoo/vespa/model/container/search/searchchain/SearchChainsTest.java index 1d05a0d6d51..d81ffedef7f 100644 --- a/config-model/src/test/java/com/yahoo/vespa/model/container/search/searchchain/SearchChainsTest.java +++ b/config-model/src/test/java/com/yahoo/vespa/model/container/search/searchchain/SearchChainsTest.java @@ -21,9 +21,11 @@ import static org.junit.Assert.*; /** * Test of search chains config * <p>TODO: examine the actual values in the configs.</p> + * * @author Tony Vaagenes */ public class SearchChainsTest extends SearchChainsTestBase { + private ChainsConfig chainsConfig; private ProviderConfig providerConfig; private ClusterConfig clusterConfig; @@ -34,10 +36,6 @@ public class SearchChainsTest extends SearchChainsTestBase { chainsBuilder = (ChainsConfig.Builder)root.getConfig(chainsBuilder, "searchchains"); chainsConfig = new ChainsConfig(chainsBuilder); - ProviderConfig.Builder providerBuilder = new ProviderConfig.Builder(); - providerBuilder = (ProviderConfig.Builder)root.getConfig(providerBuilder, "searchchains/chain/provider:1/component/com.yahoo.search.federation.vespa.VespaSearcher"); - providerConfig = new ProviderConfig(providerBuilder); - ClusterConfig.Builder clusterBuilder = new ClusterConfig.Builder(); clusterBuilder = (ClusterConfig.Builder)root.getConfig(clusterBuilder, "searchchains/chain/cluster2/component/" + ClusterSearcher.class.getName()); clusterConfig = new ClusterConfig(clusterBuilder); @@ -50,7 +48,7 @@ public class SearchChainsTest extends SearchChainsTestBase { "<searchchains>", " <searcher id='searcher:1' classId='classId1' />", - " <provider id='provider:1' type='vespa' inherits='parentChain1 parentChain2' excludes='ExcludedSearcher1 ExcludedSearcher2'", + " <provider id='provider:1' inherits='parentChain1 parentChain2' excludes='ExcludedSearcher1 ExcludedSearcher2'", " cacheweight='2.3'>", " <federationoptions optional='true' timeout='2.3 s' />", " <nodes>", @@ -67,7 +65,7 @@ public class SearchChainsTest extends SearchChainsTestBase { " <provider id='provider:2' type='local' cluster='cluster1' />", " <provider id='provider:3' />", - " <provider id='vespa-provider' type='vespa' >", + " <provider id='vespa-provider'>", " <nodes>", " <node host='localhost' port='" + Defaults.getDefaults().vespaWebServicePort() + "' />", " </nodes>", @@ -96,32 +94,15 @@ public class SearchChainsTest extends SearchChainsTestBase { } @Test - public void require_user_config_for_vespa_searcher_works() { - assertEquals(root.getConfig(ProviderConfig.class, "searchchains/chain/vespa-provider/component/com.yahoo.search.federation.vespa.VespaSearcher"). - queryType(), ProviderConfig.QueryType.PROGRAMMATIC); - } - - @Test public void require_that_source_chain_spec_id_is_namespaced_in_provider_id() { Source source = (Source) getSearchChains().allChains().getComponent("source:1@provider:1"); assertThat(source.getChainSpecification().componentId.getNamespace(), is(ComponentId.fromString("provider:1"))); } @Test - public void validateHttpProviderConfig() { - assertNotNull(providerConfig); - } - - @Test public void validateLocalProviderConfig() { assertEquals(2, clusterConfig.clusterId()); assertEquals("cluster2", clusterConfig.clusterName()); } - public static boolean verifyChainExists(List<ChainsConfig.Chains> chains, String componentId) { - for (ChainsConfig.Chains c : chains) { - if (c.id().equals(componentId)) return true; - } - return false; - } } diff --git a/config-model/src/test/java/com/yahoo/vespa/model/container/xml/AccessControlTest.java b/config-model/src/test/java/com/yahoo/vespa/model/container/xml/AccessControlTest.java index 52029d4c434..fd1ea2ae7ab 100644 --- a/config-model/src/test/java/com/yahoo/vespa/model/container/xml/AccessControlTest.java +++ b/config-model/src/test/java/com/yahoo/vespa/model/container/xml/AccessControlTest.java @@ -35,13 +35,7 @@ public class AccessControlTest extends ContainerModelBuilderTestBase { private static final Set<String> REQUIRED_HANDLER_BINDINGS = ImmutableSet.of( "/custom-handler/", "/search/", - "/feed/", - "/remove/", - "/removelocation/", - "/get/", - "/visit/", "/document/", - "/feedstatus/", ContainerCluster.RESERVED_URI_PREFIX); private static final Set<String> FORBIDDEN_HANDLER_BINDINGS = ImmutableSet.of( diff --git a/config-model/src/test/java/com/yahoo/vespa/model/container/xml/AccessLogTest.java b/config-model/src/test/java/com/yahoo/vespa/model/container/xml/AccessLogTest.java index a4a8eef74dd..d545723241e 100644 --- a/config-model/src/test/java/com/yahoo/vespa/model/container/xml/AccessLogTest.java +++ b/config-model/src/test/java/com/yahoo/vespa/model/container/xml/AccessLogTest.java @@ -39,8 +39,10 @@ public class AccessLogTest extends ContainerModelBuilderTestBase { createModel(root, cluster1Elem, cluster2Elem); - assertNotNull(getVespaAccessLog("cluster1")); - assertNull( getVespaAccessLog("cluster2")); + assertNotNull(getJsonAccessLog("cluster1")); + assertNull( getJsonAccessLog("cluster2")); + assertNull(getVespaAccessLog("cluster1")); + assertNull(getVespaAccessLog("cluster2")); } @Test @@ -55,27 +57,32 @@ public class AccessLogTest extends ContainerModelBuilderTestBase { createModel(root, clusterElem); assertNull(getVespaAccessLog(jdiscClusterId)); + assertNull(getJsonAccessLog(jdiscClusterId)); } private Component<?, ?> getVespaAccessLog(String clusterName) { ContainerCluster cluster = (ContainerCluster) root.getChildren().get(clusterName); return cluster.getComponentsMap().get(ComponentId.fromString((VespaAccessLog.class.getName()))); } + private Component<?, ?> getJsonAccessLog(String clusterName) { + ContainerCluster cluster = (ContainerCluster) root.getChildren().get(clusterName); + return cluster.getComponentsMap().get(ComponentId.fromString((JSONAccessLog.class.getName()))); + } @Test public void access_log_can_be_configured() throws Exception { Element clusterElem = DomBuilderTest.parse( "<jdisc id='default' version='1.0'>", " <accesslog type='yapache' ", - " fileNamePattern='pattern' rotationInterval='interval'", - " rotationScheme='date' />", + " fileNamePattern='pattern' rotationInterval='interval' />", " <accesslog type='json' ", - " fileNamePattern='pattern' rotationInterval='interval'", - " rotationScheme='date' />", + " fileNamePattern='pattern' rotationInterval='interval' />", nodesXml, "</jdisc>" ); createModel(root, clusterElem); + assertNotNull(getJsonAccessLog("default")); + assertNull(getVespaAccessLog("default")); { // yapache Component<?, ?> accessLogComponent = getContainerComponent("default", YApacheAccessLog.class.getName()); @@ -85,7 +92,6 @@ public class AccessLogTest extends ContainerModelBuilderTestBase { AccessLogConfig.FileHandler fileHandlerConfig = config.fileHandler(); assertEquals("pattern", fileHandlerConfig.pattern()); assertEquals("interval", fileHandlerConfig.rotation()); - assertEquals(AccessLogConfig.FileHandler.RotateScheme.DATE, fileHandlerConfig.rotateScheme()); } { // json @@ -96,7 +102,6 @@ public class AccessLogTest extends ContainerModelBuilderTestBase { AccessLogConfig.FileHandler fileHandlerConfig = config.fileHandler(); assertEquals("pattern", fileHandlerConfig.pattern()); assertEquals("interval", fileHandlerConfig.rotation()); - assertEquals(AccessLogConfig.FileHandler.RotateScheme.DATE, fileHandlerConfig.rotateScheme()); } } diff --git a/config-model/src/test/java/com/yahoo/vespa/model/container/xml/ContainerDocumentApiBuilderTest.java b/config-model/src/test/java/com/yahoo/vespa/model/container/xml/ContainerDocumentApiBuilderTest.java index 49a989a9474..428286c4794 100644 --- a/config-model/src/test/java/com/yahoo/vespa/model/container/xml/ContainerDocumentApiBuilderTest.java +++ b/config-model/src/test/java/com/yahoo/vespa/model/container/xml/ContainerDocumentApiBuilderTest.java @@ -21,8 +21,7 @@ import static org.hamcrest.Matchers.hasItem; import static org.junit.Assert.assertThat; /** - * @author <a href="mailto:einarmr@yahoo-inc.com">Einar M R Rosenvinge</a> - * @since 5.1.11 + * @author Einar M R Rosenvinge */ public class ContainerDocumentApiBuilderTest extends ContainerModelBuilderTestBase { @@ -38,7 +37,7 @@ public class ContainerDocumentApiBuilderTest extends ContainerModelBuilderTestBa } @Test - public void document_api_config_is_added_to_container_cluster() throws Exception { + public void document_api_config_is_added_to_container_cluster() { Element elem = DomBuilderTest.parse( "<jdisc id='cluster1' version='1.0'>", " <document-api>", @@ -61,7 +60,7 @@ public class ContainerDocumentApiBuilderTest extends ContainerModelBuilderTestBa } @Test - public void custom_bindings_are_allowed() throws Exception { + public void custom_bindings_are_allowed() { Element elem = DomBuilderTest.parse( "<jdisc id='cluster1' version='1.0'>", " <document-api>", @@ -72,13 +71,6 @@ public class ContainerDocumentApiBuilderTest extends ContainerModelBuilderTestBa "</jdisc>"); createModel(root, elem); - verifyCustomBindings("com.yahoo.feedhandler.VespaFeedHandler", "feed"); - verifyCustomBindings("com.yahoo.feedhandler.VespaFeedHandlerCompatibility", "document"); - verifyCustomBindings("com.yahoo.feedhandler.VespaFeedHandlerGet", "get"); - verifyCustomBindings("com.yahoo.feedhandler.VespaFeedHandlerRemove", "remove"); - verifyCustomBindings("com.yahoo.feedhandler.VespaFeedHandlerRemoveLocation", "removelocation"); - verifyCustomBindings("com.yahoo.feedhandler.VespaFeedHandlerStatus", "feedstatus"); - verifyCustomBindings("com.yahoo.feedhandler.VespaFeedHandlerVisit", "visit"); verifyCustomBindings("com.yahoo.vespa.http.server.FeedHandler", ContainerCluster.RESERVED_URI_PREFIX + "/feedapi"); } @@ -94,7 +86,7 @@ public class ContainerDocumentApiBuilderTest extends ContainerModelBuilderTestBa } @Test - public void requireThatHandlersAreSetup() throws Exception { + public void requireThatHandlersAreSetup() { Element elem = DomBuilderTest.parse( "<jdisc id='cluster1' version='1.0'>", " <document-api />", @@ -108,60 +100,6 @@ public class ContainerDocumentApiBuilderTest extends ContainerModelBuilderTestBa assertThat(handlerMap.get("com.yahoo.container.handler.observability.ApplicationStatusHandler"), not(nullValue())); assertThat(handlerMap.get("com.yahoo.container.jdisc.state.StateHandler"), not(nullValue())); - assertThat(handlerMap.get("com.yahoo.feedhandler.VespaFeedHandler"), not(nullValue())); - assertThat(handlerMap.get("com.yahoo.feedhandler.VespaFeedHandler").getServerBindings().contains("http://*/feed"), is(true)); - assertThat(handlerMap.get("com.yahoo.feedhandler.VespaFeedHandler").getServerBindings().contains("https://*/feed"), is(true)); - assertThat(handlerMap.get("com.yahoo.feedhandler.VespaFeedHandler").getServerBindings().contains("http://*/feed/"), is(true)); - assertThat(handlerMap.get("com.yahoo.feedhandler.VespaFeedHandler").getServerBindings().contains("https://*/feed/"), is(true)); - assertThat(handlerMap.get("com.yahoo.feedhandler.VespaFeedHandler").getServerBindings().size(), equalTo(4)); - - assertThat(handlerMap.get("com.yahoo.feedhandler.VespaFeedHandlerCompatibility").getComponentId().toString(), not(nullValue())); - assertThat(handlerMap.get("com.yahoo.feedhandler.VespaFeedHandlerCompatibility").getServerBindings().contains("http://*/document"), is(true)); - assertThat(handlerMap.get("com.yahoo.feedhandler.VespaFeedHandlerCompatibility").getServerBindings().contains("https://*/document"), is(true)); - assertThat(handlerMap.get("com.yahoo.feedhandler.VespaFeedHandlerCompatibility").getServerBindings().contains("http://*/document/"), is(true)); - assertThat(handlerMap.get("com.yahoo.feedhandler.VespaFeedHandlerCompatibility").getServerBindings().contains("https://*/document/"), is(true)); - assertThat(handlerMap.get("com.yahoo.feedhandler.VespaFeedHandlerCompatibility").getServerBindings().size(), equalTo(4)); - - assertThat(handlerMap.get("com.yahoo.feedhandler.VespaFeedHandlerGet"), not(nullValue())); - assertThat(handlerMap.get("com.yahoo.feedhandler.VespaFeedHandlerGet").getServerBindings().contains("http://*/get"), is(true)); - assertThat(handlerMap.get("com.yahoo.feedhandler.VespaFeedHandlerGet").getServerBindings().contains("https://*/get"), is(true)); - assertThat(handlerMap.get("com.yahoo.feedhandler.VespaFeedHandlerGet").getServerBindings().contains("http://*/get/"), is(true)); - assertThat(handlerMap.get("com.yahoo.feedhandler.VespaFeedHandlerGet").getServerBindings().contains("https://*/get/"), is(true)); - assertThat(handlerMap.get("com.yahoo.feedhandler.VespaFeedHandlerGet").getServerBindings().size(), equalTo(4)); - - assertThat(handlerMap.get("com.yahoo.feedhandler.VespaFeedHandlerRemove"), not(nullValue())); - assertThat(handlerMap.get("com.yahoo.feedhandler.VespaFeedHandlerRemove").getServerBindings().contains("http://*/remove"), is(true)); - assertThat(handlerMap.get("com.yahoo.feedhandler.VespaFeedHandlerRemove").getServerBindings().contains("https://*/remove"), is(true)); - assertThat(handlerMap.get("com.yahoo.feedhandler.VespaFeedHandlerRemove").getServerBindings().contains("http://*/remove/"), is(true)); - assertThat(handlerMap.get("com.yahoo.feedhandler.VespaFeedHandlerRemove").getServerBindings().contains("https://*/remove/"), is(true)); - assertThat(handlerMap.get("com.yahoo.feedhandler.VespaFeedHandlerRemove").getServerBindings().size(), equalTo(4)); - - assertThat(handlerMap.get("com.yahoo.feedhandler.VespaFeedHandlerRemoveLocation"), not(nullValue())); - assertThat(handlerMap.get("com.yahoo.feedhandler.VespaFeedHandlerRemoveLocation").getServerBindings().contains("http://*/removelocation"), is(true)); - assertThat(handlerMap.get("com.yahoo.feedhandler.VespaFeedHandlerRemoveLocation").getServerBindings().contains("https://*/removelocation"), is(true)); - assertThat(handlerMap.get("com.yahoo.feedhandler.VespaFeedHandlerRemoveLocation").getServerBindings().contains("http://*/removelocation/"), is(true)); - assertThat(handlerMap.get("com.yahoo.feedhandler.VespaFeedHandlerRemoveLocation").getServerBindings().contains("https://*/removelocation/"), is(true)); - assertThat(handlerMap.get("com.yahoo.feedhandler.VespaFeedHandlerRemoveLocation").getServerBindings().size(), equalTo(4)); - - assertThat(handlerMap.get("com.yahoo.feedhandler.VespaFeedHandlerStatus"), not(nullValue())); - assertThat(handlerMap.get("com.yahoo.feedhandler.VespaFeedHandlerStatus").getServerBindings().contains("http://*/feedstatus"), is(true)); - assertThat(handlerMap.get("com.yahoo.feedhandler.VespaFeedHandlerStatus").getServerBindings().contains("https://*/feedstatus"), is(true)); - assertThat(handlerMap.get("com.yahoo.feedhandler.VespaFeedHandlerStatus").getServerBindings().contains("http://*/feedstatus/"), is(true)); - assertThat(handlerMap.get("com.yahoo.feedhandler.VespaFeedHandlerStatus").getServerBindings().contains("https://*/feedstatus/"), is(true)); - assertThat(handlerMap.get("com.yahoo.feedhandler.VespaFeedHandlerStatus").getServerBindings().size(), equalTo(4)); - - assertThat(handlerMap.get("com.yahoo.feedhandler.VespaFeedHandlerVisit"), not(nullValue())); - assertThat(handlerMap.get("com.yahoo.feedhandler.VespaFeedHandlerVisit").getServerBindings().contains("http://*/visit"), is(true)); - assertThat(handlerMap.get("com.yahoo.feedhandler.VespaFeedHandlerVisit").getServerBindings().contains("https://*/visit"), is(true)); - assertThat(handlerMap.get("com.yahoo.feedhandler.VespaFeedHandlerVisit").getServerBindings().contains("http://*/visit/"), is(true)); - assertThat(handlerMap.get("com.yahoo.feedhandler.VespaFeedHandlerVisit").getServerBindings().contains("https://*/visit/"), is(true)); - assertThat(handlerMap.get("com.yahoo.feedhandler.VespaFeedHandlerVisit").getServerBindings().size(), equalTo(4)); - - assertThat(handlerMap.get("com.yahoo.search.handler.SearchHandler"), not(nullValue())); - assertThat(handlerMap.get("com.yahoo.search.handler.SearchHandler").getServerBindings().contains("http://*/search/*"), is(true)); - assertThat(handlerMap.get("com.yahoo.search.handler.SearchHandler").getServerBindings().contains("https://*/search/*"), is(true)); - assertThat(handlerMap.get("com.yahoo.search.handler.SearchHandler").getServerBindings().size(), equalTo(2)); - assertThat(handlerMap.get("com.yahoo.vespa.http.server.FeedHandler"), not(nullValue())); assertThat(handlerMap.get("com.yahoo.vespa.http.server.FeedHandler").getServerBindings().contains("http://*/" + ContainerCluster.RESERVED_URI_PREFIX + "/feedapi"), is(true)); assertThat(handlerMap.get("com.yahoo.vespa.http.server.FeedHandler").getServerBindings().contains("https://*/" + ContainerCluster.RESERVED_URI_PREFIX + "/feedapi"), is(true)); diff --git a/config-model/src/test/java/com/yahoo/vespa/model/container/xml/ContainerModelBuilderTest.java b/config-model/src/test/java/com/yahoo/vespa/model/container/xml/ContainerModelBuilderTest.java index 0030392f318..ee829607da1 100644 --- a/config-model/src/test/java/com/yahoo/vespa/model/container/xml/ContainerModelBuilderTest.java +++ b/config-model/src/test/java/com/yahoo/vespa/model/container/xml/ContainerModelBuilderTest.java @@ -94,7 +94,7 @@ public class ContainerModelBuilderTest extends ContainerModelBuilderTestBase { } private static void verifyIgnoreJvmGCOptions(boolean isHosted) throws IOException, SAXException { - verifyIgnoreJvmGCOptionsIfJvmArgs(isHosted, "jvmargs", ContainerCluster.CMS); + verifyIgnoreJvmGCOptionsIfJvmArgs(isHosted, "jvmargs", ContainerCluster.G1GC); verifyIgnoreJvmGCOptionsIfJvmArgs(isHosted, "jvm-options", "-XX:+UseG1GC"); } @@ -162,7 +162,7 @@ public class ContainerModelBuilderTest extends ContainerModelBuilderTestBase { @Test public void requireThatJvmGCOptionsIsHonoured() throws IOException, SAXException { - verifyJvmGCOptions(false, Zone.defaultZone(),ContainerCluster.CMS); + verifyJvmGCOptions(false, Zone.defaultZone(),ContainerCluster.G1GC); verifyJvmGCOptions(true, Zone.defaultZone(), ContainerCluster.G1GC); } @@ -483,21 +483,7 @@ public class ContainerModelBuilderTest extends ContainerModelBuilderTestBase { } @Test - public void legacy_yca_filter_and_its_config_provider_are_included_in_components_config() { - Element clusterElem = DomBuilderTest.parse( - "<jdisc id='default' version='1.0'>", - " <filter id='YcaFilter' /> ", - "</jdisc>"); - - createModel(root, clusterElem); - assertThat(componentsConfig().toString(), containsString(".id \"YcaFilter\"")); - - String providerId = HttpFilter.configProviderId(ComponentId.fromString("YcaFilter")).stringValue(); - assertThat(componentsConfig().toString(), containsString(".id \"" + providerId + "\"")); - } - - @Test - public void nested_components_are_injected_to_handlers() { + public void nested_components_are_injected_to_handlers() throws Exception { Element clusterElem = DomBuilderTest.parse( "<jdisc id='default' version='1.0'>", " <handler id='myHandler'>", @@ -638,7 +624,7 @@ public class ContainerModelBuilderTest extends ContainerModelBuilderTestBase { @Test(expected = IllegalArgumentException.class) public void renderers_named_DefaultRenderer_are_not_allowed() { - createModel(root, generateContainerElementWithRenderer("DefaultRenderer")); + createModel(root, generateContainerElementWithRenderer("XmlRenderer")); } @Test @@ -699,7 +685,6 @@ public class ContainerModelBuilderTest extends ContainerModelBuilderTestBase { assertTrue(config.rpc().enabled()); assertEquals("", config.rpc().host()); assertFalse(config.restartOnDeploy()); - assertFalse(config.coveragereports()); assertEquals("filedistribution/" + hostname, config.filedistributor().configid()); } diff --git a/config-model/src/test/java/com/yahoo/vespa/model/container/xml/DocprocBuilderTest.java b/config-model/src/test/java/com/yahoo/vespa/model/container/xml/DocprocBuilderTest.java index 5acfe9312f6..e0dcd3fcc47 100644 --- a/config-model/src/test/java/com/yahoo/vespa/model/container/xml/DocprocBuilderTest.java +++ b/config-model/src/test/java/com/yahoo/vespa/model/container/xml/DocprocBuilderTest.java @@ -217,7 +217,7 @@ public class DocprocBuilderTest extends DomBuilderTest { QrStartConfig.Jvm jvm = qrStartConfig.jvm(); assertThat(jvm.server(), is(true)); assertThat(jvm.verbosegc(), is(true)); - assertThat(jvm.gcopts(), is("-XX:+UseConcMarkSweepGC -XX:MaxTenuringThreshold=15 -XX:NewRatio=1")); + assertThat(jvm.gcopts(), is("-XX:+UseG1GC -XX:MaxTenuringThreshold=15")); assertThat(jvm.heapsize(), is(1536)); assertThat(jvm.stacksize(), is(512)); assertThat(qrStartConfig.ulimitv(), is("")); diff --git a/config-model/src/test/java/com/yahoo/vespa/model/container/xml/JettyContainerModelBuilderTest.java b/config-model/src/test/java/com/yahoo/vespa/model/container/xml/JettyContainerModelBuilderTest.java index ceff9f3d4bb..5525b75373d 100644 --- a/config-model/src/test/java/com/yahoo/vespa/model/container/xml/JettyContainerModelBuilderTest.java +++ b/config-model/src/test/java/com/yahoo/vespa/model/container/xml/JettyContainerModelBuilderTest.java @@ -16,7 +16,6 @@ import org.w3c.dom.Element; import java.util.List; import java.util.Optional; -import static com.yahoo.jdisc.http.ConnectorConfig.Ssl.KeyStoreType; import static org.hamcrest.CoreMatchers.equalTo; import static org.hamcrest.CoreMatchers.is; import static org.hamcrest.CoreMatchers.not; @@ -33,7 +32,7 @@ public class JettyContainerModelBuilderTest extends ContainerModelBuilderTestBas @Test public void verify_that_overriding_connector_options_works() throws Exception { Element clusterElem = DomBuilderTest.parse( - "<jdisc id='default' version='1.0' jetty='true'>\n" + + "<jdisc id='default' version='1.0'>\n" + " <http>\n" + " <server id='bananarama' port='4321'>\n" + " <config name='jdisc.http.connector'>\n" + @@ -46,7 +45,6 @@ public class JettyContainerModelBuilderTest extends ContainerModelBuilderTestBas "</jdisc>\n" ); createModel(root, clusterElem); - ConnectorConfig.Builder connectorConfigBuilder = new ConnectorConfig.Builder(); ConnectorConfig cfg = root.getConfig(ConnectorConfig.class, "default/http/jdisc-jetty/bananarama"); assertThat(cfg.requestHeaderSize(), is(300000)); assertThat(cfg.headerCacheSize(), is(300000)); @@ -55,7 +53,7 @@ public class JettyContainerModelBuilderTest extends ContainerModelBuilderTestBas @Test public void verify_that_enabling_jetty_works() throws Exception { Element clusterElem = DomBuilderTest.parse( - "<jdisc id='default' version='1.0' jetty='true'>" + + "<jdisc id='default' version='1.0'>" + nodesXml + "</jdisc>" ); @@ -66,7 +64,7 @@ public class JettyContainerModelBuilderTest extends ContainerModelBuilderTestBas @Test public void verify_that_enabling_jetty_works_for_custom_http_servers() throws Exception { Element clusterElem = DomBuilderTest.parse( - "<jdisc id='default' version='1.0' jetty='true'>", + "<jdisc id='default' version='1.0'>", " <http>", " <server port='9000' id='foo' />", " </http>", @@ -79,7 +77,7 @@ public class JettyContainerModelBuilderTest extends ContainerModelBuilderTestBas @Test public void verifyThatJettyHttpServerHasFilterBindingsProvider() throws Exception { final Element clusterElem = DomBuilderTest.parse( - "<jdisc id='default' version='1.0' jetty='true'>", + "<jdisc id='default' version='1.0'>", nodesXml, "</jdisc>" ); createModel(root, clusterElem); @@ -100,7 +98,7 @@ public class JettyContainerModelBuilderTest extends ContainerModelBuilderTestBas @Test public void verifyThatJettyHttpServerHasFilterBindingsProviderForCustomHttpServers() throws Exception { final Element clusterElem = DomBuilderTest.parse( - "<jdisc id='default' version='1.0' jetty='true'>", + "<jdisc id='default' version='1.0'>", " <http>", " <server port='9000' id='foo' />", " </http>", @@ -122,73 +120,7 @@ public class JettyContainerModelBuilderTest extends ContainerModelBuilderTestBas } @Test - public void verify_that_old_http_config_override_inside_server_tag_works() throws Exception { - Element clusterElem = DomBuilderTest.parse( - "<jdisc id='default' version='1.0' jetty='true'>", - " <http>", - " <server port='9000' id='foo'>", - " <config name=\"container.jdisc.config.http-server\">", - " <tcpKeepAliveEnabled>true</tcpKeepAliveEnabled>", - " <tcpNoDelayEnabled>false</tcpNoDelayEnabled>", - " <tcpListenBacklogLength>2</tcpListenBacklogLength>", - " <idleConnectionTimeout>34.1</idleConnectionTimeout>", - " <soLinger>42.2</soLinger>", - " <sendBufferSize>1234</sendBufferSize>", - " <maxHeaderSize>4321</maxHeaderSize>", - " <ssl>", - " <enabled>true</enabled>", - " <keyStoreType>JKS</keyStoreType>", - " <keyStorePath>apple</keyStorePath>", - " <trustStorePath>grape</trustStorePath>", - " <keyDBKey>tomato</keyDBKey>", - " <algorithm>onion</algorithm>", - " <protocol>carrot</protocol>", - " </ssl>", - " </config>", - " </server>", - " </http>", - nodesXml, - "</jdisc>" ); - createModel(root, clusterElem); - ContainerCluster cluster = (ContainerCluster) root.getChildren().get("default"); - List<JettyHttpServer> jettyServers = cluster.getChildrenByTypeRecursive(JettyHttpServer.class); - - assertThat(jettyServers.size(), is(1)); - - JettyHttpServer server = jettyServers.get(0); - assertThat(server.model.bundleInstantiationSpec.classId.toString(), - is(com.yahoo.jdisc.http.server.jetty.JettyHttpServer.class.getName())); - assertThat(server.model.bundleInstantiationSpec.bundle.toString(), is("jdisc_http_service")); - assertThat(server.getConnectorFactories().size(), is(1)); - - ConnectorConfig.Builder connectorConfigBuilder = new ConnectorConfig.Builder(); - server.getConnectorFactories().get(0).getConfig(connectorConfigBuilder); - ConnectorConfig connector = new ConnectorConfig(connectorConfigBuilder); - assertThat(connector.name(), equalTo("foo")); - assertThat(connector.tcpKeepAliveEnabled(), equalTo(true)); - assertThat(connector.tcpNoDelay(), equalTo(false)); - assertThat(connector.acceptQueueSize(), equalTo(2)); - assertThat(connector.idleTimeout(), equalTo(34.1)); - assertThat(connector.soLingerTime(), equalTo(42.2)); - assertThat(connector.outputBufferSize(), equalTo(1234)); - assertThat(connector.headerCacheSize(), equalTo(4321)); - assertThat(connector.ssl().enabled(), equalTo(true)); - assertThat(connector.ssl().keyStoreType(), equalTo(KeyStoreType.Enum.JKS)); - assertThat(connector.ssl().keyStorePath(), equalTo("apple")); - assertThat(connector.ssl().trustStorePath(), equalTo("grape")); - assertThat(connector.ssl().keyDbKey(), equalTo("tomato")); - assertThat(connector.ssl().sslKeyManagerFactoryAlgorithm(), equalTo("onion")); - assertThat(connector.ssl().protocol(), equalTo("carrot")); - - assertThat( - extractComponentByClassName( - clusterComponentsConfig(), - com.yahoo.jdisc.http.server.jetty.JettyHttpServer.class.getName()), - is(not(nullValue()))); - } - - @Test - public void verify_that_ssl_element_generates_connector_config_and_inject_provider_component() { + public void ssl_element_generates_connector_config_and_injects_provider_component() { Element clusterElem = DomBuilderTest.parse( "<jdisc id='default' version='1.0' jetty='true'>", " <http>", diff --git a/config-model/src/test/java/com/yahoo/vespa/model/content/ContentClusterTest.java b/config-model/src/test/java/com/yahoo/vespa/model/content/ContentClusterTest.java index a003e0122a5..057ef0efbd6 100644 --- a/config-model/src/test/java/com/yahoo/vespa/model/content/ContentClusterTest.java +++ b/config-model/src/test/java/com/yahoo/vespa/model/content/ContentClusterTest.java @@ -676,18 +676,6 @@ public class ContentClusterTest extends ContentBaseTest { "<admin version=\"2.0\">" + " <logserver hostalias=\"node0\"/>" + " <adminserver hostalias=\"node0\"/>" + - " <metric-consumers>" + - " <consumer name=\"foobar\">" + - " <metric name=\"storage.foo.bar\"/>" + - " </consumer>" + - " <consumer name=\"log\">" + - " <metric name=\"extralogmetric\"/>" + - " <metric name=\"extralogmetric3\"/>" + - " </consumer>" + - " <consumer name=\"fleetcontroller\">" + - " <metric name=\"extraextra\"/>" + - " </consumer>" + - " </metric-consumers>" + "</admin>" + "</services>"; @@ -700,11 +688,8 @@ public class ContentClusterTest extends ContentBaseTest { model.getConfig(builder, "storage/storage/0"); MetricsmanagerConfig config = new MetricsmanagerConfig(builder); - assertEquals("[storage.foo.bar]", getConsumer("foobar", config).addedmetrics().toString()); String expected = - "[extralogmetric\n" + - "extralogmetric3\n" + - "vds.filestor.alldisks.allthreads.put.sum\n" + + "[vds.filestor.alldisks.allthreads.put.sum\n" + "vds.filestor.alldisks.allthreads.get.sum\n" + "vds.filestor.alldisks.allthreads.remove.sum\n" + "vds.filestor.alldisks.allthreads.update.sum\n" + @@ -720,8 +705,7 @@ public class ContentClusterTest extends ContentBaseTest { assertEquals(expected, actual); assertEquals("[logdefault]", getConsumer("log", config).tags().toString()); expected = - "[extraextra\n" + - "vds.datastored.alldisks.docs\n" + + "[vds.datastored.alldisks.docs\n" + "vds.datastored.alldisks.bytes\n" + "vds.datastored.alldisks.buckets]"; actual = getConsumer("fleetcontroller", config).addedmetrics().toString().replaceAll(", ", "\n"); @@ -733,10 +717,7 @@ public class ContentClusterTest extends ContentBaseTest { model.getConfig(builder, "storage/distributor/0"); MetricsmanagerConfig config = new MetricsmanagerConfig(builder); - assertEquals("[storage.foo.bar]", getConsumer("foobar", config).addedmetrics().toString()); - assertEquals("[extralogmetric, extralogmetric3, vds.distributor.docsstored, vds.distributor.bytesstored, vds.idealstate.delete_bucket.done_ok, vds.idealstate.merge_bucket.done_ok, vds.idealstate.split_bucket.done_ok, vds.idealstate.join_bucket.done_ok, vds.idealstate.buckets_rechecking]", getConsumer("log", config).addedmetrics().toString()); assertEquals("[logdefault]", getConsumer("log", config).tags().toString()); - assertEquals("[extraextra]", getConsumer("fleetcontroller", config).addedmetrics().toString()); } } diff --git a/config-model/src/test/java/com/yahoo/vespa/model/content/IndexedTest.java b/config-model/src/test/java/com/yahoo/vespa/model/content/IndexedTest.java index 731544bb30e..11abe13712a 100644 --- a/config-model/src/test/java/com/yahoo/vespa/model/content/IndexedTest.java +++ b/config-model/src/test/java/com/yahoo/vespa/model/content/IndexedTest.java @@ -151,8 +151,8 @@ public class IndexedTest extends ContentBaseTest { DocumentProtocol protocol = (DocumentProtocol) routing.getProtocols().get(0); RoutingTableSpec spec = protocol.getRoutingTableSpec(); assertEquals(2, spec.getNumHops()); - assertEquals("docproc/cluster.test.indexing/chain.indexing", spec.getHop(0).getName()); - assertEquals("indexing", spec.getHop(1).getName()); + assertEquals("indexing", spec.getHop(0).getName()); + assertEquals("jdisc/chain.indexing", spec.getHop(1).getName()); RouteSpec r; r = spec.getRoute(0); @@ -174,7 +174,7 @@ public class IndexedTest extends ContentBaseTest { r = spec.getRoute(4); assertEquals("test-index", r.getName()); assertEquals(2, r.getNumHops()); - assertEquals("docproc/cluster.test.indexing/chain.indexing", r.getHop(0)); + assertEquals("jdisc/chain.indexing", r.getHop(0)); assertEquals("[Content:cluster=test]", r.getHop(1)); } @Test @@ -281,7 +281,7 @@ public class IndexedTest extends ContentBaseTest { @Test public void requireThatIndexingDocprocGetsConfigIdBasedOnDistributionKey() { VespaModel model = getIndexedVespaModel(); - ContainerCluster cluster = model.getContainerClusters().get("cluster.test.indexing"); - assertEquals("docproc/cluster.test.indexing/3", cluster.getContainers().get(0).getConfigId()); + ContainerCluster cluster = model.getContainerClusters().get("jdisc"); + assertEquals("jdisc/container.0", cluster.getContainers().get(0).getConfigId()); } } diff --git a/config-model/src/test/java/com/yahoo/vespa/model/content/IndexingAndDocprocRoutingTest.java b/config-model/src/test/java/com/yahoo/vespa/model/content/IndexingAndDocprocRoutingTest.java index 9cdb2606241..76a4a83c4fc 100644 --- a/config-model/src/test/java/com/yahoo/vespa/model/content/IndexingAndDocprocRoutingTest.java +++ b/config-model/src/test/java/com/yahoo/vespa/model/content/IndexingAndDocprocRoutingTest.java @@ -42,8 +42,8 @@ public class IndexingAndDocprocRoutingTest extends ContentBaseTest { SearchClusterSpec searchCluster = new SearchClusterSpec(CLUSTERNAME, null, null); searchCluster.searchDefs.add(new SearchDefSpec("music", "artist", "album")); VespaModel model = getIndexedContentVespaModel(Collections.<DocprocClusterSpec>emptyList(), Arrays.asList(searchCluster)); - assertIndexing(model, new DocprocClusterSpec(CLUSTERNAME + ".indexing", new DocprocChainSpec("docproc/cluster." + CLUSTERNAME + ".indexing/chain.indexing"))); - assertFeedingRoute(model, CLUSTERNAME, "docproc/cluster." + CLUSTERNAME + ".indexing/chain.indexing"); + assertIndexing(model, new DocprocClusterSpec("jdisc", new DocprocChainSpec("jdisc/chain.indexing"))); + assertFeedingRoute(model, CLUSTERNAME, "jdisc/chain.indexing"); } @Test @@ -54,8 +54,8 @@ public class IndexingAndDocprocRoutingTest extends ContentBaseTest { searchCluster.searchDefs.add(new SearchDefSpec("music", "artist", "album")); searchCluster.searchDefs.add(new SearchDefSpec("book", "author", "title")); VespaModel model = getIndexedContentVespaModel(Collections.<DocprocClusterSpec>emptyList(), Arrays.asList(searchCluster)); - assertIndexing(model, new DocprocClusterSpec(CLUSTERNAME + ".indexing", new DocprocChainSpec("docproc/cluster." + CLUSTERNAME + ".indexing/chain.indexing"))); - assertFeedingRoute(model, CLUSTERNAME, "docproc/cluster." + CLUSTERNAME + ".indexing/chain.indexing"); + assertIndexing(model, new DocprocClusterSpec("jdisc", new DocprocChainSpec("jdisc/chain.indexing"))); + assertFeedingRoute(model, CLUSTERNAME, "jdisc/chain.indexing"); } @Test @@ -72,11 +72,10 @@ public class IndexingAndDocprocRoutingTest extends ContentBaseTest { VespaModel model = getIndexedContentVespaModel(Collections.<DocprocClusterSpec>emptyList(), Arrays.asList(musicCluster, booksCluster)); assertIndexing(model, - new DocprocClusterSpec(MUSIC + ".indexing", new DocprocChainSpec("docproc/cluster." + MUSIC + ".indexing/chain.indexing")), - new DocprocClusterSpec(BOOKS + ".indexing", new DocprocChainSpec("docproc/cluster." + BOOKS + ".indexing/chain.indexing"))); + new DocprocClusterSpec("jdisc", new DocprocChainSpec("jdisc/chain.indexing"))); - assertFeedingRoute(model, MUSIC, "docproc/cluster." + MUSIC + ".indexing/chain.indexing"); - assertFeedingRoute(model, BOOKS, "docproc/cluster." + BOOKS + ".indexing/chain.indexing"); + assertFeedingRoute(model, MUSIC, "jdisc/chain.indexing"); + assertFeedingRoute(model, BOOKS, "jdisc/chain.indexing"); } diff --git a/config-model/src/test/java/com/yahoo/vespa/model/content/MonitoringConfigSnoopTest.java b/config-model/src/test/java/com/yahoo/vespa/model/content/MonitoringConfigSnoopTest.java index 6e0ab655128..dea86616f06 100644 --- a/config-model/src/test/java/com/yahoo/vespa/model/content/MonitoringConfigSnoopTest.java +++ b/config-model/src/test/java/com/yahoo/vespa/model/content/MonitoringConfigSnoopTest.java @@ -26,7 +26,7 @@ public class MonitoringConfigSnoopTest { return "" + "<admin version='2.0'>" + " <adminserver hostalias='mockhost' />" - + " <yamas interval='" + interval + "' systemname='test' />" + + " <monitoring interval='" + interval + "' systemname='test' />" + "</admin>"; } diff --git a/config-model/src/test/java/com/yahoo/vespa/model/content/utils/ContentClusterUtils.java b/config-model/src/test/java/com/yahoo/vespa/model/content/utils/ContentClusterUtils.java index fd97bf1f7b2..62d2bc51830 100644 --- a/config-model/src/test/java/com/yahoo/vespa/model/content/utils/ContentClusterUtils.java +++ b/config-model/src/test/java/com/yahoo/vespa/model/content/utils/ContentClusterUtils.java @@ -59,8 +59,7 @@ public class ContentClusterUtils { public static ContentCluster createCluster(String clusterXml, MockRoot root) { Document doc = XML.getDocument(clusterXml); - Admin admin = new Admin(root, new DefaultMonitoring("vespa", 60), new Metrics(), - Collections.emptyMap(), false, + Admin admin = new Admin(root, new DefaultMonitoring("vespa", 60), new Metrics(), false, new FileDistributionConfigProducer(root, new MockFileRegistry(), null), root.getDeployState().isHosted()); ConfigModelContext context = ConfigModelContext.create(null, root.getDeployState(), diff --git a/config-model/src/test/java/com/yahoo/vespa/model/search/TldTest.java b/config-model/src/test/java/com/yahoo/vespa/model/search/TldTest.java index c3cbc58860b..4d766b776b3 100644 --- a/config-model/src/test/java/com/yahoo/vespa/model/search/TldTest.java +++ b/config-model/src/test/java/com/yahoo/vespa/model/search/TldTest.java @@ -59,17 +59,17 @@ public class TldTest { assertEquals(1, config.dataset(0).engine().size()); } - @Test - public void requireThatUseLocalPolicyIsOk() { - ApplicationPackage app = new MockApplicationPackage.Builder() + @Test + public void requireThatUseLocalPolicyIsOk() { + ApplicationPackage app = new MockApplicationPackage.Builder() .withHosts( - "<hosts>" + - "<host name='search.node1'><alias>search1</alias></host>" + - "<host name='search.node2'><alias>search2</alias></host>" + - "<host name='jdisc.host.other'><alias>gateway</alias></host>" + - "</hosts>") + "<hosts>" + + " <host name='search.node1'><alias>search1</alias></host>" + + " <host name='search.node2'><alias>search2</alias></host>" + + " <host name='jdisc.host.other'><alias>gateway</alias></host>" + + "</hosts>") .withServices( - "<services>" + + "<services>" + " <admin version='2.0'>" + " <adminserver hostalias='gateway' />" + " </admin>" + @@ -110,43 +110,37 @@ public class TldTest { .withSearchDefinition(MockApplicationPackage.MUSIC_SEARCHDEFINITION) .build(); - PartitionsConfig.Builder builder = new PartitionsConfig.Builder(); - new TestDriver(true).buildModel(app).getConfig(builder, "foo/search/cluster.foo/tlds/gw.0.tld.0"); - PartitionsConfig config = new PartitionsConfig(builder); - - assertEquals(1, config.dataset().size()); - //gateway TLD with no local search node gets all search nodes - assertEquals(2, config.dataset(0).engine().size()); + PartitionsConfig.Builder builder = new PartitionsConfig.Builder(); + new TestDriver(true).buildModel(app).getConfig(builder, "foo/search/cluster.foo/tlds/gw.0.tld.0"); + PartitionsConfig config = new PartitionsConfig(builder); - assertEquals("rowid not equal 0",0,config.dataset(0).engine(0).rowid()); //Load Balance row 0 - assertEquals("partid not equal 0",0,config.dataset(0).engine(0).partid()); - assertTrue("Not configured with correct search node",config.dataset(0).engine(0).name_and_port().contains("search.node1")); + // No tld if no search + assertEquals(0, config.dataset().size()); - assertEquals("rowid not equal to 1",1,config.dataset(0).engine(1).rowid()); //Load Balance row 1 - assertEquals("partid no equal to 0",0,config.dataset(0).engine(1).partid()); - assertTrue("Not configured with correct search node",config.dataset(0).engine(1).name_and_port().contains("search.node2")); + // First container with a local search node + builder = new PartitionsConfig.Builder(); + new TestDriver(true).buildModel(app).getConfig(builder, "foo/search/cluster.foo/tlds/default.0.tld.0"); + config = new PartitionsConfig(builder); - //First container with a local search node - builder = new PartitionsConfig.Builder(); - new TestDriver(true).buildModel(app).getConfig(builder, "foo/search/cluster.foo/tlds/default.0.tld.0"); - config = new PartitionsConfig(builder); + assertEquals(1, config.dataset().size()); + assertEquals(1, config.dataset(0).engine().size()); + assertEquals(0,config.dataset(0).engine(0).rowid()); + assertEquals(0,config.dataset(0).engine(0).partid()); + assertTrue("Configured with local search node as engine", + config.dataset(0).engine(0).name_and_port().contains("search.node1")); - assertEquals(1, config.dataset().size()); - assertEquals(1, config.dataset(0).engine().size()); - assertEquals(0,config.dataset(0).engine(0).rowid()); - assertEquals(0,config.dataset(0).engine(0).partid()); - assertTrue("Not configured with local search node as engine",config.dataset(0).engine(0).name_and_port().contains("search.node1")); + // Second container with a local search node + builder = new PartitionsConfig.Builder(); + new TestDriver(true).buildModel(app).getConfig(builder, "foo/search/cluster.foo/tlds/default.1.tld.1"); + config = new PartitionsConfig(builder); - //Second container with a local search node - builder = new PartitionsConfig.Builder(); - new TestDriver(true).buildModel(app).getConfig(builder, "foo/search/cluster.foo/tlds/default.1.tld.1"); - config = new PartitionsConfig(builder); + assertEquals(1, config.dataset().size()); + assertEquals(1, config.dataset(0).engine().size()); - assertEquals(1, config.dataset().size()); - assertEquals(1, config.dataset(0).engine().size()); - assertEquals(0,config.dataset(0).engine(0).rowid()); - assertEquals(0,config.dataset(0).engine(0).partid()); - assertTrue("Not configured with local search node as engine",config.dataset(0).engine(0).name_and_port().contains("search.node2")); + assertEquals("rowid equals 0",0, config.dataset(0).engine(0).rowid()); // Load Balance row 0 + assertEquals("partid equals 0",0, config.dataset(0).engine(0).partid()); + assertTrue("Configured with correct search node", + config.dataset(0).engine(0).name_and_port().contains("search.node2")); + } - } } diff --git a/config-model/src/test/schema-test-files/deployment.xml b/config-model/src/test/schema-test-files/deployment.xml index 15f8c969f04..ea65dbec661 100644 --- a/config-model/src/test/schema-test-files/deployment.xml +++ b/config-model/src/test/schema-test-files/deployment.xml @@ -5,7 +5,6 @@ <staging/> <block-change revision='true' version='false' days="mon,tue" hours="14,15"/> <block-change days="mon,tue" hours="14,15" time-zone="CET"/> - <block-upgrade days="wed" hours="16" time-zone="CET"/><!-- Tests legacy name. Remove in Vespa 7 --> <prod global-service-id='qrs' athenz-service='other-service'> <region active='true'>us-west-1</region> <delay hours='3'/> diff --git a/config-model/src/test/schema-test-files/services-hosted-infrastructure.xml b/config-model/src/test/schema-test-files/services-hosted-infrastructure.xml index 3ff6758880b..7a77a10a381 100644 --- a/config-model/src/test/schema-test-files/services-hosted-infrastructure.xml +++ b/config-model/src/test/schema-test-files/services-hosted-infrastructure.xml @@ -6,16 +6,16 @@ <slobroks><nodes count="3" flavor="small"/></slobroks> <logservers><nodes count="1" dedicated="true"/></logservers> <monitoring systemname="vespa.routing" interval="60" /> - <metric-consumers> - <consumer name="yamas"> - <metric name="upstreams_generated" /> - <metric name="upstreams_nginx_reloads" /> - <metric name="upstreams_nginx_reloads_succeeded" /> - <metric name="upstreams_configuration_age.last" /> - <metric name="nginx.upstreams.up.last" output-name="nginx.upstreams.up"/> - <metric name="nginx.upstreams.down.last" output-name="nginx.upstreams.down"/> + <metrics> + <consumer id="yamas"> + <metric id="upstreams_generated" /> + <metric id="upstreams_nginx_reloads" /> + <metric id="upstreams_nginx_reloads_succeeded" /> + <metric id="upstreams_configuration_age.last" /> + <metric id="nginx.upstreams.up.last" display-name="nginx.upstreams.up"/> + <metric id="nginx.upstreams.down.last" display-name="nginx.upstreams.down"/> </consumer> - </metric-consumers> + </metrics> </admin> <jdisc id="container" version="1.0"> diff --git a/config-model/src/test/schema-test-files/services.xml b/config-model/src/test/schema-test-files/services.xml index 43a8d31e2ee..880d49fa460 100644 --- a/config-model/src/test/schema-test-files/services.xml +++ b/config-model/src/test/schema-test-files/services.xml @@ -113,11 +113,7 @@ </filtering> <server port="4080" id="myServer"/> - <server port="4081" id="anotherServer"> - <config name="container.jdisc.config.http-server"> - <maxChunkSize>9999</maxChunkSize> - </config> - </server> + <server port="4081" id="anotherServer"/> <server port="4082" id="defaultSsl"> <ssl> <private-key-file>/foo/key</private-key-file> diff --git a/config-model/src/test/sh/test-schema.sh b/config-model/src/test/sh/test-schema.sh index 18d35f2fbf6..e037cdf3c28 100755 --- a/config-model/src/test/sh/test-schema.sh +++ b/config-model/src/test/sh/test-schema.sh @@ -2,32 +2,29 @@ # Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. set -e -pushd src/main && make clean && make all -popd - jar="target/jing.jar" mainclass="com/thaiopensource/relaxng/util/Driver" -cmd="java -jar $jar src/main/resources/schema/services.rng src/test/schema-test-files/services.xml" +cmd="java -jar $jar target/generated-sources/trang/resources/schema/services.rng src/test/schema-test-files/services.xml" echo $cmd $cmd -cmd="java -jar $jar src/main/resources/schema/services.rng src/test/schema-test-files/standalone-container.xml" +cmd="java -jar $jar target/generated-sources/trang/resources/schema/services.rng src/test/schema-test-files/standalone-container.xml" echo $cmd $cmd -cmd="java -jar $jar src/main/resources/schema/services.rng src/test/schema-test-files/services-hosted.xml" +cmd="java -jar $jar target/generated-sources/trang/resources/schema/services.rng src/test/schema-test-files/services-hosted.xml" echo $cmd $cmd -cmd="java -jar $jar src/main/resources/schema/services.rng src/test/schema-test-files/services-hosted-infrastructure.xml" +cmd="java -jar $jar target/generated-sources/trang/resources/schema/services.rng src/test/schema-test-files/services-hosted-infrastructure.xml" echo $cmd $cmd -cmd="java -jar $jar src/main/resources/schema/deployment.rng src/test/schema-test-files/deployment.xml" +cmd="java -jar $jar target/generated-sources/trang/resources/schema/deployment.rng src/test/schema-test-files/deployment.xml" echo $cmd $cmd -cmd="java -jar $jar src/main/resources/schema/validation-overrides.rng src/test/schema-test-files/validation-overrides.xml" +cmd="java -jar $jar target/generated-sources/trang/resources/schema/validation-overrides.rng src/test/schema-test-files/validation-overrides.xml" echo $cmd $cmd |