[MarkLogic Dev General] using a collation for sorting volume numbers

Michael Blakeley michael.blakeley at marklogic.com
Mon Jun 4 16:19:35 PDT 2007

Have a look at Chapter 4 of the "Query Performance and Tuning" guide, 
available at http://developer.marklogic.com/pubs/

-- Mike

Alan Darnell wrote:
> I have a set of documents that have volume and issue numbers represented 
> as strings (e.g. 1, 10, 2, 23).  If I use the following collation, I get 
> a nice numeric sort without having to pad or otherwise normalize the 
> data, but performance suffers.  Is there an index I can add that would 
> speed up the kind of sorting that this collation needs to do?
> for $i in cts:search(doc()//article-title,"water")
> order by $i/root()//volume collation "http://marklogic.com/collation/en/MO"
> return
> $i/root()//volume
> _______________________________________________
> General mailing list
> General at developer.marklogic.com
> http://xqzone.com/mailman/listinfo/general

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 4532 bytes
Desc: S/MIME Cryptographic Signature
Url : http://xqzone.marklogic.com/pipermail/general/attachments/20070604/72721283/smime.bin

More information about the General mailing list