<?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 get duplecates in Alfresco? in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/how-to-get-duplecates-in-alfresco/m-p/106714#M30113</link>
    <description>&lt;P&gt;My approach was to calculate dupes in Java collection (of results)&lt;/P&gt;</description>
    <pubDate>Wed, 02 Sep 2020 13:59:28 GMT</pubDate>
    <dc:creator>iceja</dc:creator>
    <dc:date>2020-09-02T13:59:28Z</dc:date>
    <item>
      <title>How to get duplecates in Alfresco?</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/how-to-get-duplecates-in-alfresco/m-p/106712#M30111</link>
      <description>&lt;DIV class="postcell post-layout--right"&gt;&lt;DIV class="post-text"&gt;&lt;P&gt;I have a task: "to get a duplicates (documents with same property value) from Alfresco database with count duplicates amounts". In MySql there will be something like that:&lt;/P&gt;&lt;PRE&gt;mysql&amp;gt; SELECT COUNT(*) AS repetitions, last_name, first_name
-&amp;gt; FROM cat_mailing
-&amp;gt; GROUP BY last_name, first_name
-&amp;gt; HAVING repetitions &amp;gt; 1&lt;/PRE&gt;&lt;P&gt;But I have read that "The CMIS query language in Alfresco does not support GROUP BY or HAVING." . Is there any query (in any supported language) to perform described task? Thank you!&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;UPD:&lt;/STRONG&gt; for now I am counting in Java this way (redefining hashCode/equals for Form20Row)&lt;/P&gt;&lt;PRE&gt;Map&amp;lt;Form20Row, Form20Row&amp;gt; rowsMap =  results.stream().parallel().map(doc -&amp;gt; {
            Form20Row row = new Form20Row();
            String propMark = propertyHelper.getNodeProp(doc, NDBaseDocumentModel.PROP_MARK);
            row.setGroupName(systemMessages.getString("form20.nss.name"));
            row.setDocMark(propMark);
            row.setDupesNumber(1);
            return row;
        }).collect(Collectors.toConcurrentMap(form20Row -&amp;gt; form20Row, form20Row -&amp;gt; form20Row,
                (existing, replacement) -&amp;gt;  {
                    int count = existing.getDupesNumber();
                    existing.setDupesNumber(++count);
                    return existing;
                }));&lt;/PRE&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Sat, 22 Aug 2020 14:27:34 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/how-to-get-duplecates-in-alfresco/m-p/106712#M30111</guid>
      <dc:creator>iceja</dc:creator>
      <dc:date>2020-08-22T14:27:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to get duplecates in Alfresco?</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/how-to-get-duplecates-in-alfresco/m-p/106713#M30112</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;A href="https://migration33.stage.lithium.com/t5/user/viewprofilepage/user-id/77470"&gt;@iceja&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I see from &lt;A title="opens in a new tab" href="https://stackoverflow.com/questions/63536421/how-to-get-duplicates-in-alfresco/63563033#63563033" target="_blank" rel="noopener nofollow noreferrer"&gt;StackOverflow&lt;/A&gt;&amp;nbsp;that you've updated your question. I that approach working for you?&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;</description>
      <pubDate>Wed, 26 Aug 2020 11:16:43 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/how-to-get-duplecates-in-alfresco/m-p/106713#M30112</guid>
      <dc:creator>EddieMay</dc:creator>
      <dc:date>2020-08-26T11:16:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to get duplecates in Alfresco?</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/how-to-get-duplecates-in-alfresco/m-p/106714#M30113</link>
      <description>&lt;P&gt;My approach was to calculate dupes in Java collection (of results)&lt;/P&gt;</description>
      <pubDate>Wed, 02 Sep 2020 13:59:28 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/how-to-get-duplecates-in-alfresco/m-p/106714#M30113</guid>
      <dc:creator>iceja</dc:creator>
      <dc:date>2020-09-02T13:59:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to get duplecates in Alfresco?</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/how-to-get-duplecates-in-alfresco/m-p/106715#M30114</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;A href="https://migration33.stage.lithium.com/t5/user/viewprofilepage/user-id/77470"&gt;@iceja&lt;/A&gt;,&lt;/P&gt;
&lt;P&gt;Thanks for the update.&lt;/P&gt;
&lt;P&gt;Best wishes,&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 02 Sep 2020 14:01:37 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/how-to-get-duplecates-in-alfresco/m-p/106715#M30114</guid>
      <dc:creator>EddieMay</dc:creator>
      <dc:date>2020-09-02T14:01:37Z</dc:date>
    </item>
  </channel>
</rss>

