On Sep 27, 2004, at 6:32 PM, [EMAIL PROTECTED] wrote:
I'm interested in doing sorting in Lucene. Is there a FAQ or an article that
will show me how to do this? I already have my indexing and searching working.

From IndexSearcher, use search(Query,Sort) method (or other variants that take a Sort):


<http://jakarta.apache.org/lucene/docs/api/org/apache/lucene/search/ Searcher.html#search(org.apache.lucene.search.Query,%20org.apache.lucene .search.Sort)>

Following the Javadocs for Sort should be (hopefully) self-explanatory.

Sorting is a pretty new feature, and is only described in Javadocs and this e-mail list as far as I know. I wrote a pretty extensive section on sorting in Lucene in Action - http://www.manning.com/hatcher2 - which is primarily in Otis' hands right now (*nudge nudge*) and has been technical and copy edited. In other words, LIA should be available in print 6-8 weeks (e-book in PDF format available much sooner) after Otis is done.

        Erik


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to