Hi Darren,
When you load documents into a database, unless you explicitly state the
forest to which it is loaded (with a forest placement key), the system
will automatically choose a forest for each document during the load
process (this explains why you see "the forests randomly increment their
document count").
How did these documents get in the MDCOL collection? You can do that
upon load or after load with xdmp:document-set-collections. If the
following query against the MDE database returns 0:
xdmp:estimate(fn:collection("MDCOL"))
it means there are no documents in that collection named MDCOL. Your
query seems like it should return all the document in the collection
(although I am not good at java string escaping...). Maybe there are
actually no documents in that collection? Maybe the name was
misspelled, either on load or on query?
-Danny
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Darren
Govoni
Sent: Friday, August 08, 2008 10:04 AM
To: General Mark Logic Developer Discussion
Subject: [MarkLogic Dev General] Forests and Collections querying
problem
Hi,
I want to store a document in a forest and collection. The document is
part of a collection "MDCOL". I currently have 2 forests associated with
my database MDE - they are "MDR" and "MDC". When I connect through XCC
(to the MDE database) and store a document labeled for the "MDC"
collection. I see the forests randomly increment their document count.
Sometimes its the MDR forest, sometimes the MDC. Furthermore, when I
query for all documents in the MDCOL collection, I get none.
Request request = session.newAdhocQuery ("for $doc in
fn:collection(\"MDCOL\") return $doc",options);
The documentation didn't explain querying collections well enough
to solve this in short period. Can someone offer a tip?
thank you,
Darren
_______________________________________________
General mailing list
[email protected]
http://xqzone.com/mailman/listinfo/general
_______________________________________________
General mailing list
[email protected]
http://xqzone.com/mailman/listinfo/general