On 16 February 2010 12:32, Geert Josten <[email protected]> wrote: > Hi Andrew, > >> Would using separate transactions for each of those help? > > The number of xdmp:node-replaces you execute in one xquery doesn't matter. > All that counts is that the document is being touched. At the end of the > execution, MarkLogic Server determines whether a trigger should be fired or > not. > > So in short, less triggers are fired if you do more in one query. > > I do think it would be better to use a post-commit trigger. Is that the case?
Yes, it's a post-commit, on-modify trigger. Intuitively to me, if 100 xdmp:node-replaces are made, the on-modify trigger should fire only once, which is also what you suggest there? However, currently it seems the trigger will be called 100 times. The max trigger depth exceeded exception is mainly from documents going through the CPF (word and pdf etc)... as I think for each node-replace the CPF update triggers are also being called.... -- Andrew Welch http://andrewjwelch.com Kernow: http://kernowforsaxon.sf.net/ _______________________________________________ General mailing list [email protected] http://xqzone.com/mailman/listinfo/general
