Hi Zise,
Before jumping directly into the code, I would to like suggest you please first 
go through the all cts:queries functions provided by MarkLogic.  Instead of 
writing direct xpath in code ,please use cts:queries functions like 
cts:element-attribute-value-query() and others.  
Please find the below link for your reference 
https://docs.marklogic.com/cts
also, https://docs.marklogic.com/guide/search-devand  
https://docs.marklogic.com/guide/performance
Your code is  definitely hit the performance and you are getting 
XDMP-EXPNTREECACHEFULL error.
There are several ways to complete your task. Like you can get first all uris 
of documents which you want to update as per your criteria  then update only 
those documents.  ex : to get uris  -->  cts:uris((),(),cts:and-query(( 
cts:collection-query("test"), 
cts:element-attribute-value-query(<<parameters>>))) )  and then update these 
documents only. 
You can use also xdmp:spawn() function to update documents simultaneously. 
There are several ways to obtain this task depends on size of your database. 
Regards,Asit Nautiyal  Date: Tue, 7 Jul 2015 11:53:12 +0800
From: [email protected]
To: [email protected]
Subject: [MarkLogic Dev General] xdmp:node-insert-child() throw 
XDMP-EXPNTREECACHEFULL error

my query is :xdmp:node-insert-child(collection('test')/patient/link/visit[@age 
= ('60岁','61岁','62岁','63岁','64岁','65岁')], <mynode>some string ...</mynode>);
how to change my query to void the XDMP-EXPNTREECACHEFULL error?thanks.


_______________________________________________
General mailing list
[email protected]
Manage your subscription at: 
http://developer.marklogic.com/mailman/listinfo/general                         
                  
_______________________________________________
General mailing list
[email protected]
Manage your subscription at: 
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to