Hi Alex,
If you have a URI lexicon, you can look for URIs that end in "/",
something like:
cts:uri-match("*/")
Also, if you just want to see how many directories there are you can do
something like this:
xdmp:estimate(xdmp:document-properties()/prop:properties/prop:directory)
-Danny
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Alex Milowski
Sent: Thursday, July 05, 2012 11:27 AM
To: General Mark Logic Developer Discussion
Subject: [MarkLogic Dev General] Listing Directories?
I'm curious as to how certain directories get created in my database. I have:
23,135,073 documents
9,916 directories
I don't explicitly create directories in any of my import pipelines.
If I could list them (or some sampling of them), I might have a better
idea of where they are coming from.
In the documentation, there is an example:
for $x in xdmp:document-properties()/prop:properties/prop:directory
return <directory-uri>{xdmp:node-uri($x)}</directory-uri>
but that is a terrible idea if you have millions of documents.
Is there a way to get the directories directly somehow?
--
--Alex Milowski
"The excellence of grammar as a guide is proportional to the paucity of the
inflexions, i.e. to the degree of analysis effected by the language
considered."
Bertrand Russell in a footnote of Principles of Mathematics
_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general
_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general