Hello all

I want to sort element values by frequency. I have tried below

for $word in cts:element-values(xs:QName("ELEMENT_NAME"),  (),
("frequency-order", "limit=10"))
return <word count="{cts:frequency($word)}">{$word}</word>


But for very large index this is slow in comparison to elasticsearch. I did
this comparison on same machine with same data and of course only one of
them was running when I did the comparison. There are about 250 million
documents and frequency range is 1 million to hundreds i.e. if I run above
query the word on the top has count 1000000.

Is there any other way of doing same ?


Thanks & regards,
Ravinder Singh Maan
_______________________________________________
General mailing list
[email protected]
Manage your subscription at: 
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to