Re: [MarkLogic Dev General] False positives with element-query

2015-07-24 Thread Basavaraj Kalloli
Hi Erik,

Brilliant you were bang on !! The indexes that I had added were on element
positions and word positions which dont help here. We needed the position
indexes on the path range indexes. After setting these up it works like a
charm :)

Super thanks for the help !! Late Friday here but this makes my weekend
even better now !!


On Fri, Jul 24, 2015 at 9:26 PM, Erik Hennum 
wrote:

>  Hi, Basavaraj:
>
> The element word, value, and range positions are all configured
> separately.  Since you're using element range queries, you would have to
> turn on element range value positions (which are configured on the same
> form that creates the element range index).
>
> >From your answer, it sounds like you turned on element word positions,
> but maybe I'm misreading.
>
>
>   Erik Hennum
>
>--
> *From:* general-boun...@developer.marklogic.com [
> general-boun...@developer.marklogic.com] on behalf of Basavaraj Kalloli [
> basavarajkall...@gmail.com]
> *Sent:* Friday, July 24, 2015 8:13 AM
> *To:* MarkLogic Developer Discussion
> *Subject:* Re: [MarkLogic Dev General] False positives with element-query
>
>   Hi Erik
>
> Yeap we did try the position indexes for element and word positions but
> that still doesn't solve it. I believe Marklogic doesn't have any
> hierarchical indexes as in indexes for values located within the same
> element.
> On Jul 24, 2015 6:04 PM, "Erik Hennum"  wrote:
>
>>  Hi, Basavaraj:
>>
>>  The best approach if at all possible is to put each size data row in a
>> separate document instead of putting a size data table in a document.
>> That's a general recommendation for MarkLogic: treat a document as a row
>> and a collection as a table.  Then, the unfiltered indexes will yield the
>> rows you want.
>>
>>  Did you try turning on range value positions for your range indexes?
>>
>>
>>  Hoping that helps,
>>
>>
>>Erik Hennum
>>
>>--
>> *From:* general-boun...@developer.marklogic.com [
>> general-boun...@developer.marklogic.com] on behalf of Basavaraj Kalloli [
>> basavarajkall...@gmail.com]
>> *Sent:* Friday, July 24, 2015 3:04 AM
>> *To:* MarkLogic Developer Discussion
>> *Subject:* [MarkLogic Dev General] False positives with element-query
>>
>>   Hi,
>>
>>  We have a requirement where we need to search for min and max values
>> which should occur within an element
>>
>>  For eg:
>>
>>  
>>
>>   12000
>>   12000
>>   12000
>>
>>
>>   3500
>>   3500
>>   3500
>>
>>
>>
>>  Given the above xml we need to search for min and max values in the
>> range: 4000 and 5000. Now we have a element-query as:
>>
>>  import module namespace search = "http://marklogic.com/appservices/search"; 
>> at "/MarkLogic/appservices/search/search.xqy";
>> let $size-min-query := cts:element-range-query(xs:QName("SIZE_MIN"),
>> "<=", xs:double(4000), (), 0)let $size-max-query := 
>> cts:element-range-query(xs:QName("SIZE_MAX"),
>> ">=", xs:double(5000), (), 0)let $and-query := 
>> cts:and-query(($size-min-query, $size-max-query))let $q := 
>> cts:element-query(xs:QName("SIZEDATA"), $and-query)let $options :=
>> http://marklogic.com/appservices/search";>
>> unfiltered
>> true
>> 
>> return search:resolve({$q}/node(), $options)
>>
>>
>> If we run the above query this returns the document but ideally it shouldnt 
>> because the element's i.e SIZEDATA doesnt satisfy the range. If I change the 
>> options to use filtered search this works. We tried setting up element 
>> positions and word positions to on but still we still have false positive.
>>
>> Any pointers or any other indexes which can help us?
>>
>>
>> ___
>> 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
>
>
___
General mailing list
General@developer.marklogic.com
Manage your subscription at: 
http://developer.marklogic.com/mailman/listinfo/general


Re: [MarkLogic Dev General] False positives with element-query

