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

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -