<?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 Optimize search in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/optimize-search/m-p/304980#M258110</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi all,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;We created custom code on Alfresco ECM 3.0 version, with our requirements to manage our documents. Now, the repository is too long and our custom code isn't as fast as we would like. We want to optimize lucene search to improve the speed.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;We change lucene.indexer.mergeFactor property as indicated in &lt;/SPAN&gt;&lt;A href="http://wiki.alfresco.com/wiki/Index_Merging_Performance" rel="nofollow noopener noreferrer"&gt;http://wiki.alfresco.com/wiki/Index_Merging_Performance&lt;/A&gt;&lt;SPAN&gt;. But Alfresco has several ways to search a NodeRef from a path, we want to review the search method to select the faster. We are using this one:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;example 1:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;List&amp;lt;NodeRef&amp;gt; results = this.serviceRegistry.getSearchService()&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;.selectNodes(rootNodeRef, xpath, null, this.serviceRegistry.getNamespaceService(), false);&lt;BR /&gt;results.get(0);&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;BR /&gt;&lt;SPAN&gt;But, another ways to get the same result are:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;example 2:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;FileInfo folder = this.serviceRegistry.getFileFolderService().resolveNamePath(getBaseNodeRef(), pathElementsList);&lt;BR /&gt;folder.getNodeRef();&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;example 3:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;List&amp;lt;NodeRef&amp;gt; results = this.serviceRegistry.getSearchService()&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .query(StoreRef.STORE_REF_WORKSPACE_SPACESSTORE, SearchService.LANGUAGE_LUCENE, xpath)";&lt;BR /&gt;results.get(0);&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;BR /&gt;&lt;SPAN&gt;Could someone point me what is the best way to get the NodeRef of a node from its path? Is there any difference between them in terms of execution speed?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks a lot in advance,&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 05 Aug 2013 07:54:00 GMT</pubDate>
    <dc:creator>agey</dc:creator>
    <dc:date>2013-08-05T07:54:00Z</dc:date>
    <item>
      <title>Optimize search</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/optimize-search/m-p/304980#M258110</link>
      <description>Hi all,We created custom code on Alfresco ECM 3.0 version, with our requirements to manage our documents. Now, the repository is too long and our custom code isn't as fast as we would like. We want to optimize lucene search to improve the speed.We change lucene.indexer.mergeFactor property as indica</description>
      <pubDate>Mon, 05 Aug 2013 07:54:00 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/optimize-search/m-p/304980#M258110</guid>
      <dc:creator>agey</dc:creator>
      <dc:date>2013-08-05T07:54:00Z</dc:date>
    </item>
    <item>
      <title>Re: Optimize search</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/optimize-search/m-p/304981#M258111</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt; lucene language is the fatest one ,all other language are converted to lucene language and search lucene index.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Aug 2013 08:53:00 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/optimize-search/m-p/304981#M258111</guid>
      <dc:creator>kaynezhang</dc:creator>
      <dc:date>2013-08-05T08:53:00Z</dc:date>
    </item>
    <item>
      <title>Re: Optimize search</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/optimize-search/m-p/304982#M258112</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thank you. I will use lucene search. I hope that this will improve the speed of alfresco.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Aug 2013 10:09:45 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/optimize-search/m-p/304982#M258112</guid>
      <dc:creator>agey</dc:creator>
      <dc:date>2013-08-06T10:09:45Z</dc:date>
    </item>
    <item>
      <title>Re: Optimize search</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/optimize-search/m-p/304983#M258113</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'm searching the same answer… try to find the fast method to select a node. But I don't understand if example 1 or example 3 are the fastest. Both of them use Lucene search. What's the most efficient method? &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Apr 2014 09:32:11 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/optimize-search/m-p/304983#M258113</guid>
      <dc:creator>spilby</dc:creator>
      <dc:date>2014-04-17T09:32:11Z</dc:date>
    </item>
  </channel>
</rss>