2015-07-24 Thread Erik Hennum
Hi, Basavaraj:

The element word, value, and range positions are all configured separately.  
Since you're using element range queries, you would have to turn on element 
range value positions (which are configured on the same form that creates the 
element range index).

>From your answer, it sounds like you turned on element word positions, but 
>maybe I'm misreading.


Erik Hennum


From: general-boun...@developer.marklogic.com 
[general-boun...@developer.marklogic.com] on behalf of Basavaraj Kalloli 
[basavarajkall...@gmail.com]
Sent: Friday, July 24, 2015 8:13 AM
To: MarkLogic Developer Discussion
Subject: Re: [MarkLogic Dev General] False positives with element-query


Hi Erik

Yeap we did try the position indexes for element and word positions but that 
still doesn't solve it. I believe Marklogic doesn't have any hierarchical 
indexes as in indexes for values located within the same element.

On Jul 24, 2015 6:04 PM, "Erik Hennum" 
mailto:erik.hen...@marklogic.com>> wrote:
Hi, Basavaraj:

The best approach if at all possible is to put each size data row in a separate 
document instead of putting a size data table in a document.  That's a general 
recommendation for MarkLogic: treat a document as a row and a collection as a 
table.  Then, the unfiltered indexes will yield the rows you want.

Did you try turning on range value positions for your range indexes?


Hoping that helps,


Erik Hennum


From: 
general-boun...@developer.marklogic.com
 
[general-boun...@developer.marklogic.com]
 on behalf of Basavaraj Kalloli 
[basavarajkall...@gmail.com]
Sent: Friday, July 24, 2015 3:04 AM
To: MarkLogic Developer Discussion
Subject: [MarkLogic Dev General] False positives with element-query

Hi,

We have a requirement where we need to search for min and max values which 
should occur within an element

For eg:



   
  12000
  12000
  12000
   
   
  3500
  3500
  3500
   


Given the above xml we need to search for min and max values in the range: 4000 
and 5000. Now we have a element-query as:


import module namespace search = "http://marklogic.com/appservices/search"; at 
"/MarkLogic/appservices/search/search.xqy";

let $size-min-query := cts:element-range-query(xs:QName("SIZE_MIN"),
"<=", xs:double(4000), (), 0)
let $size-max-query := cts:element-range-query(xs:QName("SIZE_MAX"),
">=", xs:double(5000), (), 0)
let $and-query := cts:and-query(($size-min-query, $size-max-query))
let $q := cts:element-query(xs:QName("SIZEDATA"), $and-query)
let $options :=
http://marklogic.com/appservices/search";>
unfiltered
true


return search:resolve({$q}/node(), $options)


If we run the above query this returns the document but ideally it shouldnt 
because the element's i.e SIZEDATA doesnt satisfy the range. If I change the 
options to use filtered search this works. We tried setting up element 
positions and word positions to on but still we still have false positive.

Any pointers or any other indexes which can help us?

___
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


Re: [MarkLogic Dev General] False positives with element-query

2015-07-24 Thread Basavaraj Kalloli
Hi Erik

Yeap we did try the position indexes for element and word positions but
that still doesn't solve it. I believe Marklogic doesn't have any
hierarchical indexes as in indexes for values located within the same
element.
On Jul 24, 2015 6:04 PM, "Erik Hennum"  wrote:

