I didn't get it,

I am In CQ  (Source database), I got the URI which I need to move , I created a 
variable

Let $doc:= fn:doc($uri)

Now I need to save this $doc to destination data base , how I can connect to 
destination data-base when I am in source data-base.

One way looks to me, write some .net/Java code call XQRY to source data-base, 
get the result and dump it to destination data-base


I tried something like this
xdmp:document-insert(
   $newuri,
   $doc,
   xdmp:default-permissions(),
   xdmp:default-collections(),
   0,
   11130048076528179319
)

Getting error
Specified forest 11130048076528179319 not in database

Which is true. Any other suggestion.

~Gurbeer

From: [email protected] 
[mailto:[email protected]] On Behalf Of Tim Meagher
Sent: Monday, February 11, 2013 4:33 PM
To: 'MarkLogic Developer Discussion'
Subject: Re: [MarkLogic Dev General] How to move content from one data base 
toanother

What I did was to create a xdmp:get utility that 1st acquires the list of URIs 
that I want to extract from the source database - note that I have custom code 
on the source server which reads request fields to determine exactly what 
content to return.  Next I iteratively spawn a utility that invokes a transform 
on the source server and returns the resulting document that I then insert 
using xdmp:document-insert to the local database.

Tim

________________________________
From: 
[email protected]<mailto:[email protected]>
 [mailto:[email protected]] On Behalf Of Singh, Gurbeer
Sent: Monday, February 11, 2013 2:18 PM
To: [email protected]<mailto:[email protected]>
Subject: [MarkLogic Dev General] How to move content from one data base 
toanother

Hi,

We have created two Database under a ML  instance.

Now we have to move some content from one data base to another , before moving 
we need to do apply some logic.

I was wondering how can use    xdmp:document-insert for this approach.



~Gurbeer

________________________________

NOTICE: Morgan Stanley is not acting as a municipal advisor and the opinions or 
views contained herein are not intended to be, and do not constitute, advice 
within the meaning of Section 975 of the Dodd-Frank Wall Street Reform and 
Consumer Protection Act. If you have received this communication in error, 
please destroy all electronic and paper copies and notify the sender 
immediately. Mistransmission is not intended to waive confidentiality or 
privilege. Morgan Stanley reserves the right, to the extent permitted under 
applicable law, to monitor electronic communications. This message is subject 
to terms available at the following link: 
http://www.morganstanley.com/disclaimers If you cannot access these links, 
please notify us by reply message and we will send the contents to you. By 
messaging with Morgan Stanley you consent to the foregoing.


________________________________

NOTICE: Morgan Stanley is not acting as a municipal advisor and the opinions or 
views contained herein are not intended to be, and do not constitute, advice 
within the meaning of Section 975 of the Dodd-Frank Wall Street Reform and 
Consumer Protection Act. If you have received this communication in error, 
please destroy all electronic and paper copies and notify the sender 
immediately. Mistransmission is not intended to waive confidentiality or 
privilege. Morgan Stanley reserves the right, to the extent permitted under 
applicable law, to monitor electronic communications. This message is subject 
to terms available at the following link: 
http://www.morganstanley.com/disclaimers If you cannot access these links, 
please notify us by reply message and we will send the contents to you. By 
messaging with Morgan Stanley you consent to the foregoing.
_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to