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

Alan Darnell alan.darnell at utoronto.ca
Mon Jun 4 15:16:35 PDT 2007


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




More information about the General mailing list