简体   繁体   English

MarkLogic内容泵mlcp文档URI问题

[英]MarkLogic content pump mlcp document URI issue

I am tring to use the marklogic content pump in ML 7. Downloaded mlcp from site trying to load one xml. 我想在ML 7中使用marklogic内容泵。从网站下载mlcp试图加载一个xml。

From Marklogic documentation : The following example loads files from the local filesystem directory /space/bill/data: Marklogic文档 :以下示例从本地文件系统目录/ space / bill / data加载文件:

mlcp.sh import -host localhost -port 8006 -username user \\ -password passwd -input_file_path /space/bill/data -mode local mlcp.sh import -host localhost -port 8006 -username user \\ -password passwd -input_file_path / space / bill / data -mode local

but it gives me the full path on the -input_file_path. 但它给了我-input_file_path的完整路径。

My mlcp invocation: 我的mlcp调用:

./mlcp.sh import -host localhost -port 18041 -username xxxx -password 'xxxxx' -mode local -streaming -document_type XML -input_file_path file:/home/hugo/workspace/oplage-mapping/data -output_uri_prefix /data/map ./mlcp.sh import -host localhost -port 18041 -username xxxx -password'xxxxx'-mode local -streaming -document_type XML -input_file_path文件:/ home / hugo / workspace / oplage-mapping / data -output_uri_prefix / data / map

According to the documentation this would give me a document uri like 根据文档,这将给我一个uri的文件

/data/map/filename /数据/地图/文件名

I tried a lot of things, finally putting the file that i wanted to load in the root of my OS which got me the desired result... 我尝试了很多东西,最后把我想加载的文件放在我操作系统的根目录中,这得到了我想要的结果......

Looks like mlcp keeps using the default uri as the full path of the document I am trying to insert from the OS... 看起来mlcp继续使用默认的uri作为我试图从OS插入的文档的完整路径...

Question: How can I control the document uri so that it gives me the desired URI? 问题:如何控制文档uri以便它为我提供所需的URI?

I believe that output_uri_prefix needs to be used in conjunction with another option, such as output_uri_replace , aggregate_uri_id , etc. 我相信output_uri_prefix需要与另一个选项一起使用,例如output_uri_replaceaggregate_uri_id等。

I tend to use output_uri_replace ; 我倾向于使用output_uri_replace ; in your case, it looks like -output_uri_replace "^.*/workspace,''" would give you URIs starting with /data . 在你的情况下,它看起来像-output_uri_replace "^.*/workspace,''"会给你以/data开头的URI。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM