xdmp:document-insert之后,托管文档在MarkLogic 10中不起作用 [英] Managed document not working in MarkLogic 10 after xdmp:document-insert
问题描述
- 首次使用
dls:document-insert-and-manage
管理文档
- 使用
xdmp:document-insert
更新同一文档
-
文档从dls最新版本集合
cts:search(/scopedIntervention/id , dls:documents-query())
- First time manage document using
dls:document-insert-and-manage
- Update the same document using
xdmp:document-insert
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())```
推荐答案
- 使用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屋!