Hello Team,
We are using MarkLogic 8.0 using REST API.
We have around 200,000 documents inside a collection. Each document has the
following structure
<Equity>
<IDENTIFIER1 >1022</ IDENTIFIER1 >
< IDENTIFIER2>KP</ IDENTIFIER2>
<NAME >SFW </NAME >
...
</Equity>
One Requirement:
1) Fetch value for an element for all the documents inside a collection.
I have tried below solution using Xquery:
<results>
{
let $a := collection("Equity")//*
for $name in distinct-values($a/NAME)
return
<result>
<name>{ $name }</name>
</result>
}
</results>
But the above Xquery takes a long time.
Is there any way where we can solve the above requirements using REST API.
Thanks in advance.
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]
Manage your subscription at:
http://developer.marklogic.com/mailman/listinfo/general