<?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 luceneSearch remove duplicates in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/lucenesearch-remove-duplicates/m-p/224742#M177872</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am using the following calls and getting back all the values associated with one of the attributes I have defined for my stored documents.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;var results = search.luceneSearch(query);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;l_search_docs.results = results;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;The problem is that there are duplicate entries.&amp;nbsp; I want to remove them but calling unique or trying to iterate over the results looking for where the results 'contains' a value has not worked.&amp;nbsp; Are there any available methods and is there an API entry concerning the luceneSearch?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 27 Oct 2009 14:16:21 GMT</pubDate>
    <dc:creator>lckaley</dc:creator>
    <dc:date>2009-10-27T14:16:21Z</dc:date>
    <item>
      <title>luceneSearch remove duplicates</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/lucenesearch-remove-duplicates/m-p/224742#M177872</link>
      <description>I am using the following calls and getting back all the values associated with one of the attributes I have defined for my stored documents.&amp;nbsp;&amp;nbsp;&amp;nbsp;var results = search.luceneSearch(query);&amp;nbsp;&amp;nbsp;&amp;nbsp;l_search_docs.results = results;‍‍The problem is that there are duplicate entries.&amp;nbsp; I want to remove them but cal</description>
      <pubDate>Tue, 27 Oct 2009 14:16:21 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/lucenesearch-remove-duplicates/m-p/224742#M177872</guid>
      <dc:creator>lckaley</dc:creator>
      <dc:date>2009-10-27T14:16:21Z</dc:date>
    </item>
    <item>
      <title>Re: luceneSearch remove duplicates</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/lucenesearch-remove-duplicates/m-p/224743#M177873</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;If you want to remove duplicates that have a property of a given value here's how you would do that… &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;var results = search.luceneSearch(query);&lt;BR /&gt;&lt;BR /&gt;for (i in results)&lt;BR /&gt;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if ( results.length &amp;gt; 1 &amp;amp;&amp;amp; results[i].properties["cm:someproperty"] == "some value") //Check for duplicates, compare a property&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; results[i].remove(); // to remove the document, or anything else you want to do with it&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR /&gt;}&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Oct 2009 20:52:25 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/lucenesearch-remove-duplicates/m-p/224743#M177873</guid>
      <dc:creator>tonyc</dc:creator>
      <dc:date>2009-10-28T20:52:25Z</dc:date>
    </item>
  </channel>
</rss>

