cancel
Showing results for 
Search instead for 
Did you mean: 

luceneSearch sorting failed

blc
Champ in-the-making
Champ in-the-making
Hi,

I am using luceneSearch in webscript to search all persons in alfresco. However, the sorting seems not working propertly as the result is not in ascending order. My code for the search is:

var iqnamePath="TYPE:\"{http://www.alfresco.org/model/content/1.0}person\"";
var result = search.luceneSearch(iqnamePath,"@cm:firstName", true);

Result of the search is:
1262246699816
1262246700629
1262246928004
1262246928426
1262247223363
1262247224645
1262247330770
1262247331504
99
99
99
99
Administrator
Alan
ALICECHU
Ann
AP1
AP2
apollomgr
apollosup
Carmen
account for ccgocm
account for ccgocm
account for ccgocm
Catherine Chan
COM
comso
COP1
cop1so
….More Result

Any ideas please.

Thanks
1 REPLY 1

invictus9
Champ in-the-making
Champ in-the-making
luceneSearch returns a set of nodes. The order is likely determined by how the nodes are collected into the index. Any sort order would have to be defined by you.