Hi, I think this is the right approach..
If you talk about it being slow, how slow is that exactly? And how did you configure MarkLogic? More specifically, how many forest do you have? Also, how much memory, and cpu cores do you have? Kind regards, Geert From: <[email protected]<mailto:[email protected]>> on behalf of RAVINDER MAAN <[email protected]<mailto:[email protected]>> Reply-To: MarkLogic Developer Discussion <[email protected]<mailto:[email protected]>> Date: Saturday, February 20, 2016 at 11:34 AM To: "[email protected]<mailto:[email protected]>" <[email protected]<mailto:[email protected]>> Subject: [MarkLogic Dev General] Best way to find most occuring word or sort by frequency 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
