If below doesn¹t perform well enough, try my doc-count UDF, which does
effectively the same, but runs on D-nodes (where the data lives), instead
on the E-node (where your code is executed):
http://github-search.demo.marklogic.com/detail/grtjn/doc-count-udf.json
Note: it requires URI lexicon, and
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.
Ju
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 the