<?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 Restricting Seach by folder in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/restricting-seach-by-folder/m-p/172110#M125341</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am to develop a webscript that will do the following receive all content will in the current folder and it's sub-folders. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Here is what i tried and it did not return any results.&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;var nodes= search.luceneSearch("PATH:\"/Company%20Home/Public/test//*\"");&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;SPAN&gt;I don't know if this is the best way about getting content from a folder or is there a better way of doing.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Vik&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 19 Jun 2008 17:09:53 GMT</pubDate>
    <dc:creator>vhakkal</dc:creator>
    <dc:date>2008-06-19T17:09:53Z</dc:date>
    <item>
      <title>Restricting Seach by folder</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/restricting-seach-by-folder/m-p/172110#M125341</link>
      <description>Hello,I am to develop a webscript that will do the following receive all content will in the current folder and it's sub-folders. Here is what i tried and it did not return any results.var nodes= search.luceneSearch("PATH:\"/Company%20Home/Public/test//*\"");‍I don't know if this is the best way abo</description>
      <pubDate>Thu, 19 Jun 2008 17:09:53 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/restricting-seach-by-folder/m-p/172110#M125341</guid>
      <dc:creator>vhakkal</dc:creator>
      <dc:date>2008-06-19T17:09:53Z</dc:date>
    </item>
    <item>
      <title>Re: Restricting Seach by folder</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/restricting-seach-by-folder/m-p/172111#M125342</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Vik,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Lucene search requires a qname path, not a name path.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The easiest way to get a qname path is by asking a node to give it to you:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;var folderNode = companyhome.childByNamePath("Data Dictionary/Email Templates");&lt;BR /&gt;var luceneQuery = "+PATH:\"" + folderNode.qnamePath + "//*\" ";&lt;BR /&gt;var nodes = search.luceneSearch(luceneQuery);&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;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;If you want to get all files including those in the sub directories, this is probably the best way to go. Don't forget to also search for the correct node type though, e.g.&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;luceneQuery += " +TYPE:\"{&lt;A href="http://www.alfresco.org/model/content/1.0}content\" rel="nofollow noopener noreferrer"&gt;http://www.alfresco.org/model/content/1.0}content\&lt;/A&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;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;Greetings,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Michael&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Jun 2008 15:12:24 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/restricting-seach-by-folder/m-p/172111#M125342</guid>
      <dc:creator>mruflin</dc:creator>
      <dc:date>2008-06-20T15:12:24Z</dc:date>
    </item>
  </channel>
</rss>

