cancel
Showing results for 
Search instead for 
Did you mean: 

Run action on entire repository

boutch55555
Champ in-the-making
Champ in-the-making
Hi

I imported lots of docs in my instance without activating the versioning as a rule for all new items. Is there a way to add it recursively for all the content with the javascript API ?
I know that I can use the
doc.addAspect("cm:versionable");
but I can't find the lucene query that will give me all the documents form the repository.
I tried
var docs = search.luceneSearch("TEXT:*");
but it doesn't work :
(from catalina.out)
Caused by: org.apache.lucene.search.BooleanQuery$TooManyClauses: maxClauseCount is set to 10000

any ideas on how to archieve this ?

Thanks
1 REPLY 1

savic_prvoslav
Champ on-the-rise
Champ on-the-rise
hi, you can create action to divide search using system divide and conquer.

you can do is:
list all spaces
for each space do:
     list all files inside that space
         for each file do what you have to do

so probably you do not have 10000  spaces Smiley Happy if you do then split it with root spaces first and then apply the system .

hope it helps.