I have the following xml structure:-
<Root>
<text>
Marklogic is a good big data tool. Right now I am exploring Marklogic.
</text>
</Root>
Now I want to count the occurrence of unique words(e.g Marklogic- 2 times, big- 1 time, data-1 time etc). I achieved this by using fn:count()
but fn:count()
is too slow in case of large database.
Is there any other optimized way to achieve this ? (something related to indexes)