【问题标题】:Is it possible to create collections in MarkLogic similar to MongoDb是否可以在类似于 MongoDb 的 MarkLogic 中创建集合
【发布时间】:2018-12-02 16:33:08
【问题描述】:

我是这个 MarkLogic DB 的新手,到目前为止,我们正在使用它来使用 XQuery 对 XML 文档进行 crud 操作。

现在需求发生了一些变化,需要将 json 数据与文档(可能是 xml/json)一起存储到不同的集合中,并使用 Java api + spring boot 执行 crud 操作

以下 3 个示例集合包含类似于 mongo db 的 json 数据

Employee Collection  
-------------------
empid,
`emp id json`

Address Collecion
-----------------------
empid,
`address details json`

Documents collection
-----------------
empid , 
`document (xml/json  )`

这在 MarkLogic DB 中可行吗?如果是,请帮助我找到解决方法。

并且需要一个搜索 api 使用 Marklogic + Spring boot 在上述 3 个集合中进行过滤

【问题讨论】:

    标签: marklogic


    【解决方案1】:

    是的。见:https://docs.marklogic.com/guide/search-dev/collections (由 google 为“MarkLogic Collections”找到)

    【讨论】:

    • 请记住,MongoDB 集合更像是 MarkLogic 中的目录。一个文档只能是 MongoDB 中一个集合的一部分,但可以是 MarkLogic 中多个集合的一部分。如果您希望每个文档一次成为一个“集合”的一部分,请使用 MarkLogic 中的目录。
    猜你喜欢
    • 1970-01-01
    • 2017-05-24
    • 2022-01-18
    • 2016-08-14
    • 1970-01-01
    • 1970-01-01
    • 2012-01-24
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多