AnsweredAssumed Answered

URGENT:Sorting Lucene result on tokenized property possible?

Question asked by serverok on Apr 14, 2009
Latest reply on Jan 18, 2010 by kbootz
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 ( :
<index enabled="true">

Is the only choice to sort "manually" in the web script after running the lucene query without sorting?

I tried use JS sort function:
var result = search.luceneSearch(query);
function Sorting(a, b) {
   var x =['cm:title'];
   var y =['cm:title'];
   return ((x > y) ? 1 : -1);

but if we have a big list of content in lucene result (100, 200 and more) - then this section
var x =['cm:title'];
var y =['cm:title'];
very long working.

Also we have around 50 properties to each content (custom Model) - maybe this is the reason why we have so long going on reading the value of properties?

I would be very grateful for help in solving this problem.

Oleg Koval