Revision [1284]

This is an old revision of MarkLogicList made by DavidLee on 2010-03-01 14:59:46.

 

Mark Logic Command: list

Lists all documents in a Mark Logic server

Synopsis

list [options] [directory ...]

Description

Lists documents residing on a Mark Logic server and outputs to stdout.
With no directory arguement it lists all documents. This might exceed the server's memory.
With directory arguments then the list is constrained to documents in that directory.



-c,-connect uriUse the connection string instead of $MLCONNECT
-rrecurse
directoryOptional directory to list


Example

Assuming the prefix "ml" is imported as the marklogic module, prints to stdout (one uri per line) all the documents in the database.

ml:list


Implementation


list is implemented as a simple xsh script which simply calls query. The source of the script is

if [ $# -eq 0 ] ; then 
	:query -q 'collection()/base-uri()'
else
	for dir in $* ; do
	:query -q <{{
declare variable $dir external;
xdmp:directory($dir)/base-uri()
}}> -v dir $dir
done
fi


To list directories in a directory see listdir





MarkLogic Extension Module

There are no comments on this page.
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki