Hi Jakob,

If there is > 1M docs getting touched, you are effectively trying to update 
them all in one transaction. It is probably much more efficient and faster to 
just batch up processing, and run chunks in parallel. You could take a look at 
taskbot from Mike:

http://github-search.demo.marklogic.com/detail/mblakele/taskbot.json

Cheers,
Geert

From: 
<[email protected]<mailto:[email protected]>>
 on behalf of Jakob Fix <[email protected]<mailto:[email protected]>>
Reply-To: MarkLogic Developer Discussion 
<[email protected]<mailto:[email protected]>>
Date: Monday, February 15, 2016 at 1:41 AM
To: General Mark Logic Developer Discussion 
<[email protected]<mailto:[email protected]>>
Subject: [MarkLogic Dev General] JSON and expanded tree cache error ?!

Hello,

running this one-liner in qconsole returns consistently an 
XDMP-EXPNTREECACHEFULL error:

collection("imdb") ! xdmp:node-insert-after(./Year, object-node { 
"numericYear": number-node { ./Year } }/numericYear)

=>
[1.0-ml] XDMP-EXPNTREECACHEFULL: (fn:collection("imdb")) ! 
xdmp:node-insert-after(Year, object-node { "numericYear": number-node { Year } 
}/numericYear) -- Expanded tree cache full on host macbook.local

I was hoping that avoiding FLWOR expression would help as described in the 
admittedly a bit dated article by @mblakele here:

http://blakeley.com/blogofile/2012/03/19/let-free-style-and-streaming/

Looking at the KB article below, I can't see how to tweak my query to use less 
data:

https://help.marklogic.com/Knowledgebase/Article/View/9/0/resolving-xdmp-expntreecachefull-errors

data looks like this (but there are >1M of these JSON documents):

{
"ID": "63484",
"imdbID": "tt0063484",
"Title": "Radhapura - Endstation der Verdammten",
"Year": "1968",
"Rating": "",
"Runtime": "80 min",
"Genre": "Action, Adventure",
"Released": "1971-05-07",
"Director": "Hans Albin",
"Writer": "Bob Cunningham, Rudolf Lubowski",
"Cast": "Gordon Mitchell, Carl M�hner, Femi Benussi, George Nader",
"Metacritic": "",
"imdbRating": "5.4",
"imdbVotes": "10",
"Poster": "",
"Plot": "Steve Weston, cercatore di diamanti a Ceylon, viene derubato delle sue 
preziose pietre. Rimasto senza denaro si fa assumere in una miniera dove 
ritrova nelle vesti dello spietato ...",
"FullPlot": "Steve Weston, cercatore di diamanti a Ceylon, viene derubato delle 
sue preziose pietre. Rimasto senza denaro si fa assumere in una miniera dove 
ritrova nelle vesti dello spietato sorvegliante proprio Alfred, l'uomo che gli 
ha sottratto i diamanti. Costui, riconosciuta la sua vittima, cerca di 
liberarsene incolpandola a sua volta di furto. Sventato il tentativo, Steve 
organizza con la complicit� di altri bianchi e l'aiuto di una guardia, che ha 
con lui un debito di gratitudine, la fuga dalla miniera. Avvertito da una spia, 
Alfred reagisce deportando Steve e gli altri in una piccola isola dalla quale � 
molto difficile evadere. Impadronitosi di alcuni candelotti di dinamite, Weston 
e gli altri minatori si sollevano contro i sorveglianti, costringendo Alfred a 
un precipitoso ritorno a Ceylon. Steve, che nella rivolta ha perduto tutti i 
suoi amici, lo raggiunge e ingaggia una furiosa lotta con lui durante la quale 
Alfred sta per avere la meglio. L'intervento di un'indigena, per�, pone fine 
per sempre alla sua esistenza.",
"Language": "German, Italian",
"Country": "West Germany, Italy",
"Awards": "",
"lastUpdated": "2015-08-22 00:00:28.797000000"
}

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

Reply via email to