>  Hi, Basavaraj:
>
>  The best approach if at all possible is to put each size data row in a
> separate document instead of putting a size data table in a document.
> That's a general recommendation for MarkLogic: treat a document as a row
> and a collection as a table.  Then, the unfiltered indexes will yield the
> rows you want.
>
>  Did you try turning on range value positions for your range indexes?
>
>
>  Hoping that helps,
>
>
>Erik Hennum
>
>--
> *From:* general-boun...@developer.marklogic.com [
> general-boun...@developer.marklogic.com] on behalf of Basavaraj Kalloli [
> basavarajkall...@gmail.com]
> *Sent:* Friday, July 24, 2015 3:04 AM
> *To:* MarkLogic Developer Discussion
> *Subject:* [MarkLogic Dev General] False positives with element-query
>
>   Hi,
>
>  We have a requirement where we need to search for min and max values
> which should occur within an element
>
>  For eg:
>
>  
>
>   12000
>   12000
>   12000
>
>
>   3500
>   3500
>   3500
>
>
>
>  Given the above xml we need to search for min and max values in the
> range: 4000 and 5000. Now we have a element-query as:
>
>  import module namespace search = "http://marklogic.com/appservices/search"; 
> at "/MarkLogic/appservices/search/search.xqy";
> let $size-min-query := cts:element-range-query(xs:QName("SIZE_MIN"),
> "<=", xs:double(4000), (), 0)let $size-max-query := 
> cts:element-range-query(xs:QName("SIZE_MAX"),
> ">=", xs:double(5000), (), 0)let $and-query := 
> cts:and-query(($size-min-query, $size-max-query))let $q := 
> cts:element-query(xs:QName("SIZEDATA"), $and-query)let $options :=
> http://marklogic.com/appservices/search";>
> unfiltered
> true
> 
> return search:resolve({$q}/node(), $options)
>
>
> If we run the above query this returns the document but ideally it shouldnt 
> because the element's i.e SIZEDATA doesnt satisfy the range. If I change the 
> options to use filtered search this works. We tried setting up element 
> positions and word positions to on but still we still have false positive.
>
> Any pointers or any other indexes which can help us?
>
>
> ___
> 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


Re: [MarkLogic Dev General] False positives with element-query

2015-07-24 Thread Erik Hennum
Hi, Basavaraj:

The best approach if at all possible is to put each size data row in a separate 
document instead of putting a size data table in a document.  That's a general 
recommendation for MarkLogic: treat a document as a row and a collection as a 
table.  Then, the unfiltered indexes will yield the rows you want.

Did you try turning on range value positions for your range indexes?


Hoping that helps,


Erik Hennum


From: general-boun...@developer.marklogic.com 
[general-boun...@developer.marklogic.com] on behalf of Basavaraj Kalloli 
[basavarajkall...@gmail.com]
Sent: Friday, July 24, 2015 3:04 AM
To: MarkLogic Developer Discussion
Subject: [MarkLogic Dev General] False positives with element-query

Hi,

We have a requirement where we need to search for min and max values which 
should occur within an element

For eg:



   
  12000
  12000
  12000
   
   
  3500
  3500
  3500
   


Given the above xml we need to search for min and max values in the range: 4000 
and 5000. Now we have a element-query as:


import module namespace search = "http://marklogic.com/appservices/search"; at 
"/MarkLogic/appservices/search/search.xqy";

let $size-min-query := cts:element-range-query(xs:QName("SIZE_MIN"),
"<=", xs:double(4000), (), 0)
let $size-max-query := cts:element-range-query(xs:QName("SIZE_MAX"),
">=", xs:double(5000), (), 0)
let $and-query := cts:and-query(($size-min-query, $size-max-query))
let $q := cts:element-query(xs:QName("SIZEDATA"), $and-query)
let $options :=
http://marklogic.com/appservices/search";>
unfiltered
true


return search:resolve({$q}/node(), $options)


If we run the above query this returns the document but ideally it shouldnt 
because the element's i.e SIZEDATA doesnt satisfy the range. If I change the 
options to use filtered search this works. We tried setting up element 
positions and word positions to on but still we still have false positive.

Any pointers or any other indexes which can help us?
___
General mailing list
General@developer.marklogic.com
Manage your subscription at: 
http://developer.marklogic.com/mailman/listinfo/general


[MarkLogic Dev General] False positives with element-query

2015-07-24 Thread Basavaraj Kalloli
Hi,

We have a requirement where we need to search for min and max values which
should occur within an element

For eg:


   
  12000
  12000
  12000
   
   
  3500
  3500
  3500
   


Given the above xml we need to search for min and max values in the range:
4000 and 5000. Now we have a element-query as:

