diff options
author | Geir Storli <geirst@yahooinc.com> | 2022-06-02 12:01:59 +0000 |
---|---|---|
committer | gjoranv <gv@verizonmedia.com> | 2022-06-08 11:45:24 +0200 |
commit | 52830e64c8fa88bfd17d37fefe9c0d9c3547377a (patch) | |
tree | 52715f77e5ccbb49b06d1c8fe885639ba0aab7af /config-model/src | |
parent | 1cf8921d21997badc5b335fbf223cf6e71aa1bc7 (diff) |
Remove 'attribute: huge' which has no effect.
Diffstat (limited to 'config-model/src')
11 files changed, 3 insertions, 33 deletions
diff --git a/config-model/src/main/java/com/yahoo/schema/derived/AttributeFields.java b/config-model/src/main/java/com/yahoo/schema/derived/AttributeFields.java index 399e8c6c311..b378d127430 100644 --- a/config-model/src/main/java/com/yahoo/schema/derived/AttributeFields.java +++ b/config-model/src/main/java/com/yahoo/schema/derived/AttributeFields.java @@ -213,9 +213,6 @@ public class AttributeFields extends Derived implements AttributesConfig.Produce if (attribute.isMutable()) { aaB.ismutable(true); } - if (attribute.isHuge()) { - aaB.huge(true); - } if (attribute.isPaged()) { aaB.paged(true); } diff --git a/config-model/src/main/java/com/yahoo/schema/document/Attribute.java b/config-model/src/main/java/com/yahoo/schema/document/Attribute.java index 5593c3f8cdf..87830d76f78 100644 --- a/config-model/src/main/java/com/yahoo/schema/document/Attribute.java +++ b/config-model/src/main/java/com/yahoo/schema/document/Attribute.java @@ -56,7 +56,6 @@ public final class Attribute implements Cloneable, Serializable { private boolean fastRank = false; private boolean fastSearch = false; private boolean fastAccess = false; - private boolean huge = false; private boolean mutable = false; private boolean paged = false; private int arity = BooleanIndexDefinition.DEFAULT_ARITY; @@ -199,7 +198,6 @@ public final class Attribute implements Cloneable, Serializable { public boolean isFastSearch() { return fastSearch; } public boolean isFastRank() { return fastRank; } public boolean isFastAccess() { return fastAccess; } - public boolean isHuge() { return huge; } public boolean isPaged() { return paged; } public boolean isPosition() { return isPosition; } public boolean isMutable() { return mutable; } @@ -245,7 +243,6 @@ public final class Attribute implements Cloneable, Serializable { throw badGen.get(); } public void setFastSearch(boolean fastSearch) { this.fastSearch = fastSearch; } - public void setHuge(boolean huge) { this.huge = huge; } public void setPaged(boolean paged) { this.paged = paged; } public void setFastAccess(boolean fastAccess) { this.fastAccess = fastAccess; } public void setPosition(boolean position) { this.isPosition = position; } @@ -379,7 +376,7 @@ public final class Attribute implements Cloneable, Serializable { public int hashCode() { return Objects.hash( name, type, collectionType, sorting, dictionary, isPrefetch(), fastAccess, removeIfZero, - createIfNonExistent, isPosition, huge, mutable, paged, enableBitVectors, enableOnlyBitVector, + createIfNonExistent, isPosition, mutable, paged, enableBitVectors, enableOnlyBitVector, tensorType, referenceDocumentType, distanceMetric, hnswIndexParams); } @@ -402,7 +399,6 @@ public final class Attribute implements Cloneable, Serializable { if (this.enableBitVectors != other.enableBitVectors) return false; if (this.enableOnlyBitVector != other.enableOnlyBitVector) return false; if (this.fastSearch != other.fastSearch) return false; - if (this.huge != other.huge) return false; if (this.mutable != other.mutable) return false; if (this.paged != other.paged) return false; if (! this.sorting.equals(other.sorting)) return false; diff --git a/config-model/src/main/java/com/yahoo/schema/parser/ConvertParsedFields.java b/config-model/src/main/java/com/yahoo/schema/parser/ConvertParsedFields.java index fa656b72530..3008dac4f29 100644 --- a/config-model/src/main/java/com/yahoo/schema/parser/ConvertParsedFields.java +++ b/config-model/src/main/java/com/yahoo/schema/parser/ConvertParsedFields.java @@ -76,7 +76,6 @@ public class ConvertParsedFields { field.addAttribute(attribute); } } - attribute.setHuge(parsed.getHuge()); attribute.setPaged(parsed.getPaged()); attribute.setFastSearch(parsed.getFastSearch()); if (parsed.getFastRank()) { diff --git a/config-model/src/main/java/com/yahoo/schema/parser/ParsedAttribute.java b/config-model/src/main/java/com/yahoo/schema/parser/ParsedAttribute.java index be8d20fbe93..de06436a1eb 100644 --- a/config-model/src/main/java/com/yahoo/schema/parser/ParsedAttribute.java +++ b/config-model/src/main/java/com/yahoo/schema/parser/ParsedAttribute.java @@ -19,7 +19,6 @@ class ParsedAttribute extends ParsedBlock { private boolean enableFastAccess = false; private boolean enableFastRank = false; private boolean enableFastSearch = false; - private boolean enableHuge = false; private boolean enableMutable = false; private boolean enablePaged = false; private final Map<String, String> aliases = new LinkedHashMap<>(); @@ -38,7 +37,6 @@ class ParsedAttribute extends ParsedBlock { boolean getFastAccess() { return this.enableFastAccess; } boolean getFastRank() { return this.enableFastRank; } boolean getFastSearch() { return this.enableFastSearch; } - boolean getHuge() { return this.enableHuge; } boolean getMutable() { return this.enableMutable; } boolean getPaged() { return this.enablePaged; } Optional<ParsedSorting> getSorting() { return Optional.ofNullable(sortSettings); } @@ -63,7 +61,6 @@ class ParsedAttribute extends ParsedBlock { void setFastAccess(boolean value) { this.enableFastAccess = true; } void setFastRank(boolean value) { this.enableFastRank = true; } void setFastSearch(boolean value) { this.enableFastSearch = true; } - void setHuge(boolean value) { this.enableHuge = true; } void setMutable(boolean value) { this.enableMutable = true; } void setPaged(boolean value) { this.enablePaged = true; } } diff --git a/config-model/src/main/java/com/yahoo/vespa/model/application/validation/change/search/AttributeChangeValidator.java b/config-model/src/main/java/com/yahoo/vespa/model/application/validation/change/search/AttributeChangeValidator.java index cfb641882f6..5c3905e3311 100644 --- a/config-model/src/main/java/com/yahoo/vespa/model/application/validation/change/search/AttributeChangeValidator.java +++ b/config-model/src/main/java/com/yahoo/vespa/model/application/validation/change/search/AttributeChangeValidator.java @@ -114,7 +114,6 @@ public class AttributeChangeValidator { validateAttributePredicate(id, current, next, Attribute::isFastAccess, "fast-access", result); validateAttributeProperty(id, current, next, AttributeChangeValidator::extractDictionaryType, "dictionary: btree/hash", result); validateAttributeProperty(id, current, next, AttributeChangeValidator::extractDictionaryCase, "dictionary: cased/uncased", result); - validateAttributePredicate(id, current, next, Attribute::isHuge, "huge", result); validateAttributePredicate(id, current, next, Attribute::isPaged, "paged", result); validatePagedAttributeRemoval(current, next); validateAttributeProperty(id, current, next, Attribute::densePostingListThreshold, "dense-posting-list-threshold", result); diff --git a/config-model/src/main/javacc/SchemaParser.jj b/config-model/src/main/javacc/SchemaParser.jj index 2374098697d..efd5497902e 100644 --- a/config-model/src/main/javacc/SchemaParser.jj +++ b/config-model/src/main/javacc/SchemaParser.jj @@ -256,7 +256,6 @@ TOKEN : | < PAGED: "paged" > | < FASTRANK: "fast-rank" > | < FASTSEARCH: "fast-search" > -| < HUGE: "huge" > | < 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")? > @@ -1046,8 +1045,7 @@ void attributeSetting(ParsedAttribute attribute) : } { ( - <HUGE> { attribute.setHuge(true); } - | <FASTRANK> { attribute.setFastRank(true); } + <FASTRANK> { attribute.setFastRank(true); } | <FASTSEARCH> { attribute.setFastSearch(true); } | <FASTACCESS> { attribute.setFastAccess(true); } | <MUTABLE> { attribute.setMutable(true); } @@ -2584,7 +2582,6 @@ String identifier() : { } | <FUNCTION> | <GRAM> | <HASH> - | <HUGE> | <ID> | <IDENTICAL> | <IDENTIFIER> diff --git a/config-model/src/test/derived/complex/attributes.cfg b/config-model/src/test/derived/complex/attributes.cfg index 86b6b9ebc13..19f13d52303 100644 --- a/config-model/src/test/derived/complex/attributes.cfg +++ b/config-model/src/test/derived/complex/attributes.cfg @@ -7,7 +7,7 @@ attribute[].match UNCASED attribute[].removeifzero false attribute[].createifnonexistent false attribute[].fastsearch false -attribute[].huge true +attribute[].huge false attribute[].paged false attribute[].ismutable false attribute[].sortascending true diff --git a/config-model/src/test/derived/complex/complex.sd b/config-model/src/test/derived/complex/complex.sd index 3dcea95ed72..3e28801c53a 100644 --- a/config-model/src/test/derived/complex/complex.sd +++ b/config-model/src/test/derived/complex/complex.sd @@ -41,7 +41,6 @@ schema complex { field prefixenabled type string { indexing: index | attribute index: prefix - attribute: huge normalizing: none stemming: shortest } diff --git a/config-model/src/test/examples/attributesettings.sd b/config-model/src/test/examples/attributesettings.sd index e7bb2062227..c87aad5b59b 100644 --- a/config-model/src/test/examples/attributesettings.sd +++ b/config-model/src/test/examples/attributesettings.sd @@ -5,7 +5,6 @@ search attributesettings { field f1 type long { indexing: attribute - attribute: huge } field f2 type long { diff --git a/config-model/src/test/java/com/yahoo/schema/AttributeSettingsTestCase.java b/config-model/src/test/java/com/yahoo/schema/AttributeSettingsTestCase.java index bbe63f95787..885cc385dfa 100644 --- a/config-model/src/test/java/com/yahoo/schema/AttributeSettingsTestCase.java +++ b/config-model/src/test/java/com/yahoo/schema/AttributeSettingsTestCase.java @@ -37,7 +37,6 @@ public class AttributeSettingsTestCase extends AbstractSchemaTestCase { Attribute a1 = f1.getAttributes().get(f1.getName()); assertEquals(Attribute.Type.LONG, a1.getType()); assertEquals(Attribute.CollectionType.SINGLE, a1.getCollectionType()); - assertTrue(a1.isHuge()); assertFalse(a1.isFastSearch()); assertFalse(a1.isFastAccess()); assertFalse(a1.isRemoveIfZero()); @@ -48,7 +47,6 @@ public class AttributeSettingsTestCase extends AbstractSchemaTestCase { Attribute a2 = f2.getAttributes().get(f2.getName()); assertEquals(Attribute.Type.LONG, a2.getType()); assertEquals(Attribute.CollectionType.SINGLE, a2.getCollectionType()); - assertFalse(a2.isHuge()); assertTrue(a2.isFastSearch()); assertFalse(a2.isFastAccess()); assertFalse(a2.isRemoveIfZero()); @@ -61,7 +59,6 @@ public class AttributeSettingsTestCase extends AbstractSchemaTestCase { Attribute a3 = f3.getAttributes().get(f3.getName()); assertEquals(Attribute.Type.LONG, a3.getType()); assertEquals(Attribute.CollectionType.SINGLE, a3.getCollectionType()); - assertFalse(a3.isHuge()); assertFalse(a3.isFastSearch()); assertFalse(a3.isFastAccess()); assertFalse(a3.isRemoveIfZero()); @@ -306,7 +303,6 @@ public class AttributeSettingsTestCase extends AbstractSchemaTestCase { single.setEnableBitVectors(true); single.setEnableOnlyBitVector(true); single.setFastSearch(true); - single.setHuge(true); single.setPaged(true); single.setFastAccess(true); single.setPosition(true); @@ -329,7 +325,6 @@ public class AttributeSettingsTestCase extends AbstractSchemaTestCase { assertTrue(array.isEnabledBitVectors()); assertTrue(array.isEnabledOnlyBitVector()); assertTrue(array.isFastSearch()); - assertTrue(array.isHuge()); assertTrue(array.isPaged()); assertTrue(array.isFastAccess()); assertTrue(array.isPosition()); diff --git a/config-model/src/test/java/com/yahoo/vespa/model/application/validation/change/search/AttributeChangeValidatorTest.java b/config-model/src/test/java/com/yahoo/vespa/model/application/validation/change/search/AttributeChangeValidatorTest.java index c3aa387da54..8d6f05f40e7 100644 --- a/config-model/src/test/java/com/yahoo/vespa/model/application/validation/change/search/AttributeChangeValidatorTest.java +++ b/config-model/src/test/java/com/yahoo/vespa/model/application/validation/change/search/AttributeChangeValidatorTest.java @@ -116,14 +116,6 @@ public class AttributeChangeValidatorTest { } @Test - public void changing_huge_require_restart() throws Exception { - new Fixture("field f1 type string { indexing: attribute }", - "field f1 type string { indexing: attribute \n attribute: huge }"). - assertValidation(newRestartAction(ClusterSpec.Id.from("test"), - "Field 'f1' changed: add attribute 'huge'")); - } - - @Test public void changing_dense_posting_list_threshold_require_restart() throws Exception { new Fixture( "field f1 type predicate { indexing: attribute \n index { arity: 8 \n dense-posting-list-threshold: 0.2 } }", |