xdmp:document-insert之后,托管文档在MarkLogic 10中不起作用 [英] Managed document not working in MarkLogic 10 after xdmp:document-insert

查看:109
本文介绍了xdmp:document-insert之后,托管文档在MarkLogic 10中不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

  1. 首次使用dls:document-insert-and-manage
  2. 管理文档
  3. 使用xdmp:document-insert
  4. 更新同一文档
  5. 文档从dls最新版本集合cts:search(/scopedIntervention/id , dls:documents-query())

  1. First time manage document using dls:document-insert-and-manage
  2. Update the same document using xdmp:document-insert
  3. Document get lost from the dls latest version collection cts:search(/scopedIntervention/id , dls:documents-query())

首次管理文档

<scopedIntervention>
  <id>someId12345</id>
  <scopedInterventionName>
    First Name
  </scopedInterventionName>
  <forTestOnly>
    true
  </forTestOnly>
  <inactive>
    true
  </inactive>
</scopedIntervention>)```
**Document inserted with versioning**

  • 验证文档是否存在于最新文档集中

  • Verify document is present in latest documents collection

    cts:search(/scopedIntervention/id , dls:documents-query())

    文档包含在托管的最新收藏集中

    更新相同的文档

    <scopedIntervention>
      <id>someId12345</id>
      <scopedInterventionName>
        Updated Name
      </scopedInterventionName>
      <forTestOnly>
        true
      </forTestOnly>
      <inactive>
        true
      </inactive>
    </scopedIntervention>)```
    
    **Update document to same URI using xdmp:document-insert**
    

  • 再次验证文档是否存在于最新文档中

  • Again verify document is present or NOT in latest documents collection

    cts:search(/scopedIntervention/id , dls:documents-query())

    托管的最新收藏集中不存在文档(从收藏集中丢失)

    使用以下升级步骤应用DLS软件包后,列表中会显示相同的文档 xquery版本"1.0-ml"; 导入模块名称空间dls =" http://marklogic.com/xdmp/dls " 在"/MarkLogic/dls.xqy"处;

    After applying DLS package using following upgrade step, the same document shows in the list ```xquery version "1.0-ml"; import module namespace dls = "http://marklogic.com/xdmp/dls" at "/MarkLogic/dls.xqy";

    dls:set-upgrade-status(fn:false()),
    dls:start-upgrade(),
    fn:doc("http://marklogic.com/dls/upgrade-task-status.xml"),
    dls:latest-validation-results(),
    dls:set-upgrade-status(fn:true())```
    

    推荐答案

    1. 使用xdmp:document-insert更新相同的文档

    您最有可能在此步骤中删除"DLS最新"收藏集.此外,执行此操作时不会保留版本历史记录.

    You are most likely removing the DLS Latest collection at this step. Further, version history is not preserved when you do this.

    您应该使用 dls:document-来代替xdmp:document-insert checkout-update-checkin .

    这篇关于xdmp:document-insert之后,托管文档在MarkLogic 10中不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

  • 查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