Hi Akila,

> Here is an issue we've been trying to resolve for quite some time now.
>
> 1)How would you suggest performing File and Folder search in
> Mark Logic Database.

It sounds like you are using MarkLogic Server as a file storage. There are 
cheaper solutions when just doing that. ;-)

But yes, it is possible to restrict search results on uri patterns and 
directories:

For retrieving matches for particular uri patterns, use cts:uri-match, which 
requires that the URI Lexicon option is enabled in the database. For searching 
documents within a particular subdirectory, use cts:directory-query. For 
searching for documents that match a particular uri pattern, use 
cts:document-query.

These and many more query functions are described here: 
http://developer.marklogic.com/pubs/4.1/apidocs/Search.html

> 2)1)How to generate a Tree Structure of directories and files
> from the Mark Logic database.

A database can contain many documents, so it might not be smart to generate one 
big tree for an entire database.
Retrieving file listings for particular directories can be done easily using 
cts:uris, cts:uri-match, xdmp:directory, or xdmp:directory-properties. The last 
of these allows distinguishing between directories and files as described in 
the documentation: 
http://developer.marklogic.com/pubs/4.1/apidocs/Ext-9.html#xdmp:directory-properties

Hope that helps!

Kind regards,
Geert


Drs. G.P.H. Josten
Consultant


http://www.daidalos.nl/
Daidalos BV
Source of Innovation
Hoekeindsehof 1-4
2665 JZ Bleiswijk
Tel.: +31 (0) 10 850 1200
Fax: +31 (0) 10 850 1199
http://www.daidalos.nl/
KvK 27164984
De informatie - verzonden in of met dit emailbericht - is afkomstig van 
Daidalos BV en is uitsluitend bestemd voor de geadresseerde. Indien u dit 
bericht onbedoeld hebt ontvangen, verzoeken wij u het te verwijderen. Aan dit 
bericht kunnen geen rechten worden ontleend.



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

Reply via email to