Re: [MarkLogic Dev General] finding the number of occurences of an element in an xml

2016-11-17 Thread Justin Makeig
The code below illustrates how you can calculate co-occurrences between an element and the URI of the documents that contain instances of that element. Then, for each URI it counts the total occurrences. Note, that you'll need to have the URI lexicon enabled and an element range index on x.

[MarkLogic Dev General] finding the number of occurences of an element in an xml

2016-11-17 Thread Raghu
Hi All, I've got around 40 million XML documents out of which few documents are having an element say element x twice (they are supposed to have only one element x), I need to find the list of documents are there with multiple occurrences of that element x. what would be the ideal way to query