I'm not sure I completely understand this issue, but you should be able to get 
all documents in a collection with /v1/search endpoint with collection 
parameter. https://docs.marklogic.com/REST/GET/v1/search

Vitaly Korolev
Staff QA Engineer
MarkLogic Corporation

On Jan 9, 2017, at 14:29, Bhushan Suryawanshi 
<[email protected]<mailto:[email protected]>> wrote:

Hi Geert,

Thanks for your reply,

We already have a system in place where, We consider each collection as a root 
node and every document under that collection would be its child elements.
We have a requirement to query each and every document in that collection and 
fetch the distinct and non-distinct attributes along with its values.

As per some of my previous emails , I was also looking for an way to get all 
the attribute names under a document.

Thanks & Regards,
Bhushan Suryawanshi

From: 
[email protected]<mailto:[email protected]>
 [mailto:[email protected]] On Behalf Of Geert Josten
Sent: Monday, January 9, 2017 11:09 AM
To: MarkLogic Developer Discussion 
<[email protected]<mailto:[email protected]>>
Subject: Re: [MarkLogic Dev General] Query: List all the documents in a 
collection

Hi Bhushan,

I’d be curious to hear why you’d like a full list of doc uris. If you are using 
that list to limit results in a later stage, then there might be better ways to 
do it.

It is doable though. You’ll need a `values` option definition. Use `<uri/>` 
instead of `<range>…`. It is one of the examples listed in the docs: 
http://docs.marklogic.com/guide/search-dev/appendixa#id_46397


  <values name="uris">

    <uri/>

  </values>


After deploying that you should be able to use it with the values endpoint 
(http://docs.marklogic.com/REST/GET/v1/values/[name]<http://docs.marklogic.com/REST/GET/v1/values/%5Bname%5D>)
 with something like: http://server:port/v1/values/uris?collection=mycoll

Cheers,
Geert

From: 
<[email protected]<mailto:[email protected]>>
 on behalf of Bhushan Suryawanshi 
<[email protected]<mailto:[email protected]>>
Reply-To: MarkLogic Developer Discussion 
<[email protected]<mailto:[email protected]>>
Date: Monday, January 9, 2017 at 4:50 PM
To: "[email protected]<mailto:[email protected]>" 
<[email protected]<mailto:[email protected]>>
Subject: [MarkLogic Dev General] Query: List all the documents in a collection

Hi Guys,

I am using MarkLogic 8 along with RESR api.

I was trying to figure out, how to retrieve the list of all documents inside a 
collection.

I have enabled URI lexicon and tried using it with the query options, but it 
didn’t work.

Can you guide me through the steps.

Any help would be highly appreciated.

Thanks& Regards,
Bhushan Suryawanshi

Bhushan Suryawanshi
Developer
t: +1-212-401-7894
www.xenomorph.com<http://www.xenomorph.com/?mail> | 
blog<http://xenomorph.typepad.com/?mail> | twitter<http://goo.gl/oaBWO> | 
linkedin<http://goo.gl/rdi8W>


This email is confidential and is intended only for the addressee. If you are 
not the intended recipient, please note that any dissemination, distribution or 
copying of this email is strictly prohibited. Any and all estimates, proposals, 
quotes and fees contained herein are for discussion purposes only and are not 
contractually binding unless executed in accordance with the standard practices 
of the Company. Attachments to this message have been virus checked but no 
guarantee can be made that any attachment is virus free. Please notify us 
immediately of any problem.



_______________________________________________
General mailing list
[email protected]<mailto:[email protected]>
Manage your subscription at:
http://developer.marklogic.com/mailman/listinfo/general

_______________________________________________
General mailing list
[email protected]
Manage your subscription at: 
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to