<?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 Re: URGENT:Sorting Lucene result on tokenized property possible? in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/urgent-sorting-lucene-result-on-tokenized-property-possible/m-p/184595#M137725</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Additional information:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; this is the simple code of our webscript:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;// this query produces 458 rows on our fresh alfresco test installation with dummy content:&lt;BR /&gt;var query = "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;BR /&gt;if( query != null &amp;amp;&amp;amp; query.length &amp;gt; 0 ) {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;var result = search.luceneSearch(query); // fast&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;// now to sort manually on tokenized values I'll need to look at each attribute:&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;// I took out the sorting for simplicity: just saving to a temp variable shows slowness!&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;var temp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;for(i=0;i&amp;lt;result.length;i++) {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;temp = result[i].properties['cm:title'];&amp;nbsp; // very slow!&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&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;/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;you can see that we have one piece where we got bottleneck:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;temp = result[i].properties['cm:title'];&amp;nbsp; // very slow!&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 tested sorting and got this results:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;* I have fresh alfresco installation with default content model&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;* for timing I used "YSlow" addon for FireFox&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;** I have fresh alfresco installation ( added 1 category and 1 subcategory, created 400&amp;nbsp; )&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;** the timing on your server may be slightly different taking into account the difference in hardware configurations&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;*** the time interval include: the time of working of webscript, reading (by cURL) the results by PHP script (a JSON data) and generation of webpage with the data&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;10 nodes&amp;nbsp; - ~2-3s&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;100 nodes - ~ 9-10s&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;200 nodes - ~19s&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;270 nodes - ~ 25s&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;90% of this time is simply examining one property of each node!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Also I have three question to all:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;1) do you use the sorting for search result?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2) how you sort the search result's by tokenised fields?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;3) if you use the standart JS "sort" function - what is timing for sorting around 200-300 results?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Oleg Koval&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 15 Apr 2009 20:06:04 GMT</pubDate>
    <dc:creator>serverok</dc:creator>
    <dc:date>2009-04-15T20:06:04Z</dc:date>
    <item>
      <title>URGENT:Sorting Lucene result on tokenized property possible?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/urgent-sorting-lucene-result-on-tokenized-property-possible/m-p/184594#M137724</link>
      <description>Hi all,we have the problem with sorting of lucene search result by some properties which are indexed and tokenised.What is the best/fastest method to correctly sort lucene results by properties that contain multiple tokens (http://lucene.apache.org/java/2_3_2/api/org/apache/lucene/search/Sort.html)?</description>
      <pubDate>Tue, 14 Apr 2009 18:43:08 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/urgent-sorting-lucene-result-on-tokenized-property-possible/m-p/184594#M137724</guid>
      <dc:creator>serverok</dc:creator>
      <dc:date>2009-04-14T18:43:08Z</dc:date>
    </item>
    <item>
      <title>Re: URGENT:Sorting Lucene result on tokenized property possible?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/urgent-sorting-lucene-result-on-tokenized-property-possible/m-p/184595#M137725</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Additional information:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; this is the simple code of our webscript:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;// this query produces 458 rows on our fresh alfresco test installation with dummy content:&lt;BR /&gt;var query = "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;BR /&gt;if( query != null &amp;amp;&amp;amp; query.length &amp;gt; 0 ) {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;var result = search.luceneSearch(query); // fast&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;// now to sort manually on tokenized values I'll need to look at each attribute:&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;// I took out the sorting for simplicity: just saving to a temp variable shows slowness!&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;var temp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;for(i=0;i&amp;lt;result.length;i++) {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;temp = result[i].properties['cm:title'];&amp;nbsp; // very slow!&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&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;/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;you can see that we have one piece where we got bottleneck:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;temp = result[i].properties['cm:title'];&amp;nbsp; // very slow!&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 tested sorting and got this results:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;* I have fresh alfresco installation with default content model&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;* for timing I used "YSlow" addon for FireFox&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;** I have fresh alfresco installation ( added 1 category and 1 subcategory, created 400&amp;nbsp; )&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;** the timing on your server may be slightly different taking into account the difference in hardware configurations&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;*** the time interval include: the time of working of webscript, reading (by cURL) the results by PHP script (a JSON data) and generation of webpage with the data&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;10 nodes&amp;nbsp; - ~2-3s&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;100 nodes - ~ 9-10s&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;200 nodes - ~19s&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;270 nodes - ~ 25s&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;90% of this time is simply examining one property of each node!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Also I have three question to all:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;1) do you use the sorting for search result?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2) how you sort the search result's by tokenised fields?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;3) if you use the standart JS "sort" function - what is timing for sorting around 200-300 results?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Oleg Koval&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Apr 2009 20:06:04 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/urgent-sorting-lucene-result-on-tokenized-property-possible/m-p/184595#M137725</guid>
      <dc:creator>serverok</dc:creator>
      <dc:date>2009-04-15T20:06:04Z</dc:date>
    </item>
    <item>
      <title>Re: URGENT:Sorting Lucene result on tokenized property possible?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/urgent-sorting-lucene-result-on-tokenized-property-possible/m-p/184596#M137726</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I also see the same problem.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Interestingly it seems some attributes of the ScriptNode object are retrieved very quickly, but some are retrieved very slowly.&amp;nbsp; Why is this, and is there no way to programmatically look at individual properties on a node array without waiting almost 100 milliseconds for EACH property examined?&amp;nbsp; Looking at the results below, to view a node property it takes a full &lt;/SPAN&gt;&lt;STRONG style="text-decoration: underline;"&gt;two orders of magnitude longer&lt;/STRONG&gt;&lt;SPAN&gt; than viewing say, the node type.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;(For testing I've used a sample URL executable script placed in Data Dictionary/Scripts&lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://connect.hyland.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;// In my test case, this query returns 394 nodes.&lt;BR /&gt;var query = "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;var total = "";&lt;BR /&gt;var out = "";&lt;BR /&gt;&lt;BR /&gt;if( query != null &amp;amp;&amp;amp; query.length &amp;gt; 0 ) {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;var result = search.luceneSearch(query); // fast&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;total = result.length;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;for (i=0;i&amp;lt;result.length;i++) {&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;// let's take a look at how long the script takes on various ScriptNode object attributes.&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;// I uncommented each of these one by one and measured how long it took to print out that&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;// individual ScriptNode attribute:&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;//out += result[i].id +"&amp;lt;br&amp;gt;";&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // ~&amp;nbsp; 0.3 seconds on 394 nodes.&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;//out += result[i].nodeRef +"&amp;lt;br&amp;gt;";&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // ~&amp;nbsp; 0.3 seconds on 394 nodes.&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;//out += result[i].displayPath +"&amp;lt;br&amp;gt;"; // ~&amp;nbsp; 0.6 seconds on 394 nodes.&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;//out += result[i].qnamePath +"&amp;lt;br&amp;gt;";&amp;nbsp;&amp;nbsp; // ~&amp;nbsp; 0.4 seconds on 394 nodes.&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;//out += result[i].isLocked() +"&amp;lt;br&amp;gt;";&amp;nbsp; // ~&amp;nbsp; 0.3 seconds on 394 nodes.&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;//out += result[i].type +"&amp;lt;br&amp;gt;";&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // ~&amp;nbsp; 0.4 seconds on 394 nodes.&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;//out += result[i].parent.id +"&amp;lt;br&amp;gt;";&amp;nbsp;&amp;nbsp; // ~&amp;nbsp; 0.3 seconds on 394 nodes.&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;//out += result[i].isCategory +"&amp;lt;br&amp;gt;";&amp;nbsp; // ~&amp;nbsp; 0.2 seconds on 394 nodes.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;//out += result[i].aspects +"&amp;lt;br&amp;gt;";&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // ~&amp;nbsp; 0.4 seconds on 394 nodes. !!! fast.&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;//out += result[i].size +"&amp;lt;br&amp;gt;";&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // ~ 27.4 seconds on 394 nodes.&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;//out += result[i].url +"&amp;lt;br&amp;gt;";&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // ~ 28.1 seconds on 394 nodes.&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;//out += result[i].downloadUrl +"&amp;lt;br&amp;gt;"; // ~ 28.2 seconds on 394 nodes.&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;//out += result[i].name +"&amp;lt;br&amp;gt;";&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // ~ 27.8 seconds on 394 nodes.&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;out += "&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;";&lt;BR /&gt;out += "&amp;lt;b&amp;gt;query:&amp;lt;/b&amp;gt; "+query+"&amp;lt;br&amp;gt;";&lt;BR /&gt;out += "&amp;lt;b&amp;gt;total:&amp;lt;/b&amp;gt; "+total+"&amp;lt;br&amp;gt;";&lt;BR /&gt;out;&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;/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;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;/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;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;It seems like the properties array just isn't loaded up into lucene result list of nodes.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Apr 2009 23:14:41 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/urgent-sorting-lucene-result-on-tokenized-property-possible/m-p/184596#M137726</guid>
      <dc:creator>dwilson</dc:creator>
      <dc:date>2009-04-15T23:14:41Z</dc:date>
    </item>
    <item>
      <title>Re: URGENT:Sorting Lucene result on tokenized property possible?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/urgent-sorting-lucene-result-on-tokenized-property-possible/m-p/184597#M137727</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The Alfresco Lucene API can perform some sorting for you, and we provide access to that through the scripting API:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Array luceneSearch(string query, string sortColumn, boolean asc) &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Returns an array of ScriptNode satisfying the search criteria sorted by the specified sortColumn (the property name to sort on) and asc (true =&amp;gt; ascending order, false =&amp;gt; descending order). For example var nodes = search.luceneSearch("TEXT:alfresco", "@cm:modified", false);&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt;If you need to sort by more than one column then the Script API does not yet provide this. But i can easily add it for Alfresco 3.2 since it has now been requested &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://connect.hyland.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The reason some properties take longer than others to retrieve is that some properties are easily resolvable from data already cached on the ScriptNode instance - and some data must be retrieved directly from the repository (and then cached). Accessing individual properties of 1000's of nodes via the ScriptNode API is not going to be as fast as writing some Java code to do it - as the ScriptNode API calls must always pass through all levels of Permissions and Public Service Interceptors etc. for each call (Java code does not always need to do this…)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Kevin&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Apr 2009 09:15:51 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/urgent-sorting-lucene-result-on-tokenized-property-possible/m-p/184597#M137727</guid>
      <dc:creator>kevinr</dc:creator>
      <dc:date>2009-04-21T09:15:51Z</dc:date>
    </item>
    <item>
      <title>Re: URGENT:Sorting Lucene result on tokenized property possible?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/urgent-sorting-lucene-result-on-tokenized-property-possible/m-p/184598#M137728</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks for the reply, Kevin!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;The Alfresco Lucene API can perform some sorting for you, and we provide access to that through the scripting API:&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Array luceneSearch(string query, string sortColumn, boolean asc) &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Returns an array of ScriptNode satisfying the search criteria sorted by the specified sortColumn (the property name to sort on) and asc (true =&amp;gt; ascending order, false =&amp;gt; descending order). For example var nodes = search.luceneSearch("TEXT:alfresco", "@cm:modified", false);&lt;/BLOCKQUOTE&gt;&lt;/BLOCKQUOTE&gt;&lt;SPAN&gt;Ah, this was used at first but was not returning correct results with tokenized fields, e.g. cm:title because each token was being considered separately.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;If you need to sort by more than one column then the Script API does not yet provide this. But i can easily add it for Alfresco 3.2 since it has now been requested &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://connect.hyland.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/BLOCKQUOTE&gt;&lt;SPAN&gt;That's great- thanks Kevin- Though while we're prioritizing features for Alfresco 3.2, I'd place these above multi-column sort as they are likely even more common needs:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;UL&gt;&lt;LI&gt;Sorting correctly on a tokenized field&lt;/LI&gt;&lt;LI&gt;Returning only a specified page worth of all result data (e.g. results 21 through 30)&lt;/LI&gt;&lt;LI&gt;Perhaps with the now small set of data thanks to the above paging, all properties of those 10 nodes can be fetched &amp;amp; cached? (Although 100ms X 10 isn't quite as terrible.)&lt;/LI&gt;&lt;/UL&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;The reason some properties take longer than others to retrieve is that some properties are easily resolvable from data already cached on the ScriptNode instance - and some data must be retrieved directly from the repository (and then cached). Accessing individual properties of 1000's of nodes via the ScriptNode API is not going to be as fast as writing some Java code to do it - as the ScriptNode API calls must always pass through all levels of Permissions and Public Service Interceptors etc. for each call (Java code does not always need to do this…)&lt;/BLOCKQUOTE&gt;&lt;SPAN&gt;In order to tap into the power of the Java API, from the webscript would we call the Java API like this?&amp;nbsp; (Or is there another more standard way?)&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://wiki.alfresco.com/wiki/3.0_JavaScript_API#Native_Java_API_Access" rel="nofollow noopener noreferrer"&gt;http://wiki.alfresco.com/wiki/3.0_JavaScript_API#Native_Java_API_Access&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for your help!&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Dave&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Apr 2009 16:45:18 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/urgent-sorting-lucene-result-on-tokenized-property-possible/m-p/184598#M137728</guid>
      <dc:creator>dwilson</dc:creator>
      <dc:date>2009-04-21T16:45:18Z</dc:date>
    </item>
    <item>
      <title>Re: URGENT:Sorting Lucene result on tokenized property possible?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/urgent-sorting-lucene-result-on-tokenized-property-possible/m-p/184599#M137729</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;I'll talk to our Lucene guy today to see what is the issue around sorting on tokenized fields. If we can fix that or find you a solution then hopefully you won't have to go the java route. Yes that is the right link for integrating Java calls into secure WebScripts - but it's not a nice solution if you can avoid it then I would.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;FYI "Returning only a specified page worth of all result data" - we need the repo to support paged resultsets for this to work - but currently it does not, so it just ends up re-querying and walking to page N - which is not much use. Paged ResultSet support is coming soon though…&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Kev&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Apr 2009 09:17:39 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/urgent-sorting-lucene-result-on-tokenized-property-possible/m-p/184599#M137729</guid>
      <dc:creator>kevinr</dc:creator>
      <dc:date>2009-04-22T09:17:39Z</dc:date>
    </item>
    <item>
      <title>Re: URGENT:Sorting Lucene result on tokenized property possible?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/urgent-sorting-lucene-result-on-tokenized-property-possible/m-p/184600#M137730</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thank you for the reply, Kevin.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;I'll talk to our Lucene guy today to see what is the issue around sorting on tokenized fields. If we can fix that or find you a solution then hopefully you won't have to go the java route. Yes that is the right link for integrating Java calls into secure WebScripts - but it's not a nice solution if you can avoid it then I would.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt;If we will use "external" sorting functions - then we need read values of the property which we use for sorting - then we get the situation above (view values some node property is very slow). The sorting by nontokenised and tokenised field in lucene will be VERY GOOD solution.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you for your help.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Oleg.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Apr 2009 18:12:18 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/urgent-sorting-lucene-result-on-tokenized-property-possible/m-p/184600#M137730</guid>
      <dc:creator>serverok</dc:creator>
      <dc:date>2009-04-22T18:12:18Z</dc:date>
    </item>
    <item>
      <title>Re: URGENT:Sorting Lucene result on tokenized property possible?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/urgent-sorting-lucene-result-on-tokenized-property-possible/m-p/184601#M137731</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;FYI a new JavaScript Search API has been added to Alfresco 3.2 (should be in the next nightly build or now in HEAD SVN)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Supports multi-column sorting, paging (once added to the underlying search API - before 3.2 final) and the new alfresco-fts search language:&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://wiki.alfresco.com/wiki/Full_Text_Search_Query_Syntax" rel="nofollow noopener noreferrer"&gt;http://wiki.alfresco.com/wiki/Full_Text_Search_Query_Syntax&lt;/A&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;- Query, language (lucene, xpath, jcr-path and alfresco-fts etc), store (workspace or avm), multi-column sorting and paging all supported via search definition object&lt;BR /&gt;&lt;BR /&gt;- A query definition object with a number of parameter objects can be simple to use as:&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; var results = search.query({query: "TEXT:alfresco"});&lt;BR /&gt;&lt;BR /&gt;- Or as richly defined as:&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; var sort1 =&lt;BR /&gt;&amp;nbsp;&amp;nbsp; {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; column: "@{&lt;A href="http://www.alfresco.org/model/content/1.0}modified" rel="nofollow noopener noreferrer"&gt;http://www.alfresco.org/model/content/1.0}modified&lt;/A&gt;",&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ascending: false&lt;BR /&gt;&amp;nbsp;&amp;nbsp; };&lt;BR /&gt;&amp;nbsp;&amp;nbsp; var sort2 =&lt;BR /&gt;&amp;nbsp;&amp;nbsp; {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; column: "@{&lt;A href="http://www.alfresco.org/model/content/1.0}created" rel="nofollow noopener noreferrer"&gt;http://www.alfresco.org/model/content/1.0}created&lt;/A&gt;",&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ascending: false&lt;BR /&gt;&amp;nbsp;&amp;nbsp; };&lt;BR /&gt;&amp;nbsp;&amp;nbsp; var paging =&lt;BR /&gt;&amp;nbsp;&amp;nbsp; {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; maxItems: 100,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; skipCount: 0&lt;BR /&gt;&amp;nbsp;&amp;nbsp; };&lt;BR /&gt;&amp;nbsp;&amp;nbsp; var def =&lt;BR /&gt;&amp;nbsp;&amp;nbsp; {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; query: "cm:name:test*",&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; store: "workspace://SpacesStore",&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; language: "fts-alfresco",&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sort: [sort1, sort2],&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; page: paging&lt;BR /&gt;&amp;nbsp;&amp;nbsp; };&lt;BR /&gt;&amp;nbsp;&amp;nbsp; var results = search.query(def);&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;/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;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;/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;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;Kev&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 May 2009 16:46:45 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/urgent-sorting-lucene-result-on-tokenized-property-possible/m-p/184601#M137731</guid>
      <dc:creator>kevinr</dc:creator>
      <dc:date>2009-05-13T16:46:45Z</dc:date>
    </item>
    <item>
      <title>Re: URGENT:Sorting Lucene result on tokenized property possible?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/urgent-sorting-lucene-result-on-tokenized-property-possible/m-p/184602#M137732</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Kevin - That sounds perfect, I can't wait!!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 May 2009 22:27:19 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/urgent-sorting-lucene-result-on-tokenized-property-possible/m-p/184602#M137732</guid>
      <dc:creator>dwilson</dc:creator>
      <dc:date>2009-05-13T22:27:19Z</dc:date>
    </item>
    <item>
      <title>Re: URGENT:Sorting Lucene result on tokenized property possible?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/urgent-sorting-lucene-result-on-tokenized-property-possible/m-p/184603#M137733</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;According to the wiki docs, in 3.2 the sort parameter is only available on search.luceneSearch(). If I need to search on an AVM store, then store.luceneSearch() doesn't have this option. Is this an oversight in the docs, or are these new snazzy options missing from AVM searches? If the latter, could they be added?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Sam.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 May 2009 09:37:22 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/urgent-sorting-lucene-result-on-tokenized-property-possible/m-p/184603#M137733</guid>
      <dc:creator>samuel_penn</dc:creator>
      <dc:date>2009-05-14T09:37:22Z</dc:date>
    </item>
    <item>
      <title>Re: URGENT:Sorting Lucene result on tokenized property possible?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/urgent-sorting-lucene-result-on-tokenized-property-possible/m-p/184604#M137734</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;See the docs at the bottom of this section:&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://wiki.alfresco.com/wiki/3.2_JavaScript_API#Search_API" rel="nofollow noopener noreferrer"&gt;http://wiki.alfresco.com/wiki/3.2_JavaScript_API#Search_API&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You can specify whatever store you like (including AVM), whatever language you like (say Lucene) and specify sorting also all together with the new API.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Kev&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 May 2009 10:07:06 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/urgent-sorting-lucene-result-on-tokenized-property-possible/m-p/184604#M137734</guid>
      <dc:creator>kevinr</dc:creator>
      <dc:date>2009-05-14T10:07:06Z</dc:date>
    </item>
    <item>
      <title>Re: URGENT:Sorting Lucene result on tokenized property possible?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/urgent-sorting-lucene-result-on-tokenized-property-possible/m-p/184605#M137735</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Ah, right, so the search method on the AVM store itself is now effectively redundant. That works.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Sam.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 May 2009 10:40:11 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/urgent-sorting-lucene-result-on-tokenized-property-possible/m-p/184605#M137735</guid>
      <dc:creator>samuel_penn</dc:creator>
      <dc:date>2009-05-14T10:40:11Z</dc:date>
    </item>
    <item>
      <title>Re: URGENT:Sorting Lucene result on tokenized property possible?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/urgent-sorting-lucene-result-on-tokenized-property-possible/m-p/184606#M137736</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I've been playing a bit with 3.2 Preview, and the sort argument doesn't always seem to work. Sorting on name or modified time works fine, however sorting on title seems to sort by name.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm calling search.luceneSearch(query, "@cm:title", true);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Items are returned in cm:name order. Replacing "@cm:title" with "@cm:modified" returns them correctly in modified date order.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Has anyone else seen this?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Sam.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Jun 2009 18:00:12 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/urgent-sorting-lucene-result-on-tokenized-property-possible/m-p/184606#M137736</guid>
      <dc:creator>samuel_penn</dc:creator>
      <dc:date>2009-06-16T18:00:12Z</dc:date>
    </item>
    <item>
      <title>Re: URGENT:Sorting Lucene result on tokenized property possible?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/urgent-sorting-lucene-result-on-tokenized-property-possible/m-p/184607#M137737</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Sam, perhaps there is a correlation with attribute tokenization?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Jun 2009 17:49:50 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/urgent-sorting-lucene-result-on-tokenized-property-possible/m-p/184607#M137737</guid>
      <dc:creator>dwilson</dc:creator>
      <dc:date>2009-06-18T17:49:50Z</dc:date>
    </item>
    <item>
      <title>Re: URGENT:Sorting Lucene result on tokenized property possible?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/urgent-sorting-lucene-result-on-tokenized-property-possible/m-p/184608#M137738</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Sam, perhaps there is a correlation with attribute tokenization?&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt;I don't think so, at least not unless tokenisation works a lot differently to my understanding of it. For example, the document with name "aidan-kingdom.yags" and title "Kingdom of Aidan" appears under the a's when documents are listed alphabetically.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Sam.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Jun 2009 13:43:32 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/urgent-sorting-lucene-result-on-tokenized-property-possible/m-p/184608#M137738</guid>
      <dc:creator>samuel_penn</dc:creator>
      <dc:date>2009-06-19T13:43:32Z</dc:date>
    </item>
    <item>
      <title>Re: URGENT:Sorting Lucene result on tokenized property possible?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/urgent-sorting-lucene-result-on-tokenized-property-possible/m-p/184609#M137739</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;Name is available tokenized and as an id, So sort works as you expect.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Title is only tokenised. So&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;"Kingdom of Aidan"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;will most likely be two tokens&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;"Kingdom" and "Aidan"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;It will sort by the lowest token.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;It has nothing to do with name.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Change the default model and reindex if you do nto want the default behaviour.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Title is ML text and so will order by locale - depending on what does have properties in the locale …&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Andy&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Jun 2009 13:56:16 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/urgent-sorting-lucene-result-on-tokenized-property-possible/m-p/184609#M137739</guid>
      <dc:creator>andy</dc:creator>
      <dc:date>2009-06-19T13:56:16Z</dc:date>
    </item>
    <item>
      <title>Re: URGENT:Sorting Lucene result on tokenized property possible?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/urgent-sorting-lucene-result-on-tokenized-property-possible/m-p/184610#M137740</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Okay, that makes sense from a technical perspective. I'd have to say though, I can't think of any situation where anyone would want sorting to actually behave like this (at least, not on an attribute such as cm:title).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've changed the code to sort the results in Javascript, which seems safer than changing the default model.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Sam.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 20 Jun 2009 08:08:19 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/urgent-sorting-lucene-result-on-tokenized-property-possible/m-p/184610#M137740</guid>
      <dc:creator>samuel_penn</dc:creator>
      <dc:date>2009-06-20T08:08:19Z</dc:date>
    </item>
    <item>
      <title>Re: URGENT:Sorting Lucene result on tokenized property possible?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/urgent-sorting-lucene-result-on-tokenized-property-possible/m-p/184611#M137741</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;so has there been any resolution to this issue? From what i've read and seen so far, if the sorted column contains multiple tokens then the result is inconsistent and a manual javascript exposed java backed sorting approach seems to be recommened(?)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;OR&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;has this been corrected in the new 3.2 enterprise release so q query with a sorted multiple token field is sorted?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;thanks&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;PS. we're using 3.2 community build 2039, schema 2019 but have purchased the enterprise 3.2 awaiting installation&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Jan 2010 15:40:40 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/urgent-sorting-lucene-result-on-tokenized-property-possible/m-p/184611#M137741</guid>
      <dc:creator>kbootz</dc:creator>
      <dc:date>2010-01-18T15:40:40Z</dc:date>
    </item>
  </channel>
</rss>

