<?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 exclude a certain path from all user searches in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/exclude-a-certain-path-from-all-user-searches/m-p/298510#M251640</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Unfortunately we have a special folder named "_archive" in our repository everywhere. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;This folder has its purpose. But: When searching for content/documents we want to exclude it and every content beneath "_archive".&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So, what i want is to exclude the path and its member from all user searches. Syntax is easy with fts: &lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&amp;lt;your query&amp;gt; AND -PATH:"//cm:_archive//*"&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;To test, take the following pdf (or any other with the term 'hodor' in it):&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="https://www.docdroid.net/RmKj9gB/search-test.pdf.html" rel="nofollow noopener noreferrer"&gt;https://www.docdroid.net/RmKj9gB/search-test.pdf.html&lt;/A&gt;&lt;BR /&gt;&lt;SPAN&gt;take the pdf, put it into your repo twice:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- /some_random_path/search-test.pdf&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- /some_random_path/_archive/search-test.pdf&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In node-browser everything works as expected:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;TEXT:"HODOR" AND -PATH:"//cm:_archive//*"&lt;BR /&gt;= 1 result&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;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;TEXT:"HODOR"&lt;BR /&gt;= 2 results&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;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So, my idea was to edit search.get.config.xml and add the exclusion to the list of properties:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;&amp;lt;search&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;default-operator&amp;gt;AND&amp;lt;/default-operator&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;default-query-template&amp;gt;%(cm:name cm:title cm:description ia:whatEvent&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ia:descriptionEvent lnk:title lnk:description TEXT TAG) AND -PATH:"//cm:_archive//*"&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/default-query-template&amp;gt;&lt;BR /&gt;&amp;lt;/search&amp;gt;&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;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But it does not work as intended! As soon as i am using 'TEXT:' or 'name:' in the search field, the exclusion seems to be ignored.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What other option do i have? Basically just want to add the exclusion to the base query after the default query template is used.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;thanks!&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;m&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 26 May 2016 12:02:43 GMT</pubDate>
    <dc:creator>mrksjs</dc:creator>
    <dc:date>2016-05-26T12:02:43Z</dc:date>
    <item>
      <title>exclude a certain path from all user searches</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/exclude-a-certain-path-from-all-user-searches/m-p/298510#M251640</link>
      <description>HiUnfortunately we have a special folder named "_archive" in our repository everywhere. This folder has its purpose. But: When searching for content/documents we want to exclude it and every content beneath "_archive".So, what i want is to exclude the path and its member from all user searches. Synt</description>
      <pubDate>Thu, 26 May 2016 12:02:43 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/exclude-a-certain-path-from-all-user-searches/m-p/298510#M251640</guid>
      <dc:creator>mrksjs</dc:creator>
      <dc:date>2016-05-26T12:02:43Z</dc:date>
    </item>
    <item>
      <title>Re: exclude a certain path from all user searches</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/exclude-a-certain-path-from-all-user-searches/m-p/298511#M251641</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The default template is only used when you do not specify a field.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;So if your query specifies fields it will not use the template.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;5.1 exposes filters in the query API - which would be a better, cached solution than adding it to the query.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;However, we do not have the concept of fixed filters in Alfresco.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Solr does allow you to add default parameters to the query handler configuration in solrconfig.xml.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;You can edit the /afts query handler and add "fq" = "&amp;lt;your filter query&amp;gt;"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;There are already some default parameters in there.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;You could do this for /cmis too.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Andy &lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 May 2016 19:58:33 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/exclude-a-certain-path-from-all-user-searches/m-p/298511#M251641</guid>
      <dc:creator>andy</dc:creator>
      <dc:date>2016-05-31T19:58:33Z</dc:date>
    </item>
    <item>
      <title>Re: exclude a certain path from all user searches</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/exclude-a-certain-path-from-all-user-searches/m-p/298512#M251642</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Interesting solution, thanks Andy!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I ended up overwriting the templates/webscripts/org/alfresco/slingshot/search webscripts.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Jun 2016 09:54:37 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/exclude-a-certain-path-from-all-user-searches/m-p/298512#M251642</guid>
      <dc:creator>mrksjs</dc:creator>
      <dc:date>2016-06-01T09:54:37Z</dc:date>
    </item>
  </channel>
</rss>

