diff options
author | Arne Juul <arnej@yahoo-inc.com> | 2018-10-22 14:05:50 +0000 |
---|---|---|
committer | gjoranv <gv@oath.com> | 2019-01-21 15:09:24 +0100 |
commit | 3707829cd71cc6b7c28d5bf2e63cf71c3fd5bec8 (patch) | |
tree | 7a3593252555e31a93bdfba2e851aace7fea4a9e /config-model | |
parent | 3026975579b2efeebda5b8846e66a7de6fbe4f13 (diff) |
remove "attribute: prefetch" code
Diffstat (limited to 'config-model')
4 files changed, 0 insertions, 59 deletions
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/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/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/javacc/SDParser.jj b/config-model/src/main/javacc/SDParser.jj index 9d86b06e547..19c410b4b98 100644 --- a/config-model/src/main/javacc/SDParser.jj +++ b/config-model/src/main/javacc/SDParser.jj @@ -298,8 +298,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 +1207,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); @@ -2550,14 +2539,12 @@ String identifier() : { } | <MUTABLE> | <NEVER> | <NONE> - | <NOPREFETCH> | <NORMAL> | <NORMALIZING> | <OFF> | <ON> | <ONDEMAND> | <ORDER> - | <PREFETCH> | <PREFIX> | <PRIMARY> | <PROPERTIES> |