diff options
-rw-r--r-- | config-model/src/main/javacc/SchemaParser.jj | 168 | ||||
-rw-r--r-- | config-model/src/test/derived/advanced/advanced.sd | 4 | ||||
-rw-r--r-- | config-model/src/test/examples/indexrewrite.sd | 1 | ||||
-rw-r--r-- | documentgen-test/etc/complex/book.sd | 1 |
4 files changed, 1 insertions, 173 deletions
diff --git a/config-model/src/main/javacc/SchemaParser.jj b/config-model/src/main/javacc/SchemaParser.jj index 7ef9771d692..97d5925097f 100644 --- a/config-model/src/main/javacc/SchemaParser.jj +++ b/config-model/src/main/javacc/SchemaParser.jj @@ -190,12 +190,7 @@ TOKEN : | < MUTATE: "mutate" > | < QUERY: "query" > | < RANKPROFILE: "rank-profile" > -| < RANKDEGRADATIONFREQ: "rank-degradation-frequency" > -| < RANKDEGRADATION: "rank-degradation" > | < RAW_AS_BASE64_IN_SUMMARY: "raw-as-base64-in-summary" > -| < RPBINSIZE: "doc-frequency" > -| < RPBINLOW: "min-fullrank-docs"> -| < RPPOSBINSIZE: "occurrences-per-doc" > | < SUMMARY: "summary" > | < FULL: "full" > | < STATIC: "static" > @@ -229,8 +224,6 @@ TOKEN : | < CASED: "cased" > | < UNCASED: "uncased" > | < BOLDING: "bolding" > -| < BODY: "body" > -| < HEADER: "header" > | < NONE: "none" > | < ON: "on" > | < OFF: "off" > @@ -246,7 +239,6 @@ TOKEN : | < FILTER: "filter" > | < NORMAL: "normal" > | < EXACTTERMINATOR: "exact-terminator" > -| < INDEXINGREWRITE: "indexing-rewrite" > | < IGNOREDEFAULTRANKFEATURES: "ignore-default-rank-features" > | < ID: "id" > | < SOURCE: "source" > @@ -268,7 +260,6 @@ TOKEN : | < 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")? > -| < USEDOCUMENT: "use-document" > | < LBRACE: "{" > | < RBRACE: "}" > | < COLON: ":" > @@ -415,7 +406,6 @@ void rootSchemaItem(ParsedSchema schema) : { } | searchStemming(schema) | importField(schema) | rankingConstant(schema) // Deprecated: TODO: Emit warning when on Vespa 8 - | useDocument(schema) | rankProfile(schema) | documentSummary(schema) | fieldOutsideDoc(schema) @@ -462,17 +452,6 @@ ParsedSchema rootDocumentItem(ParsedSchema schema) : } /** - * Consumes a use-document statement. This currently does nothing. - * - * @param schema the schema object to modify. - */ -void useDocument(ParsedSchema schema) : { } -{ - <USEDOCUMENT> <COLON> identifier() - { deployLogger.logApplicationPackage(Level.WARNING, "Specifying 'use-document' is deprecated and has no effect."); } -} - -/** * Consumes a document element. The name defaults to the schema's name, but may be set. * * @param schema the schema object to add content to. @@ -862,16 +841,13 @@ void fieldBody(ParsedField field) : { } { ( alias(field) | attribute(field) | - body() | bolding(field) | dictionary(field) | fieldStemming(field) | - header() | id(field) | summaryInField(field) | indexInsideField(field) | indexing(field) | - indexingRewrite(field) | matchSettings(field.matchSettings()) | normalizing(field) | queryCommand(field) | @@ -1082,29 +1058,11 @@ void attributeSetting(ParsedAttribute attribute) : | <ALIAS> { String alias; String aliasedName=attribute.name(); } [aliasedName = identifier()] <COLON> alias = identifierWithDash() { attribute.addAlias(aliasedName, alias); } - | attributeTensorType(attribute) | <DISTANCEMETRIC> <COLON> str = identifierWithDash() { attribute.setDistanceMetric(str); } ) } /** - * This rule consumes a tensor type statement for an attribute element. - * - * @param attribute The attribute to modify. - */ -void attributeTensorType(ParsedAttribute attribute) : -{ - TensorType tensorType; -} -{ - tensorType = tensorType("For attribute field '" + attribute.name() + "'") - { - // TODO: Remove on Vespa 8 - deployLogger.logApplicationPackage(Level.WARNING, "In field '" + attribute.name() + "': Specifying tensor type on the attribute is deprecated and has no effect."); - } -} - -/** * This rule consumes a summary statement defined inside a document-summary block. * * @param docsum The document summary to modify. @@ -1190,7 +1148,7 @@ void summaryItem(ParsedSummaryField field) : { } | summaryBolding(field) | summarySourceList(field) | summaryDestinationList(field) - | summaryProperties(field) ) + ) } /** @@ -1249,30 +1207,6 @@ void summaryDestinationList(ParsedSummaryField field) : } /** - * This rule consumes properties for a summary field element. - * - * @param field The summary field to modify. - */ -void summaryProperties(ParsedSummaryField field) : { } -{ - <PROPERTIES> lbrace() (summaryProperty(field) <NL>)+ <RBRACE> -} - -/** - * This rule consumes a single summary property pair for a summary field element. - * - * @param field The summary field to modify. - */ -void summaryProperty(ParsedSummaryField field) : -{ - String name, value; -} -{ - name = identifierWithDash() <COLON> (value = identifierWithDash() | value = quotedString()) - { deployLogger.logApplicationPackage(Level.WARNING, "Specifying summary properties is deprecated and has no effect."); } -} - -/** * This rule consumes a stemming block of a field element. * * @param field The field to modify. @@ -1354,28 +1288,6 @@ void dictionarySetting(ParsedField field) : { } | <UNCASED> { field.dictionary(DictionaryOption.UNCASED); } ) } -/** - * This rule consumes a body statement of a field element. - */ -void body() : { } -{ - <BODY> - { - deployLogger.logApplicationPackage(Level.WARNING, "'body' is deprecated and has no effect."); - } -} - -/** - * This rule consumes a header statement of a field element. - */ -void header() : { } -{ - <HEADER> - { - deployLogger.logApplicationPackage(Level.WARNING, "'header' is deprecated and has no effect."); - } -} - void queryCommand(ParsedField field) : { String command; @@ -1502,17 +1414,6 @@ void id(ParsedField field) : } /** - * Consumes an indexing-rewrite statement of a field body block. - * - * @param field The field to modify. - */ -void indexingRewrite(ParsedField field) : { } -{ - <INDEXINGREWRITE> <COLON> <NONE> - { deployLogger.logApplicationPackage(Level.WARNING, "Specifying 'indexing-rewrite' is deprecated and has no effect."); } -} - -/** * Consumes a document-summary block from within a schema block. * * @param schema the schema object to add content to @@ -1807,7 +1708,6 @@ void rankProfileItem(ParsedSchema schema, ParsedRankProfile profile) : { } | rankFeatures(profile) | rankProperties(profile) | secondPhase(profile) - | rankDegradation() | inputs(profile) | constants(schema, profile) | matchFeatures(profile) @@ -2330,68 +2230,6 @@ void fieldRankFilter(ParsedRankProfile profile) : } /** - * Consumes part of a rank-degradation statement of a rank profile. - */ -void rankDegradationBinSize() : -{ - double freq; -} -{ - <RPBINSIZE> <COLON> freq = floatValue() - { deployLogger.logApplicationPackage(Level.WARNING, "Specifying 'doc-frequency' in 'rank-degradation' is deprecated and has no effect."); } -} - - -/** - * Consumes part of a rank-degradation statement of a rank profile. - */ -void rankDegradationBinLow() : -{ - int n; -} -{ - <RPBINLOW> <COLON> n = integer() - { deployLogger.logApplicationPackage(Level.WARNING, "Specifying 'min-fullrank-docs' in 'rank-degradation' is deprecated and has no effect."); } -} - -/** - * Consumes part of a rank-degradation statement of a rank profile. - */ -void rankDegradationPosbinSize() : -{ - double avgOcc; -} -{ - <RPPOSBINSIZE> <COLON> avgOcc = floatValue() - { deployLogger.logApplicationPackage(Level.WARNING, "Specifying 'occurrences-per-doc' in 'rank-degradation' is deprecated and has no effect."); } -} - - -/** - * Consumes part of a rank-degradation statement of a rank profile. - */ -void rankDegradationItem() : { } -{ - ( rankDegradationBinSize() - | rankDegradationBinLow() - | rankDegradationPosbinSize() ) -} - -/** - * Consumes a rank-degradation statement of a rank profile. - */ -void rankDegradation() : -{ - double freq; -} -{ - ( <RANKDEGRADATIONFREQ> <COLON> freq = floatValue() - { deployLogger.logApplicationPackage(Level.WARNING, "Specifying 'rank-degradation-frequency' in 'rank-profile' is deprecated and has no effect."); } - | <RANKDEGRADATION> lbrace() ( rankDegradationItem() (<NL>)*)+ <RBRACE> - ) -} - -/** * Consumes a set of constants available in ranking expressions in the enclosing profile. */ void constants(ParsedSchema schema, ParsedRankProfile profile) : @@ -2714,7 +2552,6 @@ String identifier() : { } | <AS> | <ASCENDING> | <ATTRIBUTE> - | <BODY> | <BOLDING> | <BTREE> | <CASED> @@ -2748,7 +2585,6 @@ String identifier() : { } | <FUNCTION> | <GRAM> | <HASH> - | <HEADER> | <HUGE> | <ID> | <IDENTICAL> @@ -2757,7 +2593,6 @@ String identifier() : { } | <IMPORT> | <INDEX> | <INDEXING> - | <INDEXINGREWRITE> | <INHERITS> | <INLINE> | <INPUTS> @@ -2832,7 +2667,6 @@ String identifier() : { } | <UNCASED> | <URI> | <UPPERBOUND> - | <USEDOCUMENT> | <VARIABLE> | <WEIGHT> | <WEIGHTEDSET> diff --git a/config-model/src/test/derived/advanced/advanced.sd b/config-model/src/test/derived/advanced/advanced.sd index 69ea3a529b4..98a403dc44e 100644 --- a/config-model/src/test/derived/advanced/advanced.sd +++ b/config-model/src/test/derived/advanced/advanced.sd @@ -50,7 +50,6 @@ schema advanced { field title type string { indexing: input title_src | index - indexing-rewrite: none rank-type: identity stemming: none alias: headline @@ -65,7 +64,6 @@ schema advanced { case "": "myweb" | index | summary; default: input product_src | index | summary; } - indexing-rewrite: none normalizing: none } @@ -77,7 +75,6 @@ schema advanced { "baz" | index product2; }; } - indexing-rewrite: none normalizing: none } @@ -87,7 +84,6 @@ schema advanced { default: input product3_src | index product3 | summary product3; } normalizing: none - indexing-rewrite: none } field location type position { diff --git a/config-model/src/test/examples/indexrewrite.sd b/config-model/src/test/examples/indexrewrite.sd index ee6fe21a15c..1fd9c3a2b79 100644 --- a/config-model/src/test/examples/indexrewrite.sd +++ b/config-model/src/test/examples/indexrewrite.sd @@ -8,7 +8,6 @@ search indexrewrite { field title type string { indexing: input title_src | lowercase | normalize | tokenize | index - indexing-rewrite: none rank-type: about stemming: none alias: headline diff --git a/documentgen-test/etc/complex/book.sd b/documentgen-test/etc/complex/book.sd index ace6c33e440..e94524e1c0d 100644 --- a/documentgen-test/etc/complex/book.sd +++ b/documentgen-test/etc/complex/book.sd @@ -64,7 +64,6 @@ search book { } field vector type tensor(x{}) { indexing: attribute | summary - attribute: tensor(x{}) } } |