import module namespace search =
"http://marklogic.com/appservices/search"; at
"/MarkLogic/appservices/search/search.xqy";
let $size-min-query := cts:element-range-query(xs:QName("SIZE_MIN"),
"<=", xs:double(4000), (), 0)let $size-max-query :=
cts:element-range-query(xs:QName("SIZE_MAX"),
">=", xs:double(5000), (), 0)let $and-query :=
cts:and-query(($size-min-query, $size-max-query))let
$q := cts:element-query(xs:QName("SIZEDATA"), $and-query)let $options
:=
http://marklogic.com/appservices/search";>
unfiltered
true

return search:resolve({$q}/node(), $options)


If we run the above query this returns the document but ideally it
shouldnt because the element's i.e SIZEDATA doesnt satisfy the range.
If I change the options to use filtered search this works. We tried
setting up element positions and word positions to on but still we
still have false positive.

Any pointers or any other indexes which can help us?
___
General mailing list
General@developer.marklogic.com
Manage your subscription at: 
http://developer.marklogic.com/mailman/listinfo/general


Re: [MarkLogic Dev General] Query Result Downloading (QConsole)

2015-07-24 Thread Andreas Hubmer
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 :

> 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 
> 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 :
>>
>>>  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(
>>>
>>>
>>>
>>>  mimetype
>>>
>>> result.xml
>>>
>>>   ,
>>>
>>> (document { "application/epub+zip" },
>>>
>>>  {$resultData}
>>>
>>>  ))
>>>
>>> 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 , @dmcassel
>>> 
>>> Technical Community Manager
>>>
>>> MarkLogic Corporation 
>>>
>>> http://developer.marklogic.com/
>>>
>>>
>>>
>>>
>>>
>>> *From: * on behalf of Andreas
>>> Hubmer 
>>> *Reply-To: *MarkLogic Developer Discussion <
>>> general@developer.marklogic.com>
>>> *Date: *Thursday, July 23, 2015 at 8:48 AM
>>> *To: *MarkLogic Developer Discussion 
>>> *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 :
>>>
>>> You can save the result in your local system using xdmp:save function
>>>
>>> On Jul 23, 2015 6:02 PM, "Andreas Hubmer" 
>>> 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 confident

Re: [MarkLogic Dev General] Query Result Downloading (QConsole)

2015-07-24 Thread David Ennis
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  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 :
>
>>  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(
>>
>>
>>
>>  mimetype
>>
>> result.xml
>>
>>   ,
>>
>> (document { "application/epub+zip" },
>>
>>  {$resultData}
>>
>>  ))
>>
>> 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 , @dmcassel
>> 
>> Technical Community Manager
>>
>> MarkLogic Corporation 
>>
>> http://developer.marklogic.com/
>>
>>
>>
>>
>>
>> *From: * on behalf of Andreas
>> Hubmer 
>> *Reply-To: *MarkLogic Developer Discussion <
>> general@developer.marklogic.com>
>> *Date: *Thursday, July 23, 2015 at 8:48 AM
>> *To: *MarkLogic Developer Discussion 
>> *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 :
>>
>> You can save the result in your local system using xdmp:save function
>>
>> On Jul 23, 2015 6:02 PM, "Andreas Hubmer" 
>> 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

Re: [MarkLogic Dev General] Query Result Downloading (QConsole)

2015-07-24 Thread Andreas Hubmer
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 :

>  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(
>
>
>
>  mimetype
>
> result.xml
>
>   ,
>
> (document { "application/epub+zip" },
>
>  {$resultData}
>
>  ))
>
> 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 , @dmcassel
> 
> Technical Community Manager
>
> MarkLogic Corporation 
>
> http://developer.marklogic.com/
>
>
>
>
>
> *From: * on behalf of Andreas
> Hubmer 
> *Reply-To: *MarkLogic Developer Discussion <
> general@developer.marklogic.com>
> *Date: *Thursday, July 23, 2015 at 8:48 AM
> *To: *MarkLogic Developer Discussion 
> *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 :
>
> You can save the result in your local system using xdmp:save function
>
> On Jul 23, 2015 6:02 PM, "Andreas Hubmer" 
> 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