<?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 Solr 6 - JAVASCRIPT- get sub-folders starting by ... in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/solr-6-javascript-get-sub-folders-starting-by/m-p/60850#M21318</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have one site "mySite" with "documentLibrary". Inside I have "PATIENTS" folder :&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="image-1 jive-image j-img-original" src="https://connect.hyland.com/legacyfs/online/alfresco/23698_ed.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't find the way, in javascript,&amp;nbsp; to get all sub-folders of "PATIENTS" folder&amp;nbsp;starting by "CA" for example.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have tried differents method with :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;search.query({query: "PATH:/app:company_home/st:sites/cm:mySite/cm:documentLibrary/cm&lt;img id="smileytongue" class="emoticon emoticon-smileytongue" src="https://connect.hyland.com/i/smilies/16x16_smiley-tongue.png" alt="Smiley Tongue" title="Smiley Tongue" /&gt;ATIENTS//*"});&lt;/P&gt;&lt;P&gt;OR&lt;/P&gt;&lt;P&gt;search.xpathSearch("/app:company_home/st:sites/cm:mySite/cm:documentLibrary/cm&lt;img id="smileytongue" class="emoticon emoticon-smileytongue" src="https://connect.hyland.com/i/smilies/16x16_smiley-tongue.png" alt="Smiley Tongue" title="Smiley Tongue" /&gt;ATIENTS//*");&lt;/P&gt;&lt;P&gt;OR&lt;/P&gt;&lt;P&gt;search.luceneSearch("TYPE:\"cm:folder\" AND @cm\\:title:\"*"+filterTerm+"*\"");&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;without success...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PS : each sub-folder is created by a java mechanism. Is-it possible that a parameter or an action ( may-be permission), during the sub-folder creation, can cancel the sub-folder scan ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 31 Oct 2018 11:48:17 GMT</pubDate>
    <dc:creator>anakin59490</dc:creator>
    <dc:date>2018-10-31T11:48:17Z</dc:date>
    <item>
      <title>Solr 6 - JAVASCRIPT- get sub-folders starting by ...</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/solr-6-javascript-get-sub-folders-starting-by/m-p/60850#M21318</link>
      <description>Hi,I have one site "mySite" with "documentLibrary". Inside I have "PATIENTS" folder :I don't find the way, in javascript,&amp;nbsp; to get all sub-folders of "PATIENTS" folder&amp;nbsp;starting by "CA" for example.I have tried differents method with :search.query({query: "PATH:/app:company_home/st:sites/cm:mySite/cm:</description>
      <pubDate>Wed, 31 Oct 2018 11:48:17 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/solr-6-javascript-get-sub-folders-starting-by/m-p/60850#M21318</guid>
      <dc:creator>anakin59490</dc:creator>
      <dc:date>2018-10-31T11:48:17Z</dc:date>
    </item>
    <item>
      <title>Re: Solr 6 - JAVASCRIPT- get sub-folders starting by ...</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/solr-6-javascript-get-sub-folders-starting-by/m-p/60851#M21319</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG&gt;Never&lt;/STRONG&gt; use the luceneSearch operation. It is a legacy remnant and no longer receives any enhancements... Also xpathSearch is not a real XPath search, also going via the legacy Lucene search language with a very reduced XPath subset.&lt;/P&gt;&lt;P&gt;Always stick to query() in Repository-tier JavaScript. I am also wondering why you are querying for "...PATIENTS//*" - this will yield not only the sub-folders, but any descendant node below that folder at any depth. If you only want subfolders, you should simplify the PATH to&amp;nbsp;&lt;SPAN&gt;"...PATIENTS/*" (single slash).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;If you want to restrict based on the prefix of the name, you can simply add another condition to your query using AND. E.g. you can append&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;AND =cm:name:"AC*"&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&lt;SPAN&gt;to query for all&amp;nbsp;sub-folders / descendants with a name starting with AC (case-sensitive)&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 Oct 2018 20:46:45 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/solr-6-javascript-get-sub-folders-starting-by/m-p/60851#M21319</guid>
      <dc:creator>afaust</dc:creator>
      <dc:date>2018-10-31T20:46:45Z</dc:date>
    </item>
  </channel>
</rss>

