我正在尝试使用ML7中的marklogic内容泵。从站点下载的mlcp试图加载一个xml。
从Marklogic文档:下面的示例从本地文件系统目录/space/bill/data加载文件:
mlcp.sh导入-host localhost -port 8006 -username用户\ -password passwd -input_file_path /space/bill/data -mode local
但它给了我在-input_file_path上的完整路径。
我的mlcp调用:
./mlcp.sh导入-host localhost -port 18041 -username xxxx -password 'xxxxx‘-mode本地-streaming -document_type XML -input_file_path文件:/home/hugo/工作区/oplage/data -output_uri_prefix /data/map
根据文档,这将给我一个文件uri,如
/数据/地图/文件名
我尝试了很多事情,最后把我想要载入的文件放到我的操作系统的根目录中,这使我得到了想要的结果……
看起来mlcp一直使用默认uri作为我试图从操作系统插入的文档的完整路径.
问:如何控制文档uri,使其给出所需的URI?
发布于 2014-04-01 17:20:59
我认为output_uri_prefix需要与另一个选项结合使用,如output_uri_replace、aggregate_uri_id等。
我倾向于使用output_uri_replace;在您的示例中,-output_uri_replace "^.*/workspace,''"似乎会为您提供以/data开头的URI。
https://stackoverflow.com/questions/22791881
复制相似问题