ML Gradle部署带有注释问题的搜索选项

时间:2019-12-05 17:18:57

标签: marklogic marklogic-9

我正在尝试使用注释部署搜索选项,这会给我以下错误

library(dplyr)
df1 %>% 
  group_by(Group) %>% 
   mutate(ind = cumsum(Value %in% 5),
          rn = row_number()) %>%
   group_by(ind, add = TRUE) %>%
   mutate(Index =  rn[ind==1][!is.na(Value[ind == 1])][2], 
      Index2= match(Value, 5),
       Index2 = case_when(!is.na(Index2)~ Index, TRUE ~ NA_integer_)) %>%
  ungroup %>%
  select(-ind, -rn, -Index)

但是从查询控制台使用相同的选项也可以正常工作。.当我抬起Error caught while loading modules, cause: Local message: /config/query write failed: Bad Request. Server Message: RESTAPI-INVALIDCONTENT: (err:FOER0000) Invalid content: Operation results in invalid Options: XDMP-VALIDATENODECL: (err:XQDY0084) validate strict { $annotations } -- Missing element declaration: Expected declaration for node fn:doc("")/search:options/search:constraint[2]/search:custom/search:annotation/search:assays in non-lax mode using schema "search.xsd"fn:doc("")/search:options/search:constraint[2]/search:custom/search:annotation/search:assays"search.xsd" com.marklogic.client.FailedRequestException: Local message: /config/query write failed: Bad Request. Server Message: RESTAPI-INVALIDCONTENT: (err:FOER0000) Invalid content: Operation results in invalid Options: XDMP-VALIDATENODECL: (err:XQDY0084) validate strict { $annotations } -- Missing element declaration: Expected declaration for node fn:doc("")/search:options/search:constraint[2]/search:custom/search:annotation/search:assays in non-lax mode using schema "search.xsd"fn:doc("")/search:options/search:constraint[2]/search:custom/search:annotation/search:assays"search.xsd" 时,看不到什么不同。.我在做什么错了? 以下是我的选项文件

search.xsd

当我从第二个约束中删除<options xmlns="http://marklogic.com/appservices/search"> <additional-query> <cts:and-query xmlns:cts="http://marklogic.com/cts"> <cts:collection-query> <cts:uri>http://rdf.abbvienet.com/entity/abbvie/biologic</cts:uri> </cts:collection-query> </cts:and-query> </additional-query> <constraint name="target"> <custom facet="false"> <parse apply="parse-string" ns="http://ir.abbvienet.com/pikm-datahub/custom-constraints/abbvie-biologic/abbvieBiologicTargetConstraint" at="/lib/custom-constraints/abbvie-biologic/abbvieBiologicTargetConstraint.xqy"/> </custom> </constraint> <constraint name="documents"> <custom facet="true"> <parse apply="parse-string" ns="http://ir.abbvienet.com/pikm-datahub/custom-constraints/abbvie-biologic/abbvieBiologicDadsELNConstraint" at="/lib/custom-constraints/abbvie-biologic/abbvieBiologicDadsELNConstraint.xqy"/> <start-facet apply="start-facet" ns="http://ir.abbvienet.com/pikm-datahub/custom-constraints/abbvie-biologic/abbvieBiologicDadsELNConstraint" at="/lib/custom-constraints/abbvie-biologic/abbvieBiologicDadsELNConstraint.xqy"/> <finish-facet apply="finish-facet" ns="http://ir.abbvienet.com/pikm-datahub/custom-constraints/abbvie-biologic/abbvieBiologicDadsELNConstraint" at="/lib/custom-constraints/abbvie-biologic/abbvieBiologicDadsELNConstraint.xqy"/> <facet-option>frequency-order</facet-option> <facet-option>descending</facet-option> <facet-option>concurrent</facet-option> <annotation> <assays> <assay label="Flow Cytometry">Flow Cytometry|FAC|Flow</assay> <assay label="Immunohistochemistry">Immunohistochemistry|IHC</assay> <assay label="Western Blot">Western Blot|Western</assay> <assay label="Elisa">Elisa</assay> <assay label="Binding Assay">Binding Assay|Biacore</assay> </assays> </annotation> </custom> </constraint> <term> <term-option>case-insensitive</term-option> <term-option>punctuation-insensitive</term-option> <term-option>whitespace-insensitive</term-option> <term-option>wildcarded</term-option> </term> <extract-document-data selected="include"> <extract-path xmlns:ab="http://schemas.abbvienet.com/entity/abbvie/biologic">//ab:id</extract-path> <extract-path xmlns:ab="http://schemas.abbvienet.com/entity/abbvie/biologic">//ab:name</extract-path> <extract-path xmlns:ab="http://schemas.abbvienet.com/entity/abbvie/biologic">//ab:alternate-name</extract-path> <extract-path xmlns:ab="http://schemas.abbvienet.com/entity/abbvie/biologic">//ab:entity-type</extract-path> <extract-path xmlns:ab="http://schemas.abbvienet.com/entity/abbvie/biologic">//ab:entity-sub-type</extract-path> <extract-path xmlns:ab="http://schemas.abbvienet.com/entity/abbvie/biologic">//ab:scientist</extract-path> <extract-path xmlns:ab="http://schemas.abbvienet.com/entity/abbvie/biologic">//ab:registrar</extract-path> <extract-path xmlns:ab="http://schemas.abbvienet.com/entity/abbvie/biologic">//ab:project</extract-path> <extract-path xmlns:ab="http://schemas.abbvienet.com/entity/abbvie/biologic">//ab:isotype</extract-path> <extract-path xmlns:ab="http://schemas.abbvienet.com/entity/abbvie/biologic">//ab:species</extract-path> <extract-path xmlns:ab="http://schemas.abbvienet.com/entity/abbvie/biologic">//ab:comments</extract-path> </extract-document-data> <transform-results apply="empty-snippet"/> </options> 标签时,将部署选项文件。当我看着<annotation>时,我没有发现search.xsd元素有什么问题..

1 个答案:

答案 0 :(得分:0)

奇怪的是,错误消息指向search:annotation / search:region,但是选项未显示该元素。

在注释元素中声明一个空的默认名称空间可能会有所帮助,如下所示:

<annotation xmlns="">

那样,注释子元素将不在搜索名称空间中,因此永远不要针对搜索架构进行验证。