MarkLogic Directory with backslash -
currently several documents has been loaded marklogic wrong file separator "\" (backslash) given below.
\test\fldr1\fldr2\fldr3\test.xml \test\fldr1\fldr2\fldr3\test1.xml \test\fldr1\fldr2\fldr3\test2.xml
when try perform,
cts:directory-query("\test\fldr1\fldr2\fldr3\", "1")
i getting below error.
directory uri must end "/"
kindly let me know how proceed on issue.
with uris, marklogic isn't seeing directories, directory query isn't going work escaping backslashes. directory queries, you'll need re-insert them. can use code if there aren't many:
(: test in environment before running! :) $uri in cts:uri-match('\*') return ( xdmp:document-insert( fn:replace($uri, '\\', '/'), fn:doc($uri), xdmp:document-get-permissions($uri), xdmp:document-get-collections($uri) ), xdmp:document-delete($uri) )
depending on how many documents have, might able in query console. if not, either increase transaction time limit or take @ corb2.
Comments
Post a Comment