[英]MarkLogic: Move document from one directory to another on some condition
I'm new to MarkLogic and trying to implement following scenario with its Java API: 我是MarkLogic的新手,并尝试使用其Java API实现以下方案:
For each user I'll have two directories, something like: 对于每个用户,我将有两个目录,例如:
1.1. 1.1。 user1/xmls/recent/
user1 / xmls / recent /
1.2. 1.2。 user1/xmls/archived/
user1 / xmls / archived /
Questions are: 问题是:
I'm open to any suggestions and comments (as I said I'm new to MarkLogic and maybe my thoughts on how to handle described scenario are completely wrong). 我乐于接受任何建议和评论(正如我所说的,我是MarkLogic的新手,也许我对如何处理所描述场景的想法是完全错误的)。
Personally I would skip all the hassle with separate directories as well as collections. 就个人而言,我会跳过所有带有单独目录和集合的麻烦。 You would endlessly have to move files around, or changes their properties.
您将无休止地移动文件或更改文件的属性。 It would be much easier to not calculate anything up front, and simply use lastModified property, or something alike, to determine most recent items at run-time.
不预先计算任何东西,而仅使用lastModified属性或类似方法来确定运行时的最新项目会容易得多。
HTH! HTH!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.