1

我正在通过 MLCP 将 JSON 文档加载到 MarkLogic 数据库中。我的输入文件是一个行分隔的 JSON 文件。默认情况下,我的 URI 采用路径/文件名/split_start_seqnum 的形式。我希望 URI 包含特定文档的两个元素的值。

例如,每个文档代表一家餐厅,并且有诸如 restaurant_name、restaurant_zip、restaurant_hours 等元素。我希望 URI 是 restaurant_name 和 restaurant_zip 的某种组合。如何在 MLCP 脚本中对其进行编码?

4

1 回答 1

0

The -output_uri_replace can be useful to make more static changes to the uri with regex patterns, but doesn't allow pulling values from content. Best approach for this would be to use MLCP Transforms.

This SO answer provides an example, and some pointers to documentation:

Using Transform Module during MLCP Ingestion to MarkLogic

HTH!

于 2019-01-07T10:11:42.287 回答