metadata - 更改marklogic中的元数据模型

标签 metadata marklogic

Marklogic 中的元数据类别是(我在文档中找到的):
集合、权限、属性、​​质量和元数据

有没有办法让我在元数据中创建其他类别?

示例:
ML文档的元数据:

<?xml version="1.0" encoding="UTF-8"?>
<rapi:metadata uri="/abc/123.xml" xsi:schemaLocation="http://marklogic.com/rest-api/database dbmeta.xsd" 
    xmlns:rapi="http://marklogic.com/rest-api" 
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <rapi:collections>
        <rapi:collection>numerics</rapi:collection>
    </rapi:collections>
    <rapi:permissions/>
    <prop:properties 
        xmlns:prop="http://marklogic.com/xdmp/property">
        <property1>1</property1>
        <property2>2</property2>
    </prop:properties>
    <rapi:quality>0</rapi:quality>
</rapi:metadata>

有没有办法更改 Marklogic 中的元数据,使其类似于:

<?xml version="1.0" encoding="UTF-8"?>
<rapi:metadata uri="/abc/123.xml" xsi:schemaLocation="http://marklogic.com/rest-api/database dbmeta.xsd" 
    xmlns:rapi="http://marklogic.com/rest-api" 
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

    <itemId>1</itemId>
    <itemName>abc</itemName>

    <rapi:collections>
        <rapi:collection>numerics</rapi:collection>
    </rapi:collections>
    <rapi:permissions/>
    <prop:properties 
        xmlns:prop="http://marklogic.com/xdmp/property">
        <property1>1</property1>
        <property2>2</property2>
    </prop:properties>
    <rapi:quality>0</rapi:quality>
</rapi:metadata>

要在marklogic元数据中添加其他字段吗?

最佳答案

不,您不能通过这种方式添加新类别。它还需要更改 MLCP。

但是<prop:properties>的内容是自由格式,您可以添加任意数量的元素,并且它们不需要很简单。您可以在其中添加整个 XML 文档。

呵呵!

关于metadata - 更改marklogic中的元数据模型,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28337881/

相关文章:

ios - 使用AVAUDIOPLAYER从音频流中获取元数据

Python:使用 Hachoir,如何提取类文件对象的元数据?

xpath - Marklogic - 如何在单个 xquery 中执行插入和节点替换

MarkLogic java API加入2个文件

wordpress - 如何保存自定义元以便仅在 "Preview Changes"中看到评论数据,而不是前端的实际帖子

visual-studio - Double 常量是否被截断以在 VS 中显示?

用于列出 SQL Server 2005 数据库中所有 View 的 Sql 查询

MarkLogic - JSON 到 XML 的转换 - 处理多个属性

xpath - MarkLogic:Xpath与搜索

marklogic - 触发在 Marklogic 中启动 http 通信的林中的数据创建