cancel
Showing results for 
Search instead for 
Did you mean: 

Deleting over 1000 nodes

buje85
Champ in-the-making
Champ in-the-making
Hi,

How are people deleting a large number of nodes from the repository that are stored based on metadata and not all stored under one root folder?

For example I have 60,000 files that need removing. If I use the javascript console I can search and find 1000 nodes based on some metadata properties then delete the nodes but I would have to run this script 60 times. As an administrator I must be missing an easier way to do this.

I couldn't find a repository forum so I hope this is the correct one.

Thanks,
4 REPLIES 4

douglascrp
World-Class Innovator
World-Class Innovator
I think this presentation can give you some ideas:
https://summit.alfresco.com/san-francisco/sessions/advanced-repository-administration-javascript

Search for the topic "How to Process Lots of Nodes"

buje85
Champ in-the-making
Champ in-the-making
Thanks, that is really useful!

Hi,

The link in your comment is not working anymore.

Is the link to the script still available? If yes were can I find it (could not find it myself)

Thanks,

aowian
Confirmed Champ
Confirmed Champ

Increasing the number of nodes to get from a query can only help you find the nodes.

Plus, processing a lot of nodes in one transaction can kill the Alfresco application by eating up all the resources. Believe me. I tried it.

Also, there is still a 1000 node limit on a writable transaction, unless that can be overridden.

I tried wrapping the transaction as shown in Bindu's Summit presentation and putting that in a loop,

but I ended up getting the same nodes each execution of the loop.

Finally this worked:

From the Javascript Console, choose Script execution parameters,  

and for Run like crazy: choose continuously 10s delay.

This allows Alfresco to throttle the processing so as to not overload the server,

and it batches the runs committing each transaction after processing 1000 nodes.