Re: Multiple sort field

2012-07-18 Thread Erick Erickson
Lucene certainly supports multiple sort criteria, see IndexSearcher.search, any one that takes a Sort object. The Sort object can contain a list of fields where any ties in the first N field(s) are decided by looking at field N+1. But, Ganesh, be a little careful about resolving by internal Lucene

Re: Multiple sort field

2012-07-18 Thread googoo
I don't think lucene will support multi sort. If you look into org.apache.lucene.search.TopScoreDocCollector you may get some feeling. It use max heap to sort the document, and the score is one time calculate, it it not first sort by time, then sort again by id. When lucene sort below documents:

Re: Multiple sort field

2012-07-18 Thread Ian Lea
> Any thoughts on this? Patience ... > Is it good to use multiple sort fields? Absolutely, if that's what you need. On the other hand, if you don't need it then it's a bad idea. > Using sort on docid will consume any memory? Don't know. Certainly won't use less than not sorting this way. >

Re: Multiple sort field

2012-07-17 Thread Ganesh
Any thoughts on this? Regards Ganesh - Original Message - From: "Ganesh" To: Sent: Tuesday, July 17, 2012 4:23 PM Subject: [Bulk] Multiple sort field Hello all, I have more than one record having same time stamp. When i sort by date time in decending order, the set of records which