I have developed a javascript which uses cts.search on Marklogic host and returns a json. I want to save this document into a unix host location. Thanks in advance.
Asked
Active
Viewed 37 times
1
-
So basically you want to save a JSON locally on your Server. That should be no big deal. What have you tried? What did not work? – Torf Jul 07 '20 at 17:52
-
https://docs.marklogic.com/xdmp.save – Mike Gardner Jul 07 '20 at 17:55
-
Thanks @MichaelGardner, it worked. – TanuAgrawal Jul 08 '20 at 15:35
1 Answers
4
xdmp.save
can save the document to the file system where MarkLogic is running. If you want to save it somewhere else, you'll need to make an HTTP call from there and run a search, then save the results with whatever you use to make the HTTP call.
If that doesn't address what you're looking for, please expand your question so we know better what you're trying to accomplish.

Mads Hansen
- 63,927
- 12
- 112
- 147

Dave Cassel
- 8,352
- 20
- 38
-
Great! Please mark this answer as "Accepted" to get it off the unanswered list – Dave Cassel Jul 09 '20 at 16:23