cancel
Showing results for 
Search instead for 
Did you mean: 

How to delete documents with cm:indexControl aspect ???

nenad982
Champ on-the-rise
Champ on-the-rise
Hi all,

I have a very big repository (Alfresco Ent v4.2) where a lot of documents have cm:indexControl aspect with cm:isIndexed=false. These documents were created using WebDcrive client and these represent temporary documents (MS Office temporary documents…).

Now we have to clean repository from these temporary documents (documents with specific extension) but the problem is because we can not fetch document via query because these are not indexed. I tried with Lucene queries and also with Transactional metadata queries but nothing of these returned these documents.

Does anybody have idea how we can find all these documents and remove them form repository?

Thank you in advance…
2 REPLIES 2

afaust
Legendary Innovator
Legendary Innovator
Hello,

ttansactional metadata queries should be able to find these nodes as those queries operate on the DB where the index control aspect is not evaluated (as of 4.2.4). Have you made sure that your queries are actually being executed against the DB, i.e. is the metadata indexes patch applied to the DB and your query consistency set to "transactional only"? I have been fooled myself a number of times (before getting it) when the query "appeared" to be executed against the DB but in fact was still running against SOLR.

Regards
Axel

nenad982
Champ on-the-rise
Champ on-the-rise
Alex thank you for your response. I just saw now your answer.

In the meantime I found another solution (or to be precise two of them). In both cases I created recursive function in Java API which takes root folder (folder under which we want to process nodes), in our case Document Library of the Share site. First solution is to use NodeService (which wraps communication with DB) and removeAspect method. The second one is to use CMIS API and 'getChildren' method I think.
In both cases I was able to find all documents with cm:indexControl aspect.

Transactional metadata queries could be solution also. I tried them as I said but I am not sure now were there operating against DB directly or not.

Thanks you,
Nenad