I've never run into a problem if you immediately follow the directory listing 
by a document-uri call like

http://xmlsh.svn.sourceforge.net/viewvc/xmlsh/extensions/marklogic/src/org/xmlsh/marklogic/list.xsh?revision=668&view=markup

xdmp:directory($dir)/base-uri()

I've done this over 10's of GB of data with no problems.

I don't believe the actual document data is fetched if you immedeatly follow it 
base-uri or similar uri function.  Only if you load it into a variable.



-----------------------------------------------------------------------------
David Lee
Lead Engineer
MarkLogic Corporation
[email protected]
Phone: +1 650-287-2531
Cell:  +1 812-630-7622
www.marklogic.com<http://www.marklogic.com/>

This e-mail and any accompanying attachments are confidential. The information 
is intended solely for the use of the individual to whom it is addressed. Any 
review, disclosure, copying, distribution, or use of this e-mail communication 
by others is strictly prohibited. If you are not the intended recipient, please 
notify us immediately by returning this message to the sender and delete all 
copies. Thank you for your cooperation.

From: [email protected] 
[mailto:[email protected]] On Behalf Of Danny Sinang
Sent: Monday, February 27, 2012 7:56 PM
To: [email protected]
Subject: Re: [MarkLogic Dev General] (1) Canceling XQuery requests, (2) 
Exploring Resource Hierarchy


Be careful though ... xdmp:directory() returns (not just lists) the documents 
in a directory.

If you have large files in your directory, then you could run into some memory 
problems.

I kept on running out of memory because I had a growing number of big zipfiles 
in the directory I was querying.

Regards,
Danny

On Feb 26, 2012, at 1:36 PM, Todd Gochenour 
<[email protected]<mailto:[email protected]>> wrote:

> (2) I found the XQuery for listing the files in a directory.  It reads:
>
> xdmp:directory('/analysis/')/xdmp:node-uri(.)
>
>
> _______________________________________________
> General mailing list
> [email protected]<mailto:[email protected]>
> http://developer.marklogic.com/mailman/listinfo/general

_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to