diff options
author | Harald Musum <musum@yahooinc.com> | 2023-01-03 11:12:50 +0100 |
---|---|---|
committer | Harald Musum <musum@yahooinc.com> | 2023-01-03 11:12:50 +0100 |
commit | 08de9e50fbe1e593dd025514f3c0865b2dd8f6d9 (patch) | |
tree | 0a6f55f21b4c588080916a4c7e686010b3c02cd4 | |
parent | 470e303a873bece667965f6d20f2b6c5fa98e537 (diff) |
Remove unsupported docproc xml elements
6 files changed, 61 insertions, 106 deletions
diff --git a/config-model/src/main/resources/schema/container-include.rnc b/config-model/src/main/resources/schema/container-include.rnc index 8f6a8a3bada..b0cd9baab32 100644 --- a/config-model/src/main/resources/schema/container-include.rnc +++ b/config-model/src/main/resources/schema/container-include.rnc @@ -2,7 +2,6 @@ include "containercluster.rnc" include "common.rnc" include "container.rnc" -include "docproc.rnc" include "searchchains.rnc" start = SearchInContainer | DocprocInContainer | ProcessingInContainer | Components diff --git a/config-model/src/main/resources/schema/containercluster.rnc b/config-model/src/main/resources/schema/containercluster.rnc index 938932c3df6..2bb93ac715e 100644 --- a/config-model/src/main/resources/schema/containercluster.rnc +++ b/config-model/src/main/resources/schema/containercluster.rnc @@ -187,7 +187,50 @@ DocprocInContainer = element document-processing { ChainInDocprocInContainerCluster = element chain { DocprocChainV3Contents } +SchemaMapping = element map { + element field { + attribute doctype { text }?, + attribute in-document { text }, + attribute in-processor { text } + }+ +} + +# TODO Here we need a thorough cleaning +DocprocClusterAttributes = attribute compressdocuments { xsd:boolean }? & + attribute numnodesperclient { xsd:positiveInteger }? & # TODO: Remove in Vespa 9 + attribute preferlocalnode { xsd:boolean }? & # TODO: Remove in Vespa 9 + attribute maxmessagesinqueue { xsd:nonNegativeInteger }? & + attribute maxqueuebytesize { xsd:string { minLength = "1" } }? & # TODO: Remove in Vespa 9 + attribute maxqueuewait { xsd:positiveInteger }? & + attribute maxconcurrentfactor { xsd:double { minExclusive = "0.0" maxExclusive = "1.0" } }? & + attribute documentexpansionfactor { xsd:double { minExclusive = "0.0" } }? & + attribute containercorememory { xsd:nonNegativeInteger }? + + +DocprocChainV3Contents = attribute name { xsd:NCName }? & + ComponentId & + SchemaMapping? & + DocprocChainInheritance & + attribute documentprocessors { text }? & + DocumentProcessorV3* & + Phase* & + GenericConfig* + + +DocprocChainInheritance = + attribute inherits { text }? & + attribute excludes { text }? & + element inherits { + element docprocchain { ComponentSpec }* & + element exclude { ComponentSpec }* + }? +DocumentProcessorV3 = + element documentprocessor { + BundleSpec & + SchemaMapping? & + GenericSearcherOrDocumentProcessor + } # PROCESSING: diff --git a/config-model/src/main/resources/schema/docproc-standalone.rnc b/config-model/src/main/resources/schema/docproc-standalone.rnc deleted file mode 100644 index caba5327e25..00000000000 --- a/config-model/src/main/resources/schema/docproc-standalone.rnc +++ /dev/null @@ -1,6 +0,0 @@ -# Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -include "common.rnc" -include "container.rnc" -include "searchchains.rnc" -include "docproc.rnc" -start = DocprocChainsV3 diff --git a/config-model/src/main/resources/schema/docproc.rnc b/config-model/src/main/resources/schema/docproc.rnc deleted file mode 100644 index 11f8e14fb2d..00000000000 --- a/config-model/src/main/resources/schema/docproc.rnc +++ /dev/null @@ -1,98 +0,0 @@ -# Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -DocProc = element docproc { - DocProcV3 -} - -SchemaMapping = element map { - element field { - attribute doctype { text }?, - attribute in-document { text }, - attribute in-processor { text } - }+ -} - -#Version 3 config: - -DocProcV3 = attribute version { "3.0" }, - (ClusterV3* & - OuterDocprocChainsV3? & - GenericConfig* -) - -# TODO Here we need a thorough cleaning -DocprocClusterAttributes = attribute compressdocuments { xsd:boolean }? & - attribute numnodesperclient { xsd:positiveInteger }? & # TODO: Remove in Vespa 9 - attribute preferlocalnode { xsd:boolean }? & # TODO: Remove in Vespa 9 - attribute maxmessagesinqueue { xsd:nonNegativeInteger }? & - attribute maxqueuebytesize { xsd:string { minLength = "1" } }? & # TODO: Remove in Vespa 9 - attribute maxqueuewait { xsd:positiveInteger }? & - attribute maxconcurrentfactor { xsd:double { minExclusive = "0.0" maxExclusive = "1.0" } }? & - attribute documentexpansionfactor { xsd:double { minExclusive = "0.0" } }? & - attribute containercorememory { xsd:nonNegativeInteger }? - -# TODO Here we need a thorough cleaning -ClusterV3 = element cluster { - attribute name { xsd:NCName } & - DocprocClusterAttributes? & - - element nodes { - Resources? & - attribute jvmargs { text }? & - attribute preload { text }? & - element node { - GenericConfig* & - service.attlist & - attribute maxmessagesinqueue { xsd:nonNegativeInteger }? & - attribute maxqueuebytesize { xsd:string { minLength = "1" } }? & - attribute maxqueuewait { xsd:positiveInteger }? - }+ - } & - GenericConfig* & - SchemaMapping? & - Component* & - Handler* & - DocprocChainsV3? -} - -DocprocChainsV3 = - element docprocchains { - DocumentProcessorV3* & - DocprocChainV3* & - GenericConfig* - } - -OuterDocprocChainsV3 = - element docprocchains { - DocumentProcessorV3* & - DocprocChainV3* - } - -DocprocChainV3 = - element docprocchain { - DocprocChainV3Contents - } - -DocprocChainV3Contents = attribute name { xsd:NCName }? & - ComponentId & - SchemaMapping? & - DocprocChainInheritance & - attribute documentprocessors { text }? & - DocumentProcessorV3* & - Phase* & - GenericConfig* - - -DocprocChainInheritance = - attribute inherits { text }? & - attribute excludes { text }? & - element inherits { - element docprocchain { ComponentSpec }* & - element exclude { ComponentSpec }* - }? - -DocumentProcessorV3 = - element documentprocessor { - BundleSpec & - SchemaMapping? & - GenericSearcherOrDocumentProcessor - } diff --git a/config-model/src/main/resources/schema/services.rnc b/config-model/src/main/resources/schema/services.rnc index d3d642b8826..aed627203a0 100644 --- a/config-model/src/main/resources/schema/services.rnc +++ b/config-model/src/main/resources/schema/services.rnc @@ -2,7 +2,6 @@ include "common.rnc" include "admin.rnc" include "content.rnc" -include "docproc.rnc" include "routing.rnc" include "containercluster.rnc" diff --git a/config-model/src/test/schema-test-files/services.xml b/config-model/src/test/schema-test-files/services.xml index 7976b1f5524..8806a4e082a 100644 --- a/config-model/src/test/schema-test-files/services.xml +++ b/config-model/src/test/schema-test-files/services.xml @@ -219,6 +219,24 @@ <certificate file="security/file2.pem" /> </client> </clients> + + <document-processing> + <chain id="common"> + <documentprocessor id="CommonDocproc" class="com.yahoo.vespatest.ExtraHitDocumentProcessor"> + <config name="com.yahoo.vespatest.extra-hit"> + <exampleString>A docproc for all clusters</exampleString> + </config> + </documentprocessor> + </chain> + <chain id="cluster1"> + <documentprocessor id="Cluster1Docproc" class="com.yahoo.vespatest.ExtraHitDocumentProcessor"> + <config name="com.yahoo.vespatest.extra-hit"> + <exampleString>Docproc only for cluster1</exampleString> + </config> + </documentprocessor> + </chain> + </document-processing> + </container> <container id='qrsCluster_2' version='1.0'> |