Does someone know how to sort the hits list by a specified document field?

2007-11-04 Thread jackxin
Does someone know how to sort the hits list by a specified document field? Even if the field is numeric or datetime etc. -- View this message in context: http://www.nabble.com/Does-someone-know-how-to-sort-the-hits-list-by-a-specified-document-field--tf4749900.html#a13582008 Sent from the

Re: Does someone know how to sort the hits list by a specified document field?

2007-11-05 Thread Marcus Herou
Hi. Just add a Sort object to the search. Sort sort = new Sort(sortField, !ascending); Hits[] hits = searcher.search(query, sort); Kindly //Marcus On 11/5/07, jackxin <[EMAIL PROTECTED]> wrote: > > > Does someone know how to sort the hits list by a specified document field? >