cancel
Showing results for 
Search instead for 
Did you mean: 

Lucene Search and sorting by Region

tara_b
Champ in-the-making
Champ in-the-making
Hello,

I'm doing a lucene search using Search Parameters to limit and sort the results.

SearchParameters sp = new SearchParameters();
sp.addStore(aStore);
sp.setLanguage(SearchService.LANGUAGE_LUCENE);
sp.setQuery(myQuery);
sp.addSort(mySort, true);
sp.setLimit(aLimit);

When sorting by a property such as @cm:author, @cm:title, it works well.

How do i sort by a category, such as the Region category?

Thanks for your help!
1 REPLY 1

tara_b
Champ in-the-making
Champ in-the-making
I couldnt work out what the solution was, so i ended up using a TreeSet - i processed each row and added it in a certain order.