I have a requirement where in the results have to be sorted in ascending
order for few fields, and descending order for one field.
Currently I am using:
String[] sortOrder = { IFIELD_YEAR, IFIELD_TYPE, IFIELD_NUM, IFIELD_SESSION
};
Sort sort = new Sort(sortOrder);
hits = indexSearcher.search(booleanQuery, sort);
Using the above code, everything gets sorted in ascending order starting
with year, type, number and session in that precedence.
Now I have a requirement to first sort in ascending order for year, type and
number, and then sort in descending order only for session.
Is there a way to get this to work.
Thanks.
--
View this message in context:
http://lucene.472066.n3.nabble.com/Using-Sort-tp765845p765845.html
Sent from the Lucene - Java Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]