<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to apply an aspect for all documents in a big repo in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/how-to-apply-an-aspect-for-all-documents-in-a-big-repo/m-p/134931#M36294</link>
    <description>&lt;P&gt;You may use DB or Search Service in order to get the batch of nodes to be updated. Using DB will be more efficient, but it may depend on your requirements.&lt;/P&gt;
&lt;P&gt;If you need some inspiration, take a look at the implementation of the TraschcanCleaner addon:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://github.com/Alfresco/alfresco-trashcan-cleaner-module/blob/master/src/main/java/org/alfresco/trashcan/TrashcanCleaner.java" target="_blank" rel="nofollow noopener noreferrer"&gt;https://github.com/Alfresco/alfresco-trashcan-cleaner-module/blob/master/src/main/java/org/alfresco/trashcan/TrashcanCleaner.java&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 26 Nov 2021 09:44:35 GMT</pubDate>
    <dc:creator>angelborroy</dc:creator>
    <dc:date>2021-11-26T09:44:35Z</dc:date>
    <item>
      <title>How to apply an aspect for all documents in a big repo</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/how-to-apply-an-aspect-for-all-documents-in-a-big-repo/m-p/134928#M36291</link>
      <description>&lt;P&gt;Hi Community:&lt;/P&gt;&lt;P&gt;Sometimes, I have a painful requirement when dealing with large repositories (let's say more than 10M of documents).&lt;BR /&gt;I have to apply an aspect (cm:indexControl) and some properties (cm:isIndexed=true, and cm:isContentIndexed=false) on every document of the repository. What strategies may you use in a very large repository ? Is there a safer or controlled way for doing this ?&lt;/P&gt;&lt;P&gt;In the past I did it in smaller repos with a basic script, useful but I think it is not enough for this case.&lt;/P&gt;&lt;P&gt;- I used REST API for obtaining the full set of nodeRefs to apply. Basically I did TYPE based paginated searches for every document type.&lt;BR /&gt;- And then I iterated over the set of custom nodeRefs, with a simple custom webscript for applying the aspect and properties on each node.&lt;/P&gt;&lt;P&gt;Surely this is not the most effective / fast way for doing. What do you think ? Is there a way for not doing this one by one ? How would you improve each part ?&lt;/P&gt;&lt;P&gt;I use Alfresco 5.2 EE and Alfresco Search Services 1.3.&lt;/P&gt;&lt;P&gt;Kind regards and thanks in advance.&lt;BR /&gt;--C.&lt;/P&gt;&lt;P&gt;P.S: Yes, the idea is reindexing SOLR later, for getting smaller SOLR contentstore and indices.&lt;/P&gt;</description>
      <pubDate>Fri, 19 Nov 2021 10:00:31 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/how-to-apply-an-aspect-for-all-documents-in-a-big-repo/m-p/134928#M36291</guid>
      <dc:creator>cesarista</dc:creator>
      <dc:date>2021-11-19T10:00:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to apply an aspect for all documents in a big repo</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/how-to-apply-an-aspect-for-all-documents-in-a-big-repo/m-p/134929#M36292</link>
      <description>&lt;P&gt;I guess the safer way is to create something on the Repo side, using the Java API.&lt;/P&gt;
&lt;P&gt;Developing an Scheduled Job to apply the aspect to the nodes using a paginated search will be faster than using the external API.&lt;/P&gt;</description>
      <pubDate>Mon, 22 Nov 2021 07:56:04 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/how-to-apply-an-aspect-for-all-documents-in-a-big-repo/m-p/134929#M36292</guid>
      <dc:creator>angelborroy</dc:creator>
      <dc:date>2021-11-22T07:56:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to apply an aspect for all documents in a big repo</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/how-to-apply-an-aspect-for-all-documents-in-a-big-repo/m-p/134930#M36293</link>
      <description>&lt;P&gt;Thanks for the idea Angel:&lt;/P&gt;&lt;P&gt;It seems reasonable to develop an scheduled job. It reminds a little bit the SOLR cronjob strategy (but in this case it would be in the repo part).&lt;/P&gt;&lt;P&gt;But do you know how would you query over all living and relevant nodes in an efective way ?&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;P&gt;--C.&lt;/P&gt;</description>
      <pubDate>Fri, 26 Nov 2021 09:16:33 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/how-to-apply-an-aspect-for-all-documents-in-a-big-repo/m-p/134930#M36293</guid>
      <dc:creator>cesarista</dc:creator>
      <dc:date>2021-11-26T09:16:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to apply an aspect for all documents in a big repo</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/how-to-apply-an-aspect-for-all-documents-in-a-big-repo/m-p/134931#M36294</link>
      <description>&lt;P&gt;You may use DB or Search Service in order to get the batch of nodes to be updated. Using DB will be more efficient, but it may depend on your requirements.&lt;/P&gt;
&lt;P&gt;If you need some inspiration, take a look at the implementation of the TraschcanCleaner addon:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://github.com/Alfresco/alfresco-trashcan-cleaner-module/blob/master/src/main/java/org/alfresco/trashcan/TrashcanCleaner.java" target="_blank" rel="nofollow noopener noreferrer"&gt;https://github.com/Alfresco/alfresco-trashcan-cleaner-module/blob/master/src/main/java/org/alfresco/trashcan/TrashcanCleaner.java&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 26 Nov 2021 09:44:35 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/how-to-apply-an-aspect-for-all-documents-in-a-big-repo/m-p/134931#M36294</guid>
      <dc:creator>angelborroy</dc:creator>
      <dc:date>2021-11-26T09:44:35Z</dc:date>
    </item>
  </channel>
</rss>

