<?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 lucene query to check if folder exists in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/lucene-query-to-check-if-folder-exists/m-p/49804#M28784</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi there,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm trying to write a method that interacts with the WebServices to see if a folder exists in a workspace. Can anyone point me at a lucene query that will do something like this?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks!&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Martin BG&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 08 Nov 2006 13:26:44 GMT</pubDate>
    <dc:creator>aurora7795</dc:creator>
    <dc:date>2006-11-08T13:26:44Z</dc:date>
    <item>
      <title>lucene query to check if folder exists</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/lucene-query-to-check-if-folder-exists/m-p/49804#M28784</link>
      <description>Hi there,I'm trying to write a method that interacts with the WebServices to see if a folder exists in a workspace. Can anyone point me at a lucene query that will do something like this?Thanks!Martin BG</description>
      <pubDate>Wed, 08 Nov 2006 13:26:44 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/lucene-query-to-check-if-folder-exists/m-p/49804#M28784</guid>
      <dc:creator>aurora7795</dc:creator>
      <dc:date>2006-11-08T13:26:44Z</dc:date>
    </item>
    <item>
      <title>Re: lucene query to check if folder exists</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/lucene-query-to-check-if-folder-exists/m-p/49805#M28785</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;See&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://wiki.alfresco.com/wiki/Search#Path_Queries" rel="nofollow noopener noreferrer"&gt;http://wiki.alfresco.com/wiki/Search#Path_Queries&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You should be able to get the path of the folder from the node service and then add&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /*:woof&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; to find the folder called woof. You may have to escape the path (&lt;/SPAN&gt;&lt;A href="http://wiki.alfresco.com/wiki/Search#ISO_9075_encoding" rel="nofollow noopener noreferrer"&gt;http://wiki.alfresco.com/wiki/Search#ISO_9075_encoding&lt;/A&gt;&lt;SPAN&gt;).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Andy&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Nov 2006 10:02:38 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/lucene-query-to-check-if-folder-exists/m-p/49805#M28785</guid>
      <dc:creator>andy</dc:creator>
      <dc:date>2006-11-29T10:02:38Z</dc:date>
    </item>
    <item>
      <title>Re: lucene query to check if folder exists</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/lucene-query-to-check-if-folder-exists/m-p/49806#M28786</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Andy.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have the same problem and I am not able to resolve it. I spent much time for this task but all my tests failed….&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The getPath() method bot for the ParentRefence class and the Refence class does not work: it always returns a null value, so I cannot use the path value to create a query correctly.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Could you kindly provide me with an example of code to resolve this problem?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have the ID of the node….&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for anything.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Sergio&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Dec 2006 11:38:45 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/lucene-query-to-check-if-folder-exists/m-p/49806#M28786</guid>
      <dc:creator>sergio</dc:creator>
      <dc:date>2006-12-05T11:38:45Z</dc:date>
    </item>
    <item>
      <title>Re: lucene query to check if folder exists</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/lucene-query-to-check-if-folder-exists/m-p/49807#M28787</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;Maybe I was a bit naive or missed the web service reference ….&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The path is not filled in on references returned from the web service API.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;It is likely to be filled in in the future.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It is not easy to get paths via the web services.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So you could check for an existing doc in a folder using a lucene query ..&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;+PARENT:"FolderNodeRef"&amp;nbsp; +@cm\:name:"name"&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;You will have to build the FolderNodeRef string as it is not exposed via the WS reference. See NodeRef.toString() for what to do given the store, protocol and uuid. You will only be able to query for immediate children.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Andy&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Dec 2006 09:43:07 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/lucene-query-to-check-if-folder-exists/m-p/49807#M28787</guid>
      <dc:creator>andy</dc:creator>
      <dc:date>2006-12-06T09:43:07Z</dc:date>
    </item>
    <item>
      <title>Re: lucene query to check if folder exists</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/lucene-query-to-check-if-folder-exists/m-p/49808#M28788</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;BLOCKQUOTE class="jive-quote"&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;+PARENT:"FolderNodeRef"&amp;nbsp; +@cm\:name:"name"&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;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt;but this will also find partial matches. At least, it's better than to step through all subfolders and to compare the names. Now, you have only to compare the names that are returned by that query.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Best regards&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; Christian&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Jan 2007 17:22:15 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/lucene-query-to-check-if-folder-exists/m-p/49808#M28788</guid>
      <dc:creator>cludt</dc:creator>
      <dc:date>2007-01-11T17:22:15Z</dc:date>
    </item>
  </channel>
</rss>

