Thanks a lot, that is quite near to what I've been looking for!
Andreas

2015-07-24 11:16 GMT+02:00 David Ennis <david.en...@hinttech.com>:

> This is a bit cumbersome and digs into the internals of queryConsole a
> bit, but it is once workable solution (even if its a bit of a **sharp
> tool**). ***Not any production ready solution***, but I sometimes use it to
> view documents in the database in my browser when troubleshooting.
>
> *Query Console:*
> Every request includes a request parameter sid
> - this relates to the current tab in your query browser (and in that case,
> the database selected as well).
> Query console also has en endpoint: /qconsole/endpoints/view.xqy (used
> mostly for viewing binary content when you click on the URI)
>
> *Process:*
> So, if you were to:
> 1) save the results into an XML node in the same database via xquery
> example: xdmp:document-insert("/temp/results.xml", cts:search('foo'))
>
> ​2) Understand what your sid is for the current query console (​it is
> passed with the requests)
> Lets pretend mine is 12345
>
> Then(based on sample parameters above) you could hit the endpoint:
> /qconsole/endpoints/view.xqy?sid=12345&uri=/tmp/results.xml
>
>
> Kind Regards,
> David Ennis
>
>
> David Ennis
> *Content Engineer*
> *​HintTech*
>
> *​*
> On 24 July 2015 at 10:08, Andreas Hubmer <andreas.hub...@ebcont.com>
> wrote:
>
>> Thanks for the suggestion. As far as I know I would need an HTTP app
>> server to perform the download.
>>
>> What I am looking for is an ad-hoc method to download the results of a
>> query in the query console.
>>
>> Cheers,
>> Andreas
>>
>> 2015-07-23 15:50 GMT+02:00 <rajamani.marimu...@cognizant.com>:
>>
>>>  Hi Andreas,
>>>
>>>
>>>
>>> You can also use the Zip option , this will download your xml  into your
>>> local file system in zip file.
>>>
>>>
>>>
>>> let $zip := xdmp:zip-create(
>>>
>>>                <parts xmlns="xdmp:zip">
>>>
>>>                  <part>mimetype</part>
>>>
>>>             <part>result.xml</part>
>>>
>>>               </parts>,
>>>
>>>             (document { "application/epub+zip" },
>>>
>>>                  <result>{$resultData}
>>>
>>> </result>                 ))
>>>
>>> return
>>>
>>> ( xdmp:set-response-content-type("application/zip"),
>>>
>>>
>>>
>>> $zip)
>>>
>>>
>>>
>>>
>>>
>>> Thanks and regards
>>>
>>> Raja >>>
>>>
>>>
>>>
>>> *From:* general-boun...@developer.marklogic.com [mailto:
>>> general-boun...@developer.marklogic.com] *On Behalf Of *Dave Cassel
>>> *Sent:* Thursday, July 23, 2015 6:29 PM
>>> *To:* MarkLogic Developer Discussion
>>>
>>> *Subject:* Re: [MarkLogic Dev General] Query Result Downloading
>>> (QConsole)
>>>
>>>
>>>
>>> To be precise, xdmp:save() will write to the file system of the server
>>> where it's running; that might or might not be your local, depending on
>>> where MarkLogic is running. If it's remote, it will write to that server,
>>> and you can download the files from there (assuming you have access).
>>>
>>>
>>>
>>> --
>>>
>>> Dave Cassel <http://davidcassel.net>, @dmcassel
>>> <https://twitter.com/dmcassel>
>>> Technical Community Manager
>>>
>>> MarkLogic Corporation <http://www.marklogic.com/>
>>>
>>> http://developer.marklogic.com/
>>>
>>>
>>>
>>>
>>>
>>> *From: *<general-boun...@developer.marklogic.com> on behalf of Andreas
>>> Hubmer <andreas.hub...@ebcont.com>
>>> *Reply-To: *MarkLogic Developer Discussion <
>>> general@developer.marklogic.com>
>>> *Date: *Thursday, July 23, 2015 at 8:48 AM
>>> *To: *MarkLogic Developer Discussion <general@developer.marklogic.com>
>>> *Subject: *Re: [MarkLogic Dev General] Query Result Downloading
>>> (QConsole)
>>>
>>>
>>>
>>>   True, that is an option. Thanks!
>>>
>>>
>>>
>>> 2015-07-23 14:43 GMT+02:00 DK Singh <dharam.m...@gmail.com>:
>>>
>>> You can save the result in your local system using xdmp:save function
>>>
>>> On Jul 23, 2015 6:02 PM, "Andreas Hubmer" <andreas.hub...@ebcont.com>
>>> wrote:
>>>
>>>    Hello,
>>>
>>> Is there a possibility to download the result of a query instead of
>>> displaying it in the Query Console? Sometimes the result is just too big.
>>>
>>> Best regards,
>>>
>>> Andreas
>>>
>>>
>>> --
>>>
>>> Andreas Hubmer
>>>
>>> IT Consultant
>>>
>>>
>>>
>>> Web: http://www.ebcont.com
>>>
>>>
>>>
>>> OUR TEAM IS YOUR SUCCESS
>>>
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>> General mailing list
>>> General@developer.marklogic.com
>>> Manage your subscription at:
>>> http://developer.marklogic.com/mailman/listinfo/general
>>>
>>>
>>> _______________________________________________
>>> General mailing list
>>> General@developer.marklogic.com
>>> Manage your subscription at:
>>> http://developer.marklogic.com/mailman/listinfo/general
>>>
>>>
>>>
>>>
>>> --
>>>
>>> Andreas Hubmer
>>>
>>> IT Consultant
>>>
>>>
>>>
>>> EBCONT enterprise technologies GmbH
>>>
>>> Millennium Tower
>>>
>>> Handelskai 94-96
>>>
>>> A-1200 Vienna
>>>
>>>
>>>
>>> Mobile: +43 664 60651861
>>>
>>> Fax: +43 2772 512 69-9
>>>
>>> Email: andreas.hub...@ebcont.com
>>>
>>> Web: http://www.ebcont.com
>>>
>>>
>>>
>>> OUR TEAM IS YOUR SUCCESS
>>>
>>>
>>>
>>> UID-Nr. ATU68135644
>>>
>>> HG St.Pölten - FN 399978 d
>>>
>>>  This e-mail and any files transmitted with it are for the sole use of
>>> the intended recipient(s) and may contain confidential and privileged
>>> information. If you are not the intended recipient(s), please reply to the
>>> sender and destroy all copies of the original message. Any unauthorized
>>> review, use, disclosure, dissemination, forwarding, printing or copying of
>>> this email, and/or any action taken in reliance on the contents of this
>>> e-mail is strictly prohibited and may be unlawful. Where permitted by
>>> applicable law, this e-mail and other e-mail communications sent to and
>>> from Cognizant e-mail addresses may be monitored.
>>>
>>> _______________________________________________
>>> General mailing list
>>> General@developer.marklogic.com
>>> Manage your subscription at:
>>> http://developer.marklogic.com/mailman/listinfo/general
>>>
>>>
>>
>>
>> --
>> Andreas Hubmer
>> IT Consultant
>>
>> EBCONT enterprise technologies GmbH
>> Millennium Tower
>> Handelskai 94-96
>> A-1200 Vienna
>>
>> Mobile: +43 664 60651861
>> Fax: +43 2772 512 69-9
>> Email: andreas.hub...@ebcont.com
>> Web: http://www.ebcont.com
>>
>> OUR TEAM IS YOUR SUCCESS
>>
>> UID-Nr. ATU68135644
>> HG St.Pölten - FN 399978 d
>>
>> _______________________________________________
>> General mailing list
>> General@developer.marklogic.com
>> Manage your subscription at:
>> http://developer.marklogic.com/mailman/listinfo/general
>>
>>
>
> _______________________________________________
> General mailing list
> General@developer.marklogic.com
> Manage your subscription at:
> http://developer.marklogic.com/mailman/listinfo/general
>
>


-- 
Andreas Hubmer
IT Consultant

EBCONT enterprise technologies GmbH
Millennium Tower
Handelskai 94-96
A-1200 Vienna

Mobile: +43 664 60651861
Fax: +43 2772 512 69-9
Email: andreas.hub...@ebcont.com
Web: http://www.ebcont.com

OUR TEAM IS YOUR SUCCESS

UID-Nr. ATU68135644
HG St.Pölten - FN 399978 d
_______________________________________________
General mailing list
General@developer.marklogic.com
Manage your subscription at: 
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to