Sini,

There are reasons to explicitly store different data to different forests, but 
the easiest and most common way to use MarkLogic is to set up your forests and 
then not worry about them while coding. MarkLogic makes physical layout 
transparent with respect to both forests and clustering unless you are doing 
something very advanced.

You can add documents to collections or directories and use 
xdmp:collection-delete() or xdmp:directory-delete() to remove them. These 
deletes will operate in "fast mode" if the conditions listed here are met: 
http://markmail.org/message/diaubvgbod75xvnx (manual directory creation, no 
triggers, no explicit long-term locks). Normal document inserts will distribute 
the content transparently to whatever forests you have, which helps for 
parallelism of queries and is generally a good thing that you should not 
struggle against.

This is different from many systems where the developer is burdened by sharding 
code and managing the locations of documents explicitly, so you may find it 
much easier.

Yours,
Damon

--
Damon Feldman
Sr. Principal Consultant, MarkLogic


From: [email protected] 
[mailto:[email protected]] On Behalf Of sini narayanan
Sent: Wednesday, May 15, 2013 2:25 AM
To: MarkLogic Developer Discussion
Subject: [MarkLogic Dev General] Attaching more than one forest to a DB in ML

Hi,

I have a DB created in ML. And have a Forest(F1) attached to the DB.
All the documents published from the source S1 is now in the DB.

A new source S2 will also be publishing documents into the same DB.
But I donot want these documents in the same forest.

I want a new forest (F2) to be created for the same DB and then publish 
documents into this forest,
so that in case I need to purge only the S2 documents, I can just delete the 
forest.

I have tried the above scenario. The DB already had 26002 documents. I created 
new Forest F2.
And then using xdmp:document-insert, I loaded a document into the DB specifying 
the new F2 ID.
The document got inserted and now the DB have 26003 documents.
After this I detached the forest F2 from the DB and performed an 
admin:forest-delete on F2.
After that when I explore, I have only 12953 docs. Why is that so? Am I doing 
something wrong here?

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

Reply via email to