There's a section on doing fast joins using range indexes in the "Inside MarkLogic Server" paper.
http://www.marklogic.com/resources/inside-marklogic-server/ -jh- P.S. Why so anonymous? We don't bite. On May 23, 2013, at 11:33 PM, [email protected] <[email protected]> wrote: > Hi, > > I have two sets of documents in ML as: > > fn:doc()/a. (a is root element) > Sample structure: > <a> > <b>"sample1"</b> > </a> > > And fn:doc()/c. (c is root element) > Sample structure: > <c> > <b>"sample2"</b> > </c> > > Now I have millions of both these types of docs. > I have to join these two sets of docs on the element b. > Return the matching values. > > Currently I am using nested for loop as: > > for $doc1 in fn:doc()/a > for $doc2 in fn:doc()/c > where ($doc1/b = $doc2/b) > return > ( > <output> > { > <b>{doc1/b}</b> > } > </output> > ) > > This takes very long even for a few thousands. I am trying to join them using > cts:search. Any help will be appreciated. > > Thanks.. > > _______________________________________________ > General mailing list > [email protected] > http://developer.marklogic.com/mailman/listinfo/general
_______________________________________________ General mailing list [email protected] http://developer.marklogic.com/mailman/listinfo/general